diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-23 10:33:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-23 16:22:08 +0200 |
commit | afff3bf81f1908b2d4a7068b4862fd1f19440383 (patch) | |
tree | b071234b26ee51fb4333dae51758b694e5091f2c /cui | |
parent | ee3d408fd6c909556d1671d28591cde4c0122979 (diff) |
use officecfg to retrieve NotebookbarIconSize
Change-Id: I1e76e8369b4a0448a62cd72bc9a1ee492fae91b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119410
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-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 83fd85d8a074..fa4598b30f4e 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -720,7 +720,9 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) default: OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of m_xNotebookbarIconSizeLB should not be possible!" ); } - aMiscOptions.SetNotebookbarIconSize( eSet ); + auto xChanges = comphelper::ConfigurationChanges::create(); + officecfg::Office::Common::Misc::NotebookbarIconSize::set(static_cast<sal_Int16>(eSet), xChanges); + xChanges->commit(); } const sal_Int32 nStyleLB_NewSelection = m_xIconStyleLB->get_active(); @@ -891,11 +893,12 @@ void OfaViewTabPage::Reset( const SfxItemSet* ) nSidebarSizeLB_InitialSelection = 2; m_xSidebarIconSizeLB->set_active( nSidebarSizeLB_InitialSelection ); m_xSidebarIconSizeLB->save_value(); - if( aMiscOptions.GetNotebookbarIconSize() == ToolBoxButtonSize::DontCare ) + ToolBoxButtonSize eNotebookbarIconSize = static_cast<ToolBoxButtonSize>(officecfg::Office::Common::Misc::NotebookbarIconSize::get()); + if( eNotebookbarIconSize == ToolBoxButtonSize::DontCare ) ; // do nothing - else if( aMiscOptions.GetNotebookbarIconSize() == ToolBoxButtonSize::Small ) + else if( eNotebookbarIconSize == ToolBoxButtonSize::Small ) nNotebookbarSizeLB_InitialSelection = 1; - else if( aMiscOptions.GetNotebookbarIconSize() == ToolBoxButtonSize::Large ) + else if( eNotebookbarIconSize == ToolBoxButtonSize::Large ) nNotebookbarSizeLB_InitialSelection = 2; m_xNotebookbarIconSizeLB->set_active(nNotebookbarSizeLB_InitialSelection); m_xNotebookbarIconSizeLB->save_value(); |