diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-24 16:56:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-25 20:05:30 +0200 |
commit | 134f40136a9bea265d8f2fedfdb41a1e65d81b49 (patch) | |
tree | d00db8e5b8cc954440228b8815631aa937effdca /cui | |
parent | 28993c0a8d8628c650b661767fd8ab2228c507d9 (diff) |
use officecfg to retrieve OdfDefaultVersion
Change-Id: Id54b98d978965e7ce304b83d5eff7d6c844a41d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119474
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optsave.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index 208bf8289f2e..14194720b7c0 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -227,7 +227,6 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet ) { auto xChanges = comphelper::ConfigurationChanges::create(); bool bModified = false; - SvtSaveOptions aSaveOpt; if(m_xLoadUserSettingsCB->get_state_changed_from_saved()) officecfg::Office::Common::Load::UserDefinedSettings::set(m_xLoadUserSettingsCB->get_active(), xChanges); @@ -237,7 +236,7 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet ) if ( m_xODFVersionLB->get_value_changed_from_saved() ) { sal_Int32 nVersion = m_xODFVersionLB->get_active_id().toInt32(); - aSaveOpt.SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersion( nVersion ) ); + SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersion( nVersion ), xChanges ); } if ( m_xDocInfoCB->get_state_changed_from_saved() ) @@ -364,7 +363,6 @@ static bool isODFFormat( const OUString& sFilter ) void SvxSaveTabPage::Reset( const SfxItemSet* ) { - SvtSaveOptions aSaveOpt; m_xLoadUserSettingsCB->set_active(officecfg::Office::Common::Load::UserDefinedSettings::get()); m_xLoadUserSettingsCB->save_state(); m_xLoadUserSettingsCB->set_sensitive(!officecfg::Office::Common::Load::UserDefinedSettings::isReadOnly()); @@ -456,9 +454,9 @@ void SvxSaveTabPage::Reset( const SfxItemSet* ) m_xRelativeInetCB->set_active(officecfg::Office::Common::Save::URL::Internet::get()); m_xRelativeInetCB->set_sensitive(!officecfg::Office::Common::Save::URL::Internet::isReadOnly()); - sal_Int32 nDefaultVersion = aSaveOpt.GetODFDefaultVersion(); + sal_Int32 nDefaultVersion = GetODFDefaultVersion(); m_xODFVersionLB->set_active_id(OUString::number(nDefaultVersion)); - m_xODFVersionLB->set_sensitive(!aSaveOpt.IsReadOnly(SvtSaveOptions::EOption::OdfDefaultVersion)); + m_xODFVersionLB->set_sensitive(!officecfg::Office::Common::Save::ODF::DefaultVersion::isReadOnly()); AutoClickHdl_Impl(*m_xAutoSaveCB); ODFVersionHdl_Impl(*m_xODFVersionLB); |