diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2016-08-16 12:38:05 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <s.mehrbrodt@gmail.com> | 2016-08-16 14:42:12 +0000 |
commit | aa2aa4a6d25874b5c3bb751bd42574b838f75fe2 (patch) | |
tree | 09f4e77b233455d8c79abb9bc6982f5062e4a1ae /svtools | |
parent | 76de7bbf3625efd9f4eeb2183bb0bd22e7a795db (diff) |
GSoC notebookbar: icon size switching
+ added entry in the Options > View
+ changed sfxlo-SidebarToolBox to sfxlo-NotebookbarToolBox
in the Notebookbar ui files
Change-Id: Id5719953be9830b650af96d54e63936c553cda74
Reviewed-on: https://gerrit.libreoffice.org/28169
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/config/miscopt.cxx | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index 63fe6a60685a..dd42ca08adbe 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -64,6 +64,8 @@ using namespace ::com::sun::star; #define PROPERTYHANDLE_MACRORECORDERMODE 9 #define PROPERTYNAME_SIDEBARICONSIZE "SidebarIconSize" #define PROPERTYHANDLE_SIDEBARICONSIZE 10 +#define PROPERTYNAME_NOTEBOOKBARICONSIZE "NotebookbarIconSize" +#define PROPERTYHANDLE_NOTEBOOKBARICONSIZE 11 #define VCL_TOOLBOX_STYLE_FLAT ((sal_uInt16)0x0004) // from <vcl/toolbox.hxx> @@ -79,6 +81,8 @@ private: bool m_bIsSymbolsSizeRO; sal_Int16 m_nSidebarIconSize; bool m_bIsSidebarIconSizeRO; + sal_Int16 m_nNotebookbarIconSize; + bool m_bIsNotebookbarIconSizeRO; bool m_bIsSymbolsStyleRO; sal_Int16 m_nToolboxStyle; bool m_bIsToolboxStyleRO; @@ -153,10 +157,15 @@ public: inline sal_Int16 GetSidebarIconSize() { return m_nSidebarIconSize; } + inline sal_Int16 GetNotebookbarIconSize() + { return m_nNotebookbarIconSize; } + void SetSymbolsSize( sal_Int16 nSet ); void SetSidebarIconSize( sal_Int16 nSet ); + void SetNotebookbarIconSize( sal_Int16 nSet ); + static OUString GetIconTheme(); enum class SetModifiedFlag { SET, DONT_SET }; @@ -236,6 +245,8 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl() , m_bIsSymbolsSizeRO( false ) , m_nSidebarIconSize( 0 ) , m_bIsSidebarIconSizeRO( false ) + , m_nNotebookbarIconSize( 0 ) + , m_bIsNotebookbarIconSizeRO( false ) , m_bIsSymbolsStyleRO( false ) , m_nToolboxStyle( 1 ) , m_bIsToolboxStyleRO( false ) @@ -296,6 +307,16 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl() break; } + case PROPERTYHANDLE_NOTEBOOKBARICONSIZE : + { + if( !(seqValues[nProperty] >>= m_nNotebookbarIconSize) ) + { + OSL_FAIL("Wrong type of \"Misc\\NotebookbarIconSize\"!" ); + } + m_bIsNotebookbarIconSizeRO = seqRO[nProperty]; + break; + } + case PROPERTYHANDLE_TOOLBOXSTYLE : { if( !(seqValues[nProperty] >>= m_nToolboxStyle) ) @@ -432,6 +453,13 @@ void SvtMiscOptions_Impl::Load( const Sequence< OUString >& rPropertyNames ) } } break; + case PROPERTYHANDLE_NOTEBOOKBARICONSIZE : { + if( !(seqValues[nProperty] >>= m_nNotebookbarIconSize) ) + { + OSL_FAIL("Wrong type of \"Misc\\NotebookbarIconSize\"!" ); + } + } + break; case PROPERTYHANDLE_TOOLBOXSTYLE : { if( !(seqValues[nProperty] >>= m_nToolboxStyle) ) { @@ -521,6 +549,13 @@ void SvtMiscOptions_Impl::SetSidebarIconSize( sal_Int16 nSet ) CallListeners(); } +void SvtMiscOptions_Impl::SetNotebookbarIconSize( sal_Int16 nSet ) +{ + m_nNotebookbarIconSize = nSet; + SetModified(); + CallListeners(); +} + OUString SvtMiscOptions_Impl::GetIconTheme() { return Application::GetSettings().GetStyleSettings().DetermineIconTheme(); @@ -595,6 +630,13 @@ void SvtMiscOptions_Impl::ImplCommit() break; } + case PROPERTYHANDLE_NOTEBOOKBARICONSIZE : + { + if ( !m_bIsNotebookbarIconSizeRO ) + seqValues[nProperty] <<= m_nNotebookbarIconSize; + break; + } + case PROPERTYHANDLE_TOOLBOXSTYLE : { if ( !m_bIsToolboxStyleRO ) @@ -677,7 +719,8 @@ Sequence< OUString > SvtMiscOptions_Impl::GetPropertyNames() OUString(PROPERTYNAME_DISABLEUICUSTOMIZATION), OUString(PROPERTYNAME_EXPERIMENTALMODE), OUString(PROPERTYNAME_MACRORECORDERMODE), - OUString(PROPERTYNAME_SIDEBARICONSIZE) + OUString(PROPERTYNAME_SIDEBARICONSIZE), + OUString(PROPERTYNAME_NOTEBOOKBARICONSIZE) }; // Initialize return sequence with these list ... @@ -749,11 +792,21 @@ sal_Int16 SvtMiscOptions::GetSidebarIconSize() const return m_pImpl->GetSidebarIconSize(); } +sal_Int16 SvtMiscOptions::GetNotebookbarIconSize() const +{ + return m_pImpl->GetNotebookbarIconSize(); +} + void SvtMiscOptions::SetSidebarIconSize( sal_Int16 nSet ) { m_pImpl->SetSidebarIconSize( nSet ); } +void SvtMiscOptions::SetNotebookbarIconSize( sal_Int16 nSet ) +{ + m_pImpl->SetNotebookbarIconSize( nSet ); +} + sal_Int16 SvtMiscOptions::GetCurrentSymbolsSize() const { sal_Int16 eOptSymbolsSize = m_pImpl->GetSymbolsSize(); |