[Libreoffice-commits] core.git: include/svtools svtools/source svtools/uiconfig sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Feb 16 15:42:19 UTC 2019
include/svtools/restartdialog.hxx | 3 +++
svtools/source/dialogs/restartdialog.cxx | 3 +++
svtools/uiconfig/ui/restartdialog.ui | 17 ++++++++++++++++-
sw/source/ui/config/optcomp.cxx | 12 ++++++++++++
4 files changed, 34 insertions(+), 1 deletion(-)
New commits:
commit 54b2615e0d209f815b3d503523fd4c517dc6b5cd
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Tue Feb 5 12:15:31 2019 +0100
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Sat Feb 16 16:41:57 2019 +0100
MSForms: Show restart dialog when MS compatible Forms menu setting is changed
Change-Id: Icb98dac73dea5f5cb18e1ca34e37e9d9bf84782e
Reviewed-on: https://gerrit.libreoffice.org/67906
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
diff --git a/include/svtools/restartdialog.hxx b/include/svtools/restartdialog.hxx
index a49289b5f8f7..2e7c481e1ef7 100644
--- a/include/svtools/restartdialog.hxx
+++ b/include/svtools/restartdialog.hxx
@@ -60,6 +60,9 @@ enum RestartReason {
// For the OpenCL changes to take effect,
// %PRODUCTNAME must be restarted:
RESTART_REASON_OPENCL,
+ // For restructuring the Forms menu,
+ // %PRODUCTNAME must be restarted:
+ RESTART_REASON_MSCOMPATIBLE_FORMS_MENU,
// No particular reason:
RESTART_REASON_NONE
};
diff --git a/svtools/source/dialogs/restartdialog.cxx b/svtools/source/dialogs/restartdialog.cxx
index 4ec3356276bb..3e665ede47c0 100644
--- a/svtools/source/dialogs/restartdialog.cxx
+++ b/svtools/source/dialogs/restartdialog.cxx
@@ -65,6 +65,9 @@ public:
case svtools::RESTART_REASON_OPENCL:
reason_ = m_xBuilder->weld_widget("reason_opencl");
break;
+ case svtools::RESTART_REASON_MSCOMPATIBLE_FORMS_MENU:
+ reason_ = m_xBuilder->weld_widget("reason_mscompatible_formsmenu");
+ break;
default:
assert(false); // this cannot happen
}
diff --git a/svtools/uiconfig/ui/restartdialog.ui b/svtools/uiconfig/ui/restartdialog.ui
index ab8dfa14f69e..5962da9940bc 100644
--- a/svtools/uiconfig/ui/restartdialog.ui
+++ b/svtools/uiconfig/ui/restartdialog.ui
@@ -244,6 +244,21 @@
</packing>
</child>
<child>
+ <object class="GtkLabel" id="reason_mscompatible_formsmenu">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="label" translatable="yes" context="restartdialog|reason_mscompatible_formsmenu">For restructuring the Forms menu, %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">12</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLabel" id="label">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -254,7 +269,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">12</property>
+ <property name="position">13</property>
</packing>
</child>
</object>
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index dbb622ece3ad..fa5d55497f8d 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -35,6 +35,8 @@
#include <vcl/treelistentry.hxx>
#include <IDocumentSettingAccess.hxx>
#include <vector>
+#include <svtools/restartdialog.hxx>
+#include <comphelper/processfactory.hxx>
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::document;
@@ -452,6 +454,16 @@ bool SwCompatibilityOptPage::FillItemSet( SfxItemSet* )
m_aViewConfigItem.SetMSOCompatibleFormsMenu(bNewMSFormsMenuOption);
m_bSavedMSFormsMenuOption = bNewMSFormsMenuOption;
bModified = true;
+
+ // Show a message about that the option needs a restart to be applied
+ {
+ SolarMutexGuard aGuard;
+ if (svtools::executeRestartDialog(comphelper::getProcessComponentContext(),
+ GetFrameWeld(), svtools::RESTART_REASON_MSCOMPATIBLE_FORMS_MENU))
+ {
+ GetParentDialog()->EndDialog(RET_OK);
+ }
+ }
}
return bModified;
More information about the Libreoffice-commits
mailing list