diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-23 10:41:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-23 17:57:11 +0200 |
commit | 44f32fc9c1cf95c77b725a4aa0ab405330135ad6 (patch) | |
tree | a224dc524d0665747d8d0109ade61aa5776d519d /cui/source | |
parent | 44cc59db6f4f4f8b2ce5c993a31b5a019a8d7e97 (diff) |
use officecfg to retrieve SidebarIconSize
Change-Id: Id1cc4b8e3e28d942b44deacafbc514bbcd95874c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119411
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/options/optgdlg.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index fa4598b30f4e..04d2683c921e 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -704,7 +704,9 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) default: OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of m_xSidebarIconSizeLB should not be possible!" ); } - aMiscOptions.SetSidebarIconSize( eSet ); + auto xChanges = comphelper::ConfigurationChanges::create(); + officecfg::Office::Common::Misc::SidebarIconSize::set(static_cast<sal_Int16>(eSet), xChanges); + xChanges->commit(); } const sal_Int32 nNotebookbarSizeLB_NewSelection = m_xNotebookbarIconSizeLB->get_active(); @@ -885,11 +887,12 @@ void OfaViewTabPage::Reset( const SfxItemSet* ) m_xIconSizeLB->set_active( nSizeLB_InitialSelection ); m_xIconSizeLB->save_value(); - if( aMiscOptions.GetSidebarIconSize() == ToolBoxButtonSize::DontCare ) + ToolBoxButtonSize eSidebarIconSize = static_cast<ToolBoxButtonSize>(officecfg::Office::Common::Misc::SidebarIconSize::get()); + if( eSidebarIconSize == ToolBoxButtonSize::DontCare ) ; // do nothing - else if( aMiscOptions.GetSidebarIconSize() == ToolBoxButtonSize::Small ) + else if( eSidebarIconSize == ToolBoxButtonSize::Small ) nSidebarSizeLB_InitialSelection = 1; - else if( aMiscOptions.GetSidebarIconSize() == ToolBoxButtonSize::Large ) + else if( eSidebarIconSize == ToolBoxButtonSize::Large ) nSidebarSizeLB_InitialSelection = 2; m_xSidebarIconSizeLB->set_active( nSidebarSizeLB_InitialSelection ); m_xSidebarIconSizeLB->save_value(); |