diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-05-22 17:18:06 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-05-22 23:01:32 +0200 |
commit | 6f1c83b3a84705b8efb4745d8c6c62025ea48f37 (patch) | |
tree | 9c06579f0a49ca4b2af4d662975ac0d1ec32eec8 /include/vcl | |
parent | 4a149da412dc72fa92c944edc91cc96eb7267636 (diff) |
VCL refactor duplicate code in Toolbox
Moves duplicate code from ImplInitSettings and ApplySettings into
their own functions.
Change-Id: I65b5a052b171a661ee22762e373745c28779a9e9
Reviewed-on: https://gerrit.libreoffice.org/72790
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/toolbox.hxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx index 115b9e32261d..19e02a0d85e7 100644 --- a/include/vcl/toolbox.hxx +++ b/include/vcl/toolbox.hxx @@ -40,6 +40,7 @@ struct ImplToolItem; struct ImplToolBoxPrivateData; class PopupMenu; class VclMenuEvent; +class StyleSettings; #define TOOLBOX_STYLE_FLAT (sal_uInt16(0x0004)) @@ -251,12 +252,15 @@ public: SAL_DLLPRIVATE ImplToolItems::size_type ImplCalcLines( long nToolSize ) const; SAL_DLLPRIVATE sal_uInt16 ImplTestLineSize( const Point& rPos ) const; SAL_DLLPRIVATE void ImplLineSizing( const Point& rPos, tools::Rectangle& rRect, sal_uInt16 nLineMode ); - static SAL_DLLPRIVATE ImplToolItems::size_type ImplFindItemPos( const ImplToolItem* pItem, const ImplToolItems& rList ); + SAL_DLLPRIVATE static ImplToolItems::size_type ImplFindItemPos( const ImplToolItem* pItem, const ImplToolItems& rList ); SAL_DLLPRIVATE void ImplDrawMenuButton(vcl::RenderContext& rRenderContext, bool bHighlight); SAL_DLLPRIVATE void ImplDrawButton(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, sal_uInt16 highlight, bool bChecked, bool bEnabled, bool bIsWindow); SAL_DLLPRIVATE ImplToolItems::size_type ImplCountLineBreaks() const; SAL_DLLPRIVATE ImplToolBoxPrivateData* ImplGetToolBoxPrivateData() const { return mpData.get(); } + SAL_DLLPRIVATE void ApplyBackgroundSettings(vcl::RenderContext&, const StyleSettings&); + SAL_DLLPRIVATE void ApplyForegroundSettings(vcl::RenderContext&, const StyleSettings&); + protected: virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; void SetCurItemId(sal_uInt16 nSet) |