summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/options/optsave.cxx16
-rw-r--r--include/svtools/restartdialog.hxx3
-rw-r--r--svtools/source/dialogs/restartdialog.cxx3
-rw-r--r--svtools/uiconfig/ui/restartdialog.ui19
4 files changed, 36 insertions, 5 deletions
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 717fa623a668..43468715cd3a 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -25,6 +25,7 @@
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
#include "optsave.hxx"
+#include <treeopt.hxx>
#include <officecfg/Office/Common.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/moduleoptions.hxx>
@@ -37,6 +38,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <sfx2/sfxsids.hrc>
#include <sfx2/docfilt.hxx>
+#include <svtools/restartdialog.hxx>
#include <unotools/optionsdlg.hxx>
#include <osl/diagnose.h>
#include <tools/diagnose_ex.h>
@@ -225,7 +227,7 @@ void SvxSaveTabPage::DetectHiddenControls()
bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
{
auto xChanges = comphelper::ConfigurationChanges::create();
- bool bModified = false;
+ bool bModified = false, bRequestRestart = false;
if(m_xLoadUserSettingsCB->get_state_changed_from_saved())
officecfg::Office::Common::Load::UserDefinedSettings::set(m_xLoadUserSettingsCB->get_active(), xChanges);
@@ -255,7 +257,7 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
{
rSet->Put( SfxBoolItem( SID_ATTR_AUTOSAVE,
m_xAutoSaveCB->get_active() ) );
- bModified = true;
+ bModified = bRequestRestart = true;
}
if ( m_xWarnAlienFormatCB->get_state_changed_from_saved() )
{
@@ -268,7 +270,7 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
{
rSet->Put( SfxUInt16Item( SID_ATTR_AUTOSAVEMINUTE,
static_cast<sal_uInt16>(m_xAutoSaveEdit->get_value()) ) );
- bModified = true;
+ bModified = bRequestRestart = true;
}
if ( m_xUserAutoSaveCB->get_state_changed_from_saved() )
@@ -322,6 +324,14 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
aModuleOpt.SetFactoryDefaultFilter(SvtModuleOptions::EFactory::WRITERGLOBAL, pImpl->aDefaultArr[APP_WRITER_GLOBAL]);
xChanges->commit();
+
+ if (bRequestRestart)
+ {
+ OfaTreeOptionsDialog* pParentDlg(static_cast<OfaTreeOptionsDialog*>(GetDialogController()));
+ if (pParentDlg)
+ pParentDlg->SetNeedsRestart(svtools::RESTART_REASON_SAVE);
+ }
+
return bModified;
}
diff --git a/include/svtools/restartdialog.hxx b/include/svtools/restartdialog.hxx
index 95ca3ef4356d..001f322772a5 100644
--- a/include/svtools/restartdialog.hxx
+++ b/include/svtools/restartdialog.hxx
@@ -65,6 +65,9 @@ enum RestartReason {
// For restructuring the Form menu,
// %PRODUCTNAME must be restarted:
RESTART_REASON_MSCOMPATIBLE_FORMS_MENU,
+ // For the modified save settings to take effect,
+ // %PRODUCTNAME must be restarted:
+ RESTART_REASON_SAVE,
// To apply changes, %PRODUCTNAME,
// %PRODUCTNAME must be restarted:
RESTART_REASON_UI_CHANGE,
diff --git a/svtools/source/dialogs/restartdialog.cxx b/svtools/source/dialogs/restartdialog.cxx
index ba5c7d2a3304..30954f17638b 100644
--- a/svtools/source/dialogs/restartdialog.cxx
+++ b/svtools/source/dialogs/restartdialog.cxx
@@ -71,6 +71,9 @@ public:
case svtools::RESTART_REASON_MSCOMPATIBLE_FORMS_MENU:
reason_ = m_xBuilder->weld_widget("reason_mscompatible_formsmenu");
break;
+ case svtools::RESTART_REASON_SAVE:
+ reason_ = m_xBuilder->weld_widget("reason_save");
+ break;
case svtools::RESTART_REASON_UI_CHANGE:
reason_ = m_xBuilder->weld_widget("reason_uichange");
break;
diff --git a/svtools/uiconfig/ui/restartdialog.ui b/svtools/uiconfig/ui/restartdialog.ui
index c49218c03bc8..9772c1659ad7 100644
--- a/svtools/uiconfig/ui/restartdialog.ui
+++ b/svtools/uiconfig/ui/restartdialog.ui
@@ -274,6 +274,21 @@
</packing>
</child>
<child>
+ <object class="GtkLabel" id="reason_save">
+ <property name="can-focus">False</property>
+ <property name="no-show-all">True</property>
+ <property name="label" translatable="yes" context="restartdialog|reason_save">For the modified save settings to take effect, %PRODUCTNAME must be restarted.</property>
+ <property name="wrap">True</property>
+ <property name="max-width-chars">50</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">14</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLabel" id="label">
<property name="visible">True</property>
<property name="can-focus">False</property>
@@ -284,7 +299,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">14</property>
+ <property name="position">15</property>
</packing>
</child>
<child>
@@ -299,7 +314,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">15</property>
+ <property name="position">16</property>
</packing>
</child>
</object>