From a6859a1fee2f0f3a35cfc381d5ae547eb13fd620 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 28 Jul 2020 21:33:29 +0100 Subject: replace and drop SvtCompatibilityViewOptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iab187468cf25b4a4afc7c79578677156ff224df9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99651 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sw/source/ui/config/optcomp.cxx | 11 +++++++---- sw/source/uibase/inc/optcomp.hxx | 3 --- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index 13a11016f681..293e798e09b4 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -85,7 +85,7 @@ SwCompatibilityOptPage::SwCompatibilityOptPage(weld::Container* pPage, weld::Dia m_xGlobalOptionsCLB->set_sensitive(!bReadOnly); m_xGlobalOptionsCLB->append(); - const bool bChecked = m_aViewConfigItem.HasMSOCompatibleFormsMenu(); + const bool bChecked = officecfg::Office::Compatibility::View::MSCompatibleFormsMenu::get(); m_xGlobalOptionsCLB->set_toggle(0, bChecked ? TRISTATE_TRUE : TRISTATE_FALSE); m_xGlobalOptionsCLB->set_text(0, m_xGlobalOptionsLB->get_text(0), 0); @@ -432,7 +432,10 @@ bool SwCompatibilityOptPage::FillItemSet( SfxItemSet* ) bool bNewMSFormsMenuOption = m_xGlobalOptionsCLB->get_toggle(0); if (m_bSavedMSFormsMenuOption != bNewMSFormsMenuOption) { - m_aViewConfigItem.SetMSOCompatibleFormsMenu(bNewMSFormsMenuOption); + std::shared_ptr batch(comphelper::ConfigurationChanges::create()); + officecfg::Office::Compatibility::View::MSCompatibleFormsMenu::set(bNewMSFormsMenuOption, batch); + batch->commit(); + m_bSavedMSFormsMenuOption = bNewMSFormsMenuOption; bModified = true; @@ -458,8 +461,8 @@ void SwCompatibilityOptPage::Reset( const SfxItemSet* ) SetCurrentOptions( nOptions ); m_nSavedOptions = nOptions; - m_xGlobalOptionsCLB->set_toggle(0, m_aViewConfigItem.HasMSOCompatibleFormsMenu() ? TRISTATE_TRUE : TRISTATE_FALSE); - m_bSavedMSFormsMenuOption = m_aViewConfigItem.HasMSOCompatibleFormsMenu(); + m_bSavedMSFormsMenuOption = officecfg::Office::Compatibility::View::MSCompatibleFormsMenu::get(); + m_xGlobalOptionsCLB->set_toggle(0, m_bSavedMSFormsMenuOption ? TRISTATE_TRUE : TRISTATE_FALSE); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/optcomp.hxx b/sw/source/uibase/inc/optcomp.hxx index e087d3852362..8af469e6a679 100644 --- a/sw/source/uibase/inc/optcomp.hxx +++ b/sw/source/uibase/inc/optcomp.hxx @@ -22,7 +22,6 @@ #include #include #include -#include #include class SwWrtShell; @@ -33,8 +32,6 @@ class SwCompatibilityOptPage : public SfxTabPage private: // config item SvtCompatibilityOptions m_aConfigItem; - // config item - SvtCompatibilityViewOptions m_aViewConfigItem; // text of the user entry OUString m_sUserEntry; // shell of the current document -- cgit