diff options
-rw-r--r-- | cui/source/options/optgdlg.cxx | 11 | ||||
-rw-r--r-- | include/svtools/miscopt.hxx | 2 | ||||
-rw-r--r-- | svtools/source/config/miscopt.cxx | 59 |
3 files changed, 8 insertions, 64 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(); diff --git a/include/svtools/miscopt.hxx b/include/svtools/miscopt.hxx index e408fb8b747d..f7c5108d752d 100644 --- a/include/svtools/miscopt.hxx +++ b/include/svtools/miscopt.hxx @@ -58,8 +58,6 @@ class SVT_DLLPUBLIC SvtMiscOptions final : public utl::detail::Options void SetSymbolsSize( sal_Int16 eSet ); ToolBoxButtonSize GetSidebarIconSize() const; void SetSidebarIconSize( ToolBoxButtonSize eSet ); - ToolBoxButtonSize GetNotebookbarIconSize() const; - void SetNotebookbarIconSize( ToolBoxButtonSize eSet ); sal_Int16 GetCurrentSymbolsSize() const; bool AreCurrentSymbolsLarge() const; diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index 4e72e97a289d..6ebb4124c9ab 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -49,8 +49,6 @@ using namespace ::com::sun::star; #define PROPERTYHANDLE_SYMBOLSTYLE 1 #define PROPERTYNAME_SIDEBARICONSIZE "SidebarIconSize" #define PROPERTYHANDLE_SIDEBARICONSIZE 2 -#define PROPERTYNAME_NOTEBOOKBARICONSIZE "NotebookbarIconSize" -#define PROPERTYHANDLE_NOTEBOOKBARICONSIZE 3 class SvtMiscOptions_Impl : public ConfigItem { @@ -60,8 +58,6 @@ private: bool m_bIsSymbolsSizeRO; ToolBoxButtonSize m_nSidebarIconSize; bool m_bIsSidebarIconSizeRO; - ToolBoxButtonSize m_nNotebookbarIconSize; - bool m_bIsNotebookbarIconSizeRO; bool m_bIsSymbolsStyleRO; bool m_bIconThemeWasSetAutomatically; @@ -99,15 +95,10 @@ public: ToolBoxButtonSize GetSidebarIconSize() const { return m_nSidebarIconSize; } - ToolBoxButtonSize GetNotebookbarIconSize() const - { return m_nNotebookbarIconSize; } - void SetSymbolsSize( sal_Int16 nSet ); void SetSidebarIconSize( ToolBoxButtonSize nSet ); - void SetNotebookbarIconSize( ToolBoxButtonSize nSet ); - static OUString GetIconTheme(); enum class SetModifiedFlag { SET, DONT_SET }; @@ -161,8 +152,6 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl() , m_bIsSymbolsSizeRO( false ) , m_nSidebarIconSize( ToolBoxButtonSize::DontCare ) , m_bIsSidebarIconSizeRO( false ) - , m_nNotebookbarIconSize( ToolBoxButtonSize::DontCare ) - , m_bIsNotebookbarIconSizeRO( false ) , m_bIsSymbolsStyleRO( false ) , m_bIconThemeWasSetAutomatically( false ) { @@ -207,18 +196,6 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl() break; } - case PROPERTYHANDLE_NOTEBOOKBARICONSIZE : - { - sal_uInt16 nTmp; - if( !(seqValues[nProperty] >>= nTmp) ) - { - OSL_FAIL("Wrong type of \"Misc\\NotebookbarIconSize\"!" ); - } else - m_nNotebookbarIconSize = static_cast<ToolBoxButtonSize>(nTmp); - m_bIsNotebookbarIconSizeRO = seqRO[nProperty]; - break; - } - case PROPERTYHANDLE_SYMBOLSTYLE : { OUString aIconTheme; @@ -281,15 +258,6 @@ void SvtMiscOptions_Impl::Load( const Sequence< OUString >& rPropertyNames ) m_nSidebarIconSize = static_cast<ToolBoxButtonSize>(nTmp); } break; - case PROPERTYHANDLE_NOTEBOOKBARICONSIZE : { - sal_uInt16 nTmp; - if( !(seqValues[nProperty] >>= nTmp ) ) - { - OSL_FAIL("Wrong type of \"Misc\\NotebookbarIconSize\"!" ); - } else - m_nNotebookbarIconSize = static_cast<ToolBoxButtonSize>(nTmp); - } - break; case PROPERTYHANDLE_SYMBOLSTYLE : { OUString aIconTheme; if (seqValues[nProperty] >>= aIconTheme) @@ -332,13 +300,6 @@ void SvtMiscOptions_Impl::SetSidebarIconSize( ToolBoxButtonSize nSet ) CallListeners(); } -void SvtMiscOptions_Impl::SetNotebookbarIconSize( ToolBoxButtonSize nSet ) -{ - m_nNotebookbarIconSize = nSet; - SetModified(); - CallListeners(); -} - OUString SvtMiscOptions_Impl::GetIconTheme() { return Application::GetSettings().GetStyleSettings().DetermineIconTheme(); @@ -406,13 +367,6 @@ void SvtMiscOptions_Impl::ImplCommit() break; } - case PROPERTYHANDLE_NOTEBOOKBARICONSIZE : - { - if ( !m_bIsNotebookbarIconSizeRO ) - seqValues[nProperty] <<= static_cast<sal_uInt16>(m_nNotebookbarIconSize); - break; - } - case PROPERTYHANDLE_SYMBOLSTYLE : { if ( !m_bIsSymbolsStyleRO ) { @@ -443,8 +397,7 @@ Sequence< OUString > SvtMiscOptions_Impl::GetPropertyNames() { PROPERTYNAME_SYMBOLSET, PROPERTYNAME_ICONTHEME, - PROPERTYNAME_SIDEBARICONSIZE, - PROPERTYNAME_NOTEBOOKBARICONSIZE + PROPERTYNAME_SIDEBARICONSIZE }; } @@ -492,21 +445,11 @@ ToolBoxButtonSize SvtMiscOptions::GetSidebarIconSize() const return m_pImpl->GetSidebarIconSize(); } -ToolBoxButtonSize SvtMiscOptions::GetNotebookbarIconSize() const -{ - return m_pImpl->GetNotebookbarIconSize(); -} - void SvtMiscOptions::SetSidebarIconSize( ToolBoxButtonSize nSet ) { m_pImpl->SetSidebarIconSize( nSet ); } -void SvtMiscOptions::SetNotebookbarIconSize( ToolBoxButtonSize nSet ) -{ - m_pImpl->SetNotebookbarIconSize( nSet ); -} - sal_Int16 SvtMiscOptions::GetCurrentSymbolsSize() const { sal_Int16 eOptSymbolsSize = m_pImpl->GetSymbolsSize(); |