diff options
-rw-r--r-- | include/svtools/restartdialog.hxx | 3 | ||||
-rw-r--r-- | svtools/source/dialogs/restartdialog.cxx | 3 | ||||
-rw-r--r-- | svtools/uiconfig/ui/restartdialog.ui | 17 | ||||
-rw-r--r-- | sw/source/ui/config/optcomp.cxx | 12 |
4 files changed, 34 insertions, 1 deletions
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; |