diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-24 14:23:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-25 16:50:03 +0200 |
commit | 2b71e0683cf8a34aaddce3558b941ba62b1b4ec5 (patch) | |
tree | 5dc7f1bc4b78228e9dceacf1d746196f42ab7158 /cui | |
parent | 5d83e940f7636050891f52929ace29650025cd36 (diff) |
use officecfg to retrieve LoadUserSettings
Change-Id: I9680c02207ff2d21785a20061b784066ead07a8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119473
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optsave.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index 3ac609d8e64f..208bf8289f2e 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -225,19 +225,14 @@ void SvxSaveTabPage::DetectHiddenControls() bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet ) { + auto xChanges = comphelper::ConfigurationChanges::create(); bool bModified = false; SvtSaveOptions aSaveOpt; if(m_xLoadUserSettingsCB->get_state_changed_from_saved()) - { - aSaveOpt.SetLoadUserSettings(m_xLoadUserSettingsCB->get_active()); - } + officecfg::Office::Common::Load::UserDefinedSettings::set(m_xLoadUserSettingsCB->get_active(), xChanges); if ( m_xLoadDocPrinterCB->get_state_changed_from_saved() ) - { - auto xChanges = comphelper::ConfigurationChanges::create(); officecfg::Office::Common::Save::Document::LoadPrinter::set(m_xLoadDocPrinterCB->get_active(), xChanges); - xChanges->commit(); - } if ( m_xODFVersionLB->get_value_changed_from_saved() ) { @@ -329,6 +324,7 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet ) pImpl->aDefaultArr[APP_WRITER_GLOBAL] != aModuleOpt.GetFactoryDefaultFilter(SvtModuleOptions::EFactory::WRITERGLOBAL)) aModuleOpt.SetFactoryDefaultFilter(SvtModuleOptions::EFactory::WRITERGLOBAL, pImpl->aDefaultArr[APP_WRITER_GLOBAL]); + xChanges->commit(); return bModified; } @@ -369,7 +365,7 @@ static bool isODFFormat( const OUString& sFilter ) void SvxSaveTabPage::Reset( const SfxItemSet* ) { SvtSaveOptions aSaveOpt; - m_xLoadUserSettingsCB->set_active(aSaveOpt.IsLoadUserSettings()); + m_xLoadUserSettingsCB->set_active(officecfg::Office::Common::Load::UserDefinedSettings::get()); m_xLoadUserSettingsCB->save_state(); m_xLoadUserSettingsCB->set_sensitive(!officecfg::Office::Common::Load::UserDefinedSettings::isReadOnly()); m_xLoadDocPrinterCB->set_active( officecfg::Office::Common::Save::Document::LoadPrinter::get() ); |