summaryrefslogtreecommitdiff
path: root/sw/source/ui/config
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-07-28 21:33:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-07-29 10:22:44 +0200
commita6859a1fee2f0f3a35cfc381d5ae547eb13fd620 (patch)
tree8de17dc888fa518aaa275cefc97cc3d9b04c0a18 /sw/source/ui/config
parent26c08a91e86027c3f37dbd462209e63a5b26b259 (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/source/ui/config')
-rw-r--r--sw/source/ui/config/optcomp.cxx11
1 files changed, 7 insertions, 4 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: */