diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-28 23:58:40 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-29 03:54:26 +0100 |
commit | 8810812e58f1b014d3156235c1ab5a2d6c73c828 (patch) | |
tree | 14d7af8f7c402331e96b10b801fe9e6713b26a86 /sc/source/ui | |
parent | b2c56ac95b15b675b9fabed889e7f9709bdc793f (diff) |
tdf#132145: Synchronize ScAppCfg with configuration
Change-Id: Iadf5ff86d043f63355fd30816a9e2011479465c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125990
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/app/scmod.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 2a3685488cb9..8463e67618a0 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -729,7 +729,7 @@ const ScAppOptions& ScModule::GetAppOptions() if ( !m_pAppCfg ) m_pAppCfg.reset( new ScAppCfg ); - return *m_pAppCfg; + return m_pAppCfg->GetOptions(); } void ScModule::SetDefaultsOptions( const ScDefaultsOptions& rOpt ) @@ -898,11 +898,13 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) // SfxGetpApp()->SetOptions( rOptSet ); + ScAppOptions aAppOptions = m_pAppCfg->GetOptions(); + // No more linguistics if (rOptSet.HasItem(SID_ATTR_METRIC, &pItem)) { PutItem( *pItem ); - m_pAppCfg->SetAppMetric( static_cast<FieldUnit>(static_cast<const SfxUInt16Item*>(pItem)->GetValue()) ); + aAppOptions.SetAppMetric( static_cast<FieldUnit>(static_cast<const SfxUInt16Item*>(pItem)->GetValue()) ); bSaveAppOptions = true; } @@ -914,18 +916,18 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) if (rOptSet.HasItem(SID_SC_OPT_SYNCZOOM, &pItem)) { - m_pAppCfg->SetSynchronizeZoom( static_cast<const SfxBoolItem*>(pItem)->GetValue() ); + aAppOptions.SetSynchronizeZoom( static_cast<const SfxBoolItem*>(pItem)->GetValue() ); bSaveAppOptions = true; } if (rOptSet.HasItem(SID_SC_OPT_KEY_BINDING_COMPAT, &pItem)) { sal_uInt16 nVal = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); - ScOptionsUtil::KeyBindingType eOld = m_pAppCfg->GetKeyBindingType(); + ScOptionsUtil::KeyBindingType eOld = aAppOptions.GetKeyBindingType(); ScOptionsUtil::KeyBindingType eNew = static_cast<ScOptionsUtil::KeyBindingType>(nVal); if (eOld != eNew) { - m_pAppCfg->SetKeyBindingType(eNew); + aAppOptions.SetKeyBindingType(eNew); bSaveAppOptions = true; ScDocShell::ResetKeyBindings(eNew); } @@ -1210,7 +1212,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) } if ( bSaveAppOptions ) - m_pAppCfg->OptionsChanged(); + m_pAppCfg->SetOptions(aAppOptions); if ( bSaveInputOptions ) m_pInputCfg->SetOptions(aInputOptions); |