diff options
-rw-r--r-- | cui/source/dialogs/tipofthedaydlg.cxx | 17 | ||||
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 5 | ||||
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Common.xcs | 6 | ||||
-rw-r--r-- | svx/source/dialog/crashreportdlg.cxx | 8 |
4 files changed, 33 insertions, 3 deletions
diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx index bbb26a054be9..40bb606130f2 100644 --- a/cui/source/dialogs/tipofthedaydlg.cxx +++ b/cui/source/dialogs/tipofthedaydlg.cxx @@ -121,8 +121,21 @@ void TipOfTheDayDialog::UpdateTip() { constexpr sal_Int32 nNumberOfTips = std::size(TIPOFTHEDAY_STRINGARRAY); - if ((m_nCurrentTip >= nNumberOfTips) || (m_nCurrentTip < 0)) - m_nCurrentTip = 0; + for (;;) + { + if ((m_nCurrentTip >= nNumberOfTips) || (m_nCurrentTip < 0)) + m_nCurrentTip = 0; + if (std::get<1>(TIPOFTHEDAY_STRINGARRAY[m_nCurrentTip]) + == "svx/ui/safemodedialog/SafeModeDialog" + && !officecfg::Office::Common::Misc::OfferSafeMode::get()) + { + ++m_nCurrentTip; + } + else + { + break; + } + } //title m_xDialog->set_title(CuiResId(STR_TITLE) diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 8194cfc8e25f..95e17053d3fb 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1343,6 +1343,11 @@ void MenuBarManager::FillMenu( { continue; } + if (aCommandURL == ".uno:SafeMode" + && !officecfg::Office::Common::Misc::OfferSafeMode::get()) + { + continue; + } if ( nType == css::ui::ItemType::DEFAULT ) { diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index e43a6ac23765..15b3a481195c 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -5583,6 +5583,12 @@ </info> <value>true</value> </prop> + <prop oor:name="OfferSafeMode" oor:type="xs:boolean" oor:nillable="false"> + <info> + <desc>Offer Safe Mode to the user.</desc> + </info> + <value>true</value> + </prop> </group> <group oor:name="Forms"> <info> diff --git a/svx/source/dialog/crashreportdlg.cxx b/svx/source/dialog/crashreportdlg.cxx index aad28436eea3..82ecf8beda5a 100644 --- a/svx/source/dialog/crashreportdlg.cxx +++ b/svx/source/dialog/crashreportdlg.cxx @@ -40,8 +40,14 @@ CrashReportDialog::CrashReportDialog(weld::Window* pParent) { maLinkTemplate = mxLinkButton->get_uri(); + auto const offerSafeMode = officecfg::Office::Common::Misc::OfferSafeMode::get(); + mxCBSafeMode->set_visible(offerSafeMode); + auto nWidth = mxEditPreUpload->get_preferred_size().Width(); - nWidth = std::max(nWidth, mxCBSafeMode->get_size_request().Width()); + if (offerSafeMode) + { + nWidth = std::max(nWidth, mxCBSafeMode->get_size_request().Width()); + } mxEditPreUpload->set_size_request(nWidth, -1); mxCBSafeMode->set_size_request(nWidth, -1); |