diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-07-28 21:33:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-29 10:22:44 +0200 |
commit | a6859a1fee2f0f3a35cfc381d5ae547eb13fd620 (patch) | |
tree | 8de17dc888fa518aaa275cefc97cc3d9b04c0a18 /sw | |
parent | 26c08a91e86027c3f37dbd462209e63a5b26b259 (diff) |
replace and drop SvtCompatibilityViewOptions
Change-Id: Iab187468cf25b4a4afc7c79578677156ff224df9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99651
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/config/optcomp.cxx | 11 | ||||
-rw-r--r-- | sw/source/uibase/inc/optcomp.hxx | 3 |
2 files changed, 7 insertions, 7 deletions
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<comphelper::ConfigurationChanges> 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 <memory> #include <sfx2/tabdlg.hxx> #include <unotools/compatibility.hxx> -#include <unotools/compatibilityviewoptions.hxx> #include <rtl/ustring.hxx> 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 |