From afff3bf81f1908b2d4a7068b4862fd1f19440383 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 23 Jul 2021 10:33:09 +0200 Subject: use officecfg to retrieve NotebookbarIconSize Change-Id: I1e76e8369b4a0448a62cd72bc9a1ee492fae91b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119410 Tested-by: Jenkins Reviewed-by: Noel Grandin --- cui/source/options/optgdlg.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'cui') 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(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(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(); -- cgit