Kaydet (Commit) aa2aa4a6 authored tarafından Szymon Kłos's avatar Szymon Kłos Kaydeden (comit) Samuel Mehrbrodt

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/28169Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarSamuel Mehrbrodt <s.mehrbrodt@gmail.com>
üst 76de7bbf
...@@ -613,6 +613,7 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet) ...@@ -613,6 +613,7 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "OptViewPage", "cui/ui/optviewpage.ui", &rSet) : SfxTabPage(pParent, "OptViewPage", "cui/ui/optviewpage.ui", &rSet)
, nSizeLB_InitialSelection(0) , nSizeLB_InitialSelection(0)
, nSidebarSizeLB_InitialSelection(0) , nSidebarSizeLB_InitialSelection(0)
, nNotebookbarSizeLB_InitialSelection(0)
, nStyleLB_InitialSelection(0) , nStyleLB_InitialSelection(0)
, pAppearanceCfg(new SvtTabAppearanceCfg) , pAppearanceCfg(new SvtTabAppearanceCfg)
, pCanvasSettings(new CanvasSettings) , pCanvasSettings(new CanvasSettings)
...@@ -621,6 +622,7 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet) ...@@ -621,6 +622,7 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
{ {
get(m_pIconSizeLB, "iconsize"); get(m_pIconSizeLB, "iconsize");
get(m_pSidebarIconSizeLB, "sidebariconsize"); get(m_pSidebarIconSizeLB, "sidebariconsize");
get(m_pNotebookbarIconSizeLB, "notebookbariconsize");
get(m_pIconStyleLB, "iconstyle"); get(m_pIconStyleLB, "iconstyle");
get(m_pFontAntiAliasing, "aafont"); get(m_pFontAntiAliasing, "aafont");
...@@ -702,6 +704,7 @@ void OfaViewTabPage::dispose() ...@@ -702,6 +704,7 @@ void OfaViewTabPage::dispose()
pAppearanceCfg = nullptr; pAppearanceCfg = nullptr;
m_pIconSizeLB.clear(); m_pIconSizeLB.clear();
m_pSidebarIconSizeLB.clear(); m_pSidebarIconSizeLB.clear();
m_pNotebookbarIconSizeLB.clear();
m_pIconStyleLB.clear(); m_pIconStyleLB.clear();
m_pFontAntiAliasing.clear(); m_pFontAntiAliasing.clear();
m_pAAPointLimitLabel.clear(); m_pAAPointLimitLabel.clear();
...@@ -776,6 +779,22 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) ...@@ -776,6 +779,22 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
aMiscOptions.SetSidebarIconSize( eSet ); aMiscOptions.SetSidebarIconSize( eSet );
} }
const sal_Int32 nNotebookbarSizeLB_NewSelection = m_pNotebookbarIconSizeLB->GetSelectEntryPos();
if( nNotebookbarSizeLB_InitialSelection != nNotebookbarSizeLB_NewSelection )
{
// from now on it's modified, even if via auto setting the same size was set as now selected in the LB
sal_Int16 eSet = TOOLBOX_BUTTONSIZE_DONTCARE;
switch( nNotebookbarSizeLB_NewSelection )
{
case 0: eSet = TOOLBOX_BUTTONSIZE_DONTCARE; break;
case 1: eSet = TOOLBOX_BUTTONSIZE_SMALL; break;
case 2: eSet = TOOLBOX_BUTTONSIZE_LARGE; break;
default:
OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of m_pNotebookbarIconSizeLB should not be possible!" );
}
aMiscOptions.SetNotebookbarIconSize( eSet );
}
const sal_Int32 nStyleLB_NewSelection = m_pIconStyleLB->GetSelectEntryPos(); const sal_Int32 nStyleLB_NewSelection = m_pIconStyleLB->GetSelectEntryPos();
if( nStyleLB_InitialSelection != nStyleLB_NewSelection ) if( nStyleLB_InitialSelection != nStyleLB_NewSelection )
{ {
...@@ -928,6 +947,10 @@ void OfaViewTabPage::Reset( const SfxItemSet* ) ...@@ -928,6 +947,10 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
nSidebarSizeLB_InitialSelection = aMiscOptions.GetSidebarIconSize(); nSidebarSizeLB_InitialSelection = aMiscOptions.GetSidebarIconSize();
m_pSidebarIconSizeLB->SelectEntryPos( nSidebarSizeLB_InitialSelection ); m_pSidebarIconSizeLB->SelectEntryPos( nSidebarSizeLB_InitialSelection );
m_pSidebarIconSizeLB->SaveValue(); m_pSidebarIconSizeLB->SaveValue();
if( aMiscOptions.GetNotebookbarIconSize() != TOOLBOX_BUTTONSIZE_DONTCARE )
nNotebookbarSizeLB_InitialSelection = aMiscOptions.GetNotebookbarIconSize();
m_pNotebookbarIconSizeLB->SelectEntryPos( nNotebookbarSizeLB_InitialSelection );
m_pNotebookbarIconSizeLB->SaveValue();
if (aMiscOptions.IconThemeWasSetAutomatically()) { if (aMiscOptions.IconThemeWasSetAutomatically()) {
nStyleLB_InitialSelection = 0; nStyleLB_InitialSelection = 0;
......
...@@ -81,6 +81,7 @@ class OfaViewTabPage : public SfxTabPage ...@@ -81,6 +81,7 @@ class OfaViewTabPage : public SfxTabPage
private: private:
VclPtr<ListBox> m_pIconSizeLB; VclPtr<ListBox> m_pIconSizeLB;
VclPtr<ListBox> m_pSidebarIconSizeLB; VclPtr<ListBox> m_pSidebarIconSizeLB;
VclPtr<ListBox> m_pNotebookbarIconSizeLB;
VclPtr<ListBox> m_pIconStyleLB; VclPtr<ListBox> m_pIconStyleLB;
VclPtr<CheckBox> m_pFontAntiAliasing; VclPtr<CheckBox> m_pFontAntiAliasing;
...@@ -104,6 +105,7 @@ private: ...@@ -104,6 +105,7 @@ private:
sal_Int32 nSizeLB_InitialSelection; sal_Int32 nSizeLB_InitialSelection;
sal_Int32 nSidebarSizeLB_InitialSelection; sal_Int32 nSidebarSizeLB_InitialSelection;
sal_Int32 nNotebookbarSizeLB_InitialSelection;
sal_Int32 nStyleLB_InitialSelection; sal_Int32 nStyleLB_InitialSelection;
SvtTabAppearanceCfg* pAppearanceCfg; SvtTabAppearanceCfg* pAppearanceCfg;
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 --> <!-- Generated with glade 3.18.3 -->
<interface> <interface>
<requires lib="gtk+" version="3.0"/> <requires lib="gtk+" version="3.0"/>
<object class="GtkAdjustment" id="adjustment1"> <object class="GtkAdjustment" id="adjustment1">
...@@ -341,7 +341,7 @@ ...@@ -341,7 +341,7 @@
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="top_attach">2</property> <property name="top_attach">3</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -370,7 +370,7 @@ ...@@ -370,7 +370,7 @@
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">2</property> <property name="top_attach">3</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -385,7 +385,7 @@ ...@@ -385,7 +385,7 @@
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">3</property> <property name="top_attach">4</property>
<property name="width">2</property> <property name="width">2</property>
</packing> </packing>
</child> </child>
...@@ -400,7 +400,7 @@ ...@@ -400,7 +400,7 @@
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">4</property> <property name="top_attach">5</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -413,7 +413,7 @@ ...@@ -413,7 +413,7 @@
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="top_attach">4</property> <property name="top_attach">5</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -445,6 +445,35 @@ ...@@ -445,6 +445,35 @@
<property name="top_attach">1</property> <property name="top_attach">1</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">_Notebookbar icon size:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">iconsize</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="notebookbariconsize">
<property name="visible">True</property>
<property name="can_focus">False</property>
<items>
<item translatable="yes">Automatic</item>
<item translatable="yes">Small</item>
<item translatable="yes">Large</item>
</items>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
......
...@@ -43,6 +43,8 @@ public: ...@@ -43,6 +43,8 @@ public:
virtual ~SidebarToolBox(); virtual ~SidebarToolBox();
virtual void dispose() override; virtual void dispose() override;
virtual sal_uInt16 GetIconSize() const;
using ToolBox::InsertItem; using ToolBox::InsertItem;
virtual void InsertItem(const OUString& rCommand, virtual void InsertItem(const OUString& rCommand,
const css::uno::Reference<css::frame::XFrame>& rFrame, const css::uno::Reference<css::frame::XFrame>& rFrame,
......
...@@ -64,6 +64,8 @@ class SVT_DLLPUBLIC SvtMiscOptions: public utl::detail::Options ...@@ -64,6 +64,8 @@ class SVT_DLLPUBLIC SvtMiscOptions: public utl::detail::Options
void SetSymbolsSize( sal_Int16 eSet ); void SetSymbolsSize( sal_Int16 eSet );
sal_Int16 GetSidebarIconSize() const; sal_Int16 GetSidebarIconSize() const;
void SetSidebarIconSize( sal_Int16 eSet ); void SetSidebarIconSize( sal_Int16 eSet );
sal_Int16 GetNotebookbarIconSize() const;
void SetNotebookbarIconSize( sal_Int16 eSet );
sal_Int16 GetCurrentSymbolsSize() const; sal_Int16 GetCurrentSymbolsSize() const;
bool AreCurrentSymbolsLarge() const; bool AreCurrentSymbolsLarge() const;
......
...@@ -5705,6 +5705,30 @@ ...@@ -5705,6 +5705,30 @@
</enumeration> </enumeration>
</constraints> </constraints>
</prop> </prop>
<prop oor:name="NotebookbarIconSize" oor:type="xs:short" oor:nillable="false">
<!-- UIHints: Tools Options General View -->
<info>
<desc>Specifies which size of the icons is used for the
notebookbar.</desc>
</info>
<constraints>
<enumeration oor:value="0">
<info>
<desc>will let the toolbox decide about its size</desc>
</info>
</enumeration>
<enumeration oor:value="1">
<info>
<desc>small icons</desc>
</info>
</enumeration>
<enumeration oor:value="2">
<info>
<desc>large icons</desc>
</info>
</enumeration>
</constraints>
</prop>
<prop oor:name="SymbolStyle" oor:type="xs:string" oor:nillable="false"> <prop oor:name="SymbolStyle" oor:type="xs:string" oor:nillable="false">
<!-- UIHints: Tools Options General View --> <!-- UIHints: Tools Options General View -->
<info> <info>
......
...@@ -242,6 +242,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ ...@@ -242,6 +242,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
sfx2/source/inet/inettbc \ sfx2/source/inet/inettbc \
sfx2/source/notebookbar/DropdownBox \ sfx2/source/notebookbar/DropdownBox \
sfx2/source/notebookbar/NotebookBarPopupMenu \ sfx2/source/notebookbar/NotebookBarPopupMenu \
sfx2/source/notebookbar/NotebookbarToolBox \
sfx2/source/notebookbar/PriorityHBox \ sfx2/source/notebookbar/PriorityHBox \
sfx2/source/notebookbar/SfxNotebookBar \ sfx2/source/notebookbar/SfxNotebookBar \
sfx2/source/notify/eventsupplier \ sfx2/source/notify/eventsupplier \
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sfx2/sidebar/SidebarToolBox.hxx>
#include <vcl/builderfactory.hxx>
#include <svtools/miscopt.hxx>
namespace sfx2 { namespace notebookbar {
class NotebookbarToolBox : public sfx2::sidebar::SidebarToolBox
{
public:
NotebookbarToolBox(vcl::Window* pParentWindow)
: sfx2::sidebar::SidebarToolBox(pParentWindow)
{
ToolBoxButtonSize eSize = TOOLBOX_BUTTONSIZE_SMALL;
SvtMiscOptions aMiscOptions;
sal_uInt16 nSize = GetIconSize();
if (nSize <= TOOLBOX_BUTTONSIZE_LARGE)
eSize = static_cast<ToolBoxButtonSize>(nSize);
SetToolboxButtonSize(eSize);
}
virtual sal_uInt16 GetIconSize() const override
{
SvtMiscOptions aMiscOptions;
return aMiscOptions.GetNotebookbarIconSize();
}
};
VCL_BUILDER_FACTORY(NotebookbarToolBox)
} } // end of namespace sfx2::notebookbar
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -69,7 +69,7 @@ SidebarToolBox::SidebarToolBox (vcl::Window* pParentWindow) ...@@ -69,7 +69,7 @@ SidebarToolBox::SidebarToolBox (vcl::Window* pParentWindow)
SvtMiscOptions aMiscOptions; SvtMiscOptions aMiscOptions;
aMiscOptions.AddListenerLink(LINK(this, SidebarToolBox, ChangedIconSizeHandler)); aMiscOptions.AddListenerLink(LINK(this, SidebarToolBox, ChangedIconSizeHandler));
sal_uInt16 nSize = aMiscOptions.GetSidebarIconSize(); sal_uInt16 nSize = GetIconSize();
if (nSize <= TOOLBOX_BUTTONSIZE_LARGE) if (nSize <= TOOLBOX_BUTTONSIZE_LARGE)
eSize = static_cast<ToolBoxButtonSize>(nSize); eSize = static_cast<ToolBoxButtonSize>(nSize);
...@@ -117,6 +117,12 @@ void SidebarToolBox::dispose() ...@@ -117,6 +117,12 @@ void SidebarToolBox::dispose()
ToolBox::dispose(); ToolBox::dispose();
} }
sal_uInt16 SidebarToolBox::GetIconSize() const
{
SvtMiscOptions aMiscOptions;
return aMiscOptions.GetSidebarIconSize();
}
void SidebarToolBox::InsertItem(const OUString& rCommand, void SidebarToolBox::InsertItem(const OUString& rCommand,
const css::uno::Reference<css::frame::XFrame>& rFrame, const css::uno::Reference<css::frame::XFrame>& rFrame,
ToolBoxItemBits nBits, const Size& rRequestedSize, sal_uInt16 nPos) ToolBoxItemBits nBits, const Size& rRequestedSize, sal_uInt16 nPos)
...@@ -264,8 +270,7 @@ IMPL_LINK_NOARG_TYPED(SidebarToolBox, ChangedIconSizeHandler, LinkParamNone*, vo ...@@ -264,8 +270,7 @@ IMPL_LINK_NOARG_TYPED(SidebarToolBox, ChangedIconSizeHandler, LinkParamNone*, vo
ToolBoxButtonSize eSize = TOOLBOX_BUTTONSIZE_SMALL; ToolBoxButtonSize eSize = TOOLBOX_BUTTONSIZE_SMALL;
SvtMiscOptions aMiscOptions; sal_uInt16 nSize = GetIconSize();
sal_uInt16 nSize = aMiscOptions.GetSidebarIconSize();
if(nSize <= TOOLBOX_BUTTONSIZE_LARGE) if(nSize <= TOOLBOX_BUTTONSIZE_LARGE)
eSize = static_cast<ToolBoxButtonSize>(nSize); eSize = static_cast<ToolBoxButtonSize>(nSize);
...@@ -297,6 +302,7 @@ IMPL_LINK_NOARG_TYPED(SidebarToolBox, ChangedIconSizeHandler, LinkParamNone*, vo ...@@ -297,6 +302,7 @@ IMPL_LINK_NOARG_TYPED(SidebarToolBox, ChangedIconSizeHandler, LinkParamNone*, vo
} }
} }
Resize();
queue_resize(); queue_resize();
} }
......
...@@ -64,6 +64,8 @@ using namespace ::com::sun::star; ...@@ -64,6 +64,8 @@ using namespace ::com::sun::star;
#define PROPERTYHANDLE_MACRORECORDERMODE 9 #define PROPERTYHANDLE_MACRORECORDERMODE 9
#define PROPERTYNAME_SIDEBARICONSIZE "SidebarIconSize" #define PROPERTYNAME_SIDEBARICONSIZE "SidebarIconSize"
#define PROPERTYHANDLE_SIDEBARICONSIZE 10 #define PROPERTYHANDLE_SIDEBARICONSIZE 10
#define PROPERTYNAME_NOTEBOOKBARICONSIZE "NotebookbarIconSize"
#define PROPERTYHANDLE_NOTEBOOKBARICONSIZE 11
#define VCL_TOOLBOX_STYLE_FLAT ((sal_uInt16)0x0004) // from <vcl/toolbox.hxx> #define VCL_TOOLBOX_STYLE_FLAT ((sal_uInt16)0x0004) // from <vcl/toolbox.hxx>
...@@ -79,6 +81,8 @@ private: ...@@ -79,6 +81,8 @@ private:
bool m_bIsSymbolsSizeRO; bool m_bIsSymbolsSizeRO;
sal_Int16 m_nSidebarIconSize; sal_Int16 m_nSidebarIconSize;
bool m_bIsSidebarIconSizeRO; bool m_bIsSidebarIconSizeRO;
sal_Int16 m_nNotebookbarIconSize;
bool m_bIsNotebookbarIconSizeRO;
bool m_bIsSymbolsStyleRO; bool m_bIsSymbolsStyleRO;
sal_Int16 m_nToolboxStyle; sal_Int16 m_nToolboxStyle;
bool m_bIsToolboxStyleRO; bool m_bIsToolboxStyleRO;
...@@ -153,10 +157,15 @@ public: ...@@ -153,10 +157,15 @@ public:
inline sal_Int16 GetSidebarIconSize() inline sal_Int16 GetSidebarIconSize()
{ return m_nSidebarIconSize; } { return m_nSidebarIconSize; }
inline sal_Int16 GetNotebookbarIconSize()
{ return m_nNotebookbarIconSize; }
void SetSymbolsSize( sal_Int16 nSet ); void SetSymbolsSize( sal_Int16 nSet );
void SetSidebarIconSize( sal_Int16 nSet ); void SetSidebarIconSize( sal_Int16 nSet );
void SetNotebookbarIconSize( sal_Int16 nSet );
static OUString GetIconTheme(); static OUString GetIconTheme();
enum class SetModifiedFlag { SET, DONT_SET }; enum class SetModifiedFlag { SET, DONT_SET };
...@@ -236,6 +245,8 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl() ...@@ -236,6 +245,8 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
, m_bIsSymbolsSizeRO( false ) , m_bIsSymbolsSizeRO( false )
, m_nSidebarIconSize( 0 ) , m_nSidebarIconSize( 0 )
, m_bIsSidebarIconSizeRO( false ) , m_bIsSidebarIconSizeRO( false )
, m_nNotebookbarIconSize( 0 )
, m_bIsNotebookbarIconSizeRO( false )
, m_bIsSymbolsStyleRO( false ) , m_bIsSymbolsStyleRO( false )
, m_nToolboxStyle( 1 ) , m_nToolboxStyle( 1 )
, m_bIsToolboxStyleRO( false ) , m_bIsToolboxStyleRO( false )
...@@ -296,6 +307,16 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl() ...@@ -296,6 +307,16 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
break; break;
} }
case PROPERTYHANDLE_NOTEBOOKBARICONSIZE :
{
if( !(seqValues[nProperty] >>= m_nNotebookbarIconSize) )
{
OSL_FAIL("Wrong type of \"Misc\\NotebookbarIconSize\"!" );
}
m_bIsNotebookbarIconSizeRO = seqRO[nProperty];
break;
}
case PROPERTYHANDLE_TOOLBOXSTYLE : case PROPERTYHANDLE_TOOLBOXSTYLE :
{ {
if( !(seqValues[nProperty] >>= m_nToolboxStyle) ) if( !(seqValues[nProperty] >>= m_nToolboxStyle) )
...@@ -432,6 +453,13 @@ void SvtMiscOptions_Impl::Load( const Sequence< OUString >& rPropertyNames ) ...@@ -432,6 +453,13 @@ void SvtMiscOptions_Impl::Load( const Sequence< OUString >& rPropertyNames )
} }
} }
break; break;
case PROPERTYHANDLE_NOTEBOOKBARICONSIZE : {
if( !(seqValues[nProperty] >>= m_nNotebookbarIconSize) )
{
OSL_FAIL("Wrong type of \"Misc\\NotebookbarIconSize\"!" );
}
}
break;
case PROPERTYHANDLE_TOOLBOXSTYLE : { case PROPERTYHANDLE_TOOLBOXSTYLE : {
if( !(seqValues[nProperty] >>= m_nToolboxStyle) ) if( !(seqValues[nProperty] >>= m_nToolboxStyle) )
{ {
...@@ -521,6 +549,13 @@ void SvtMiscOptions_Impl::SetSidebarIconSize( sal_Int16 nSet ) ...@@ -521,6 +549,13 @@ void SvtMiscOptions_Impl::SetSidebarIconSize( sal_Int16 nSet )
CallListeners(); CallListeners();
} }
void SvtMiscOptions_Impl::SetNotebookbarIconSize( sal_Int16 nSet )
{
m_nNotebookbarIconSize = nSet;
SetModified();
CallListeners();
}
OUString SvtMiscOptions_Impl::GetIconTheme() OUString SvtMiscOptions_Impl::GetIconTheme()
{ {
return Application::GetSettings().GetStyleSettings().DetermineIconTheme(); return Application::GetSettings().GetStyleSettings().DetermineIconTheme();
...@@ -595,6 +630,13 @@ void SvtMiscOptions_Impl::ImplCommit() ...@@ -595,6 +630,13 @@ void SvtMiscOptions_Impl::ImplCommit()
break; break;
} }
case PROPERTYHANDLE_NOTEBOOKBARICONSIZE :
{
if ( !m_bIsNotebookbarIconSizeRO )
seqValues[nProperty] <<= m_nNotebookbarIconSize;
break;
}
case PROPERTYHANDLE_TOOLBOXSTYLE : case PROPERTYHANDLE_TOOLBOXSTYLE :
{ {
if ( !m_bIsToolboxStyleRO ) if ( !m_bIsToolboxStyleRO )
...@@ -677,7 +719,8 @@ Sequence< OUString > SvtMiscOptions_Impl::GetPropertyNames() ...@@ -677,7 +719,8 @@ Sequence< OUString > SvtMiscOptions_Impl::GetPropertyNames()
OUString(PROPERTYNAME_DISABLEUICUSTOMIZATION), OUString(PROPERTYNAME_DISABLEUICUSTOMIZATION),
OUString(PROPERTYNAME_EXPERIMENTALMODE), OUString(PROPERTYNAME_EXPERIMENTALMODE),
OUString(PROPERTYNAME_MACRORECORDERMODE), OUString(PROPERTYNAME_MACRORECORDERMODE),
OUString(PROPERTYNAME_SIDEBARICONSIZE) OUString(PROPERTYNAME_SIDEBARICONSIZE),
OUString(PROPERTYNAME_NOTEBOOKBARICONSIZE)
}; };
// Initialize return sequence with these list ... // Initialize return sequence with these list ...
...@@ -749,11 +792,21 @@ sal_Int16 SvtMiscOptions::GetSidebarIconSize() const ...@@ -749,11 +792,21 @@ sal_Int16 SvtMiscOptions::GetSidebarIconSize() const
return m_pImpl->GetSidebarIconSize(); return m_pImpl->GetSidebarIconSize();
} }
sal_Int16 SvtMiscOptions::GetNotebookbarIconSize() const
{
return m_pImpl->GetNotebookbarIconSize();
}
void SvtMiscOptions::SetSidebarIconSize( sal_Int16 nSet ) void SvtMiscOptions::SetSidebarIconSize( sal_Int16 nSet )
{ {
m_pImpl->SetSidebarIconSize( nSet ); m_pImpl->SetSidebarIconSize( nSet );
} }
void SvtMiscOptions::SetNotebookbarIconSize( sal_Int16 nSet )
{
m_pImpl->SetNotebookbarIconSize( nSet );
}
sal_Int16 SvtMiscOptions::GetCurrentSymbolsSize() const sal_Int16 SvtMiscOptions::GetCurrentSymbolsSize() const
{ {
sal_Int16 eOptSymbolsSize = m_pImpl->GetSymbolsSize(); sal_Int16 eOptSymbolsSize = m_pImpl->GetSymbolsSize();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment