[Libreoffice-commits] core.git: include/vcl reportdesign/source sd/source svtools/source svx/source vcl/inc vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Nov 15 10:20:34 UTC 2018


 include/vcl/BitmapGaussianSeparableBlurFilter.hxx       |    6 +--
 include/vcl/button.hxx                                  |    2 -
 include/vcl/settings.hxx                                |   27 +++++++------
 include/vcl/weld.hxx                                    |    4 +-
 reportdesign/source/ui/report/DesignView.cxx            |    2 -
 reportdesign/source/ui/report/ViewsWindow.cxx           |    3 -
 sd/source/ui/slidesorter/view/SlsToolTip.cxx            |    6 +--
 svtools/source/control/valueset.cxx                     |    2 -
 svx/source/tbxctrls/SvxColorValueSet.cxx                |    4 --
 svx/source/xoutdev/xtabdash.cxx                         |    2 -
 svx/source/xoutdev/xtablend.cxx                         |    2 -
 vcl/inc/font/OpenTypeFeatureDefinitonList.hxx           |    2 -
 vcl/inc/fontinstance.hxx                                |    2 -
 vcl/inc/salinst.hxx                                     |    2 -
 vcl/inc/unx/glyphcache.hxx                              |    2 -
 vcl/source/app/help.cxx                                 |    7 +--
 vcl/source/app/settings.cxx                             |   31 ++++++----------
 vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx |    2 -
 vcl/source/control/menubtn.cxx                          |    2 -
 vcl/source/control/spinbtn.cxx                          |    8 ++--
 vcl/source/control/spinfld.cxx                          |    6 +--
 vcl/source/font/fontinstance.cxx                        |    2 -
 vcl/source/treelist/treelistbox.cxx                     |    5 +-
 vcl/source/window/brdwin.cxx                            |    2 -
 vcl/source/window/builder.cxx                           |    6 +--
 vcl/source/window/settings.cxx                          |    2 -
 vcl/source/window/split.cxx                             |    6 +--
 vcl/source/window/window.cxx                            |    2 -
 vcl/source/window/window2.cxx                           |    4 +-
 vcl/source/window/winproc.cxx                           |    9 ++--
 30 files changed, 74 insertions(+), 88 deletions(-)

New commits:
commit 5b51b98b668925f955d50d0fe796762ee05eb487
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Nov 15 08:54:11 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Nov 15 11:20:02 2018 +0100

    loplugin:staticmethods in vcl
    
    Change-Id: I00333677db711761510a35dfae5ce70d61fb9491
    Reviewed-on: https://gerrit.libreoffice.org/63397
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/vcl/BitmapGaussianSeparableBlurFilter.hxx b/include/vcl/BitmapGaussianSeparableBlurFilter.hxx
index b3388cd0990d..51e4b934fdb9 100644
--- a/include/vcl/BitmapGaussianSeparableBlurFilter.hxx
+++ b/include/vcl/BitmapGaussianSeparableBlurFilter.hxx
@@ -36,9 +36,9 @@ public:
 private:
     double const mfRadius;
 
-    bool convolutionPass(Bitmap& rBitmap, Bitmap& aNewBitmap, BitmapReadAccess const* pReadAcc,
-                         int aNumberOfContributions, const double* pWeights, int const* pPixels,
-                         const int* pCount) const;
+    static bool convolutionPass(Bitmap& rBitmap, Bitmap& aNewBitmap,
+                                BitmapReadAccess const* pReadAcc, int aNumberOfContributions,
+                                const double* pWeights, int const* pPixels, const int* pCount);
 
     static std::vector<double> makeBlurKernel(const double radius, int& rows);
     static void blurContributions(const int aSize, const int aNumberOfContributions,
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 76e16bf6dfb5..e4edc323a93b 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -291,7 +291,7 @@ private:
     bool            mbStateChanged;
     Link<RadioButton&,void> maToggleHdl;
     SAL_DLLPRIVATE void     ImplInitRadioButtonData();
-    SAL_DLLPRIVATE WinBits  ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle );
+    static SAL_DLLPRIVATE WinBits  ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle );
     SAL_DLLPRIVATE void     ImplInitSettings( bool bBackground );
     SAL_DLLPRIVATE void     ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext);
     SAL_DLLPRIVATE void     ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 6eb7be25d438..c70da34cb993 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -114,20 +114,20 @@ public:
     void                            SetStartDragHeight( long nDragHeight );
     long                            GetStartDragHeight() const;
 
-    sal_uInt16                      GetStartDragCode() const;
+    static sal_uInt16               GetStartDragCode();
 
-    sal_uInt16                      GetContextMenuCode() const;
+    static sal_uInt16               GetContextMenuCode();
 
-    sal_uInt16                      GetContextMenuClicks() const;
+    static sal_uInt16               GetContextMenuClicks();
 
-    sal_uLong                       GetScrollRepeat() const;
+    static sal_uLong                GetScrollRepeat();
 
-    sal_uLong                       GetButtonStartRepeat() const;
+    static sal_uLong                GetButtonStartRepeat();
 
     void                            SetButtonRepeat( sal_uLong nRepeat );
     sal_uLong                       GetButtonRepeat() const;
 
-    sal_uLong                       GetActionDelay() const;
+    static sal_uLong                GetActionDelay();
 
     void                            SetMenuDelay( sal_uLong nDelay );
     sal_uLong                       GetMenuDelay() const;
@@ -478,7 +478,7 @@ public:
     void                            SetTabFont( const vcl::Font& rFont );
     const vcl::Font&                GetTabFont() const;
 
-    long                            GetBorderSize() const;
+    static long                     GetBorderSize();
 
     void                            SetTitleHeight( long nSize );
     long                            GetTitleHeight() const;
@@ -495,7 +495,7 @@ public:
     void                            SetSpinSize( long nSize );
     long                            GetSpinSize() const;
 
-    long                            GetSplitSize() const;
+    static long                     GetSplitSize();
 
     void                            SetCursorSize( long nSize );
     long                            GetCursorSize() const;
@@ -592,12 +592,12 @@ public:
 
     // maximum row/line count for the ColorValueSet control. If more lines would be needed, a scrollbar will
     // be used.
-    sal_uInt16                      GetColorValueSetMaximumRowCount() const;
+    static sal_uInt16               GetColorValueSetMaximumRowCount();
 
     const Size&                     GetListBoxPreviewDefaultPixelSize() const;
 
     // the default LineWidth for ListBox UI previews (LineStyle, LineDash, LineStartEnd). Default is 1.
-    sal_uInt16                      GetListBoxPreviewDefaultLineWidth() const;
+    static sal_uInt16               GetListBoxPreviewDefaultLineWidth();
 
     // defines if previews which contain potentially transparent objects (e.g. the dash/line/LineStartEnd previews and others)
     // use the default transparent visualization background (checkered background) as it has got standard in graphic programs nowadays
@@ -645,10 +645,10 @@ class VCL_DLLPUBLIC HelpSettings
 public:
                                     HelpSettings();
 
-    sal_uLong                       GetTipDelay() const;
+    static sal_uLong                GetTipDelay();
     void                            SetTipTimeout( sal_uLong nTipTimeout );
     sal_uLong                       GetTipTimeout() const;
-    sal_uLong                       GetBalloonDelay() const;
+    static sal_uLong                GetBalloonDelay();
 
     bool                            operator ==( const HelpSettings& rSet ) const;
     bool                            operator !=( const HelpSettings& rSet ) const;
@@ -699,7 +699,8 @@ public:
     const vcl::I18nHelper&                  GetLocaleI18nHelper() const;
     const vcl::I18nHelper&                  GetUILocaleI18nHelper() const;
 
-    AllSettingsFlags                        GetWindowUpdate() const;
+    static AllSettingsFlags                 GetWindowUpdate()
+    { return AllSettingsFlags::MOUSE | AllSettingsFlags::STYLE | AllSettingsFlags::MISC | AllSettingsFlags::LOCALE; }
 
     AllSettingsFlags                        Update( AllSettingsFlags nFlags, const AllSettings& rSettings );
     AllSettingsFlags                        GetChangeFlags( const AllSettings& rSettings ) const;
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 14b06007c3f1..13b127c9138a 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -969,8 +969,8 @@ protected:
 
     void signal_value_changed() { m_aValueChangedHdl.Call(*this); }
 
-    tools::Time ConvertValue(int nValue) const;
-    int ConvertValue(const tools::Time& rTime) const;
+    static tools::Time ConvertValue(int nValue);
+    static int ConvertValue(const tools::Time& rTime);
     OUString format_number(int nValue) const;
     void update_width_chars();
 
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index fd743dfa85f7..b46a44d10cf9 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -231,7 +231,7 @@ void ODesignView::resizeDocumentView(tools::Rectangle& _rPlayground)
         if ( m_aSplitWin->IsItemValid(TASKPANE_ID) )
         {
             // normalize the split pos
-            const long nSplitterWidth = GetSettings().GetStyleSettings().GetSplitSize();
+            const long nSplitterWidth = StyleSettings::GetSplitSize();
             Point aTaskPanePos(nSplitPos + nSplitterWidth, _rPlayground.Top());
             if (m_pTaskPane && m_pTaskPane->IsVisible() && m_pPropWin)
             {
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 9e4bbf84cf69..8c6decf83582 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -204,8 +204,7 @@ void OViewsWindow::impl_resizeSectionWindow(OSectionWindow& _rSectionWindow,Poin
     {
         aSectionSize.setHeight( nMinHeight );
     }
-    const StyleSettings& rSettings = GetSettings().GetStyleSettings();
-    aSectionSize.AdjustHeight(static_cast<long>(rSettings.GetSplitSize() * static_cast<double>(_rSectionWindow.GetMapMode().GetScaleY())) );
+    aSectionSize.AdjustHeight(static_cast<long>(StyleSettings::GetSplitSize() * static_cast<double>(_rSectionWindow.GetMapMode().GetScaleY())) );
 
     if ( _bSet )
         _rSectionWindow.SetPosSizePixel(_rStartPoint,aSectionSize);
diff --git a/sd/source/ui/slidesorter/view/SlsToolTip.cxx b/sd/source/ui/slidesorter/view/SlsToolTip.cxx
index 4245b03b4c25..df492bcb23a9 100644
--- a/sd/source/ui/slidesorter/view/SlsToolTip.cxx
+++ b/sd/source/ui/slidesorter/view/SlsToolTip.cxx
@@ -40,11 +40,9 @@ ToolTip::ToolTip (SlideSorter& rSlideSorter)
       maShowTimer(),
       maHiddenTimer()
 {
-    sd::Window *window = rSlideSorter.GetContentWindow().get();
-    const HelpSettings& rHelpSettings = window->GetSettings().GetHelpSettings();
-    maShowTimer.SetTimeout(rHelpSettings.GetTipDelay());
+    maShowTimer.SetTimeout(HelpSettings::GetTipDelay());
     maShowTimer.SetInvokeHandler(LINK(this, ToolTip, DelayTrigger));
-    maHiddenTimer.SetTimeout(rHelpSettings.GetTipDelay());
+    maHiddenTimer.SetTimeout(HelpSettings::GetTipDelay());
 }
 
 ToolTip::~ToolTip()
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 87f9a61993de..bc37cf818ec2 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -1084,7 +1084,7 @@ void ValueSet::ImplTracking( const Point& rPos, bool bRepeat )
         if ( ImplScroll( rPos ) && mbSelection )
         {
             maTimer.SetInvokeHandler( LINK( this, ValueSet, ImplTimerHdl ) );
-            maTimer.SetTimeout( GetSettings().GetMouseSettings().GetScrollRepeat() );
+            maTimer.SetTimeout( MouseSettings::GetScrollRepeat() );
             maTimer.Start();
         }
     }
diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx
index ef7a6c5393b6..fed3bb9c50f9 100644
--- a/svx/source/tbxctrls/SvxColorValueSet.cxx
+++ b/svx/source/tbxctrls/SvxColorValueSet.cxx
@@ -39,9 +39,7 @@ VCL_BUILDER_FACTORY_CONSTRUCTOR(SvxColorValueSet, WB_TABSTOP)
 
 sal_uInt32 SvxColorValueSet::getMaxRowCount()
 {
-    const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
-
-    return rStyleSettings.GetColorValueSetMaximumRowCount();
+    return StyleSettings::GetColorValueSetMaximumRowCount();
 }
 
 sal_uInt32 SvxColorValueSet::getEntryEdgeLength()
diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx
index 2b890ca5b198..9efd16a141fd 100644
--- a/svx/source/xoutdev/xtabdash.cxx
+++ b/svx/source/xoutdev/xtabdash.cxx
@@ -90,7 +90,7 @@ BitmapEx XDashList::ImpCreateBitmapForXDash(const XDash* pDash)
 
     // prepare LineAttribute
     const basegfx::BColor aLineColor(rStyleSettings.GetFieldTextColor().getBColor());
-    const double fLineWidth(rStyleSettings.GetListBoxPreviewDefaultLineWidth() * (nFactor * 1.1));
+    const double fLineWidth(StyleSettings::GetListBoxPreviewDefaultLineWidth() * (nFactor * 1.1));
     const drawinglayer::attribute::LineAttribute aLineAttribute(
         aLineColor,
         fLineWidth);
diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx
index e70016af4149..bc254322ce06 100644
--- a/svx/source/xoutdev/xtablend.cxx
+++ b/svx/source/xoutdev/xtablend.cxx
@@ -100,7 +100,7 @@ BitmapEx XLineEndList::CreateBitmapForUI( long nIndex )
 
         // prepare LineAttribute
         const basegfx::BColor aLineColor(rStyleSettings.GetFieldTextColor().getBColor());
-        const double fLineWidth(rStyleSettings.GetListBoxPreviewDefaultLineWidth() * 1.1);
+        const double fLineWidth(StyleSettings::GetListBoxPreviewDefaultLineWidth() * 1.1);
         const drawinglayer::attribute::LineAttribute aLineAttribute(
             aLineColor,
             fLineWidth);
diff --git a/vcl/inc/font/OpenTypeFeatureDefinitonList.hxx b/vcl/inc/font/OpenTypeFeatureDefinitonList.hxx
index 740043bbff56..01fbf6bfc091 100644
--- a/vcl/inc/font/OpenTypeFeatureDefinitonList.hxx
+++ b/vcl/inc/font/OpenTypeFeatureDefinitonList.hxx
@@ -31,7 +31,7 @@ private:
     void init();
 
     static bool isSpecialFeatureCode(sal_uInt32 nFeatureCode);
-    FeatureDefinition handleSpecialFeatureCode(sal_uInt32 nFeatureCode);
+    static FeatureDefinition handleSpecialFeatureCode(sal_uInt32 nFeatureCode);
 
 public:
     OpenTypeFeatureDefinitonListPrivate();
diff --git a/vcl/inc/fontinstance.hxx b/vcl/inc/fontinstance.hxx
index 5e1d70ad9600..58bcd07927a0 100644
--- a/vcl/inc/fontinstance.hxx
+++ b/vcl/inc/fontinstance.hxx
@@ -84,7 +84,7 @@ protected:
     virtual bool ImplGetGlyphBoundRect(sal_GlyphId, tools::Rectangle&, bool) const = 0;
 
     // Takes ownership of pHbFace.
-    hb_font_t* InitHbFont(hb_face_t* pHbFace) const;
+    static hb_font_t* InitHbFont(hb_face_t* pHbFace);
     virtual hb_font_t* ImplInitHbFont() { assert(false); return nullptr; }
     inline void ReleaseHbFont();
 
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index 1d400e5f9bae..f48cca4136e2 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -161,7 +161,7 @@ public:
     virtual OpenGLContext*  CreateOpenGLContext() = 0;
 
     virtual weld::Builder* CreateBuilder(weld::Widget* pParent, const OUString& rUIRoot, const OUString& rUIFile);
-            weld::Builder* CreateInterimBuilder(vcl::Window* pParent, const OUString& rUIRoot, const OUString& rUIFile);
+    static  weld::Builder* CreateInterimBuilder(vcl::Window* pParent, const OUString& rUIRoot, const OUString& rUIFile);
     virtual weld::MessageDialog* CreateMessageDialog(weld::Widget* pParent, VclMessageType eMessageType,
                                                      VclButtonsType eButtonType, const OUString& rPrimaryMessage);
     virtual weld::Window* GetFrameWeld(const css::uno::Reference<css::awt::XWindow>& rWindow);
diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx
index 185d42cb683d..59811d6a144a 100644
--- a/vcl/inc/unx/glyphcache.hxx
+++ b/vcl/inc/unx/glyphcache.hxx
@@ -70,7 +70,7 @@ public:
     void                    ClearFontOptions();
 
 private:
-    void                    InitFreetype();
+    static void             InitFreetype();
     void                    GarbageCollect();
     FreetypeFont*           CreateFont(LogicalFontInstance* pLogicalFont);
 
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index d3ae8f7923f0..b7143be84d20 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -427,11 +427,10 @@ void HelpTextWindow::ShowHelp( sal_uInt16 nDelayMode )
             nTimeout = 15;
         else
         {
-            const HelpSettings& rHelpSettings = GetSettings().GetHelpSettings();
             if ( mnHelpWinStyle == HELPWINSTYLE_QUICK )
-                nTimeout = rHelpSettings.GetTipDelay();
+                nTimeout = HelpSettings::GetTipDelay();
             else
-                nTimeout = rHelpSettings.GetBalloonDelay();
+                nTimeout = HelpSettings::GetBalloonDelay();
         }
 
         if ( nDelayMode == HELPDELAY_SHORT )
@@ -540,7 +539,7 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
         return;
 
     sal_uInt64 nCurTime = tools::Time::GetSystemTicks();
-    if  (   ( ( nCurTime - pSVData->maHelpData.mnLastHelpHideTime ) < pParent->GetSettings().GetHelpSettings().GetTipDelay() )
+    if  (   ( ( nCurTime - pSVData->maHelpData.mnLastHelpHideTime ) < HelpSettings::GetTipDelay() )
         ||  ( nStyle & QuickHelpFlags::NoDelay )
         )
         nDelayMode = HELPDELAY_NONE;
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index fc43e8bd244d..2dbc330b17fe 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -314,31 +314,31 @@ MouseSettings::GetStartDragHeight() const
 }
 
 sal_uInt16
-MouseSettings::GetStartDragCode() const
+MouseSettings::GetStartDragCode()
 {
     return MOUSE_LEFT;
 }
 
 sal_uInt16
-MouseSettings::GetContextMenuCode() const
+MouseSettings::GetContextMenuCode()
 {
     return MOUSE_RIGHT;
 }
 
 sal_uInt16
-MouseSettings::GetContextMenuClicks() const
+MouseSettings::GetContextMenuClicks()
 {
     return 1;
 }
 
 sal_uLong
-MouseSettings::GetScrollRepeat() const
+MouseSettings::GetScrollRepeat()
 {
     return 100;
 }
 
 sal_uLong
-MouseSettings::GetButtonStartRepeat() const
+MouseSettings::GetButtonStartRepeat()
 {
     return 370;
 }
@@ -357,7 +357,7 @@ MouseSettings::GetButtonRepeat() const
 }
 
 sal_uLong
-MouseSettings::GetActionDelay() const
+MouseSettings::GetActionDelay()
 {
     return 250;
 }
@@ -1666,7 +1666,7 @@ StyleSettings::GetTabFont() const
 }
 
 long
-StyleSettings::GetBorderSize() const
+StyleSettings::GetBorderSize()
 {
     return 1;
 }
@@ -1737,7 +1737,7 @@ StyleSettings::GetSpinSize() const
 }
 
 long
-StyleSettings::GetSplitSize() const
+StyleSettings::GetSplitSize()
 {
     return 3;
 }
@@ -1951,13 +1951,13 @@ StyleSettings::GetColorValueSetColumnCount() const
 }
 
 sal_uInt16
-StyleSettings::GetColorValueSetMaximumRowCount() const
+StyleSettings::GetColorValueSetMaximumRowCount()
 {
     return 10;
 }
 
 sal_uInt16
-StyleSettings::GetListBoxPreviewDefaultLineWidth() const
+StyleSettings::GetListBoxPreviewDefaultLineWidth()
 {
     return 1;
 }
@@ -2517,7 +2517,7 @@ bool HelpSettings::operator ==( const HelpSettings& rSet ) const
 }
 
 sal_uLong
-HelpSettings::GetTipDelay() const
+HelpSettings::GetTipDelay()
 {
     return 500;
 }
@@ -2540,7 +2540,7 @@ HelpSettings::GetTipTimeout() const
 }
 
 sal_uLong
-HelpSettings::GetBalloonDelay() const
+HelpSettings::GetBalloonDelay()
 {
     return 1500;
 }
@@ -2987,13 +2987,6 @@ AllSettings::GetHelpSettings() const
     return mxData->maHelpSettings;
 }
 
-AllSettingsFlags
-AllSettings::GetWindowUpdate() const
-{
-    return AllSettingsFlags::MOUSE | AllSettingsFlags::STYLE |
-           AllSettingsFlags::MISC | AllSettingsFlags::LOCALE;
-}
-
 bool
 AllSettings::operator !=( const AllSettings& rSet ) const
 {
diff --git a/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx b/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx
index 38b417929bb3..1826d19f12db 100644
--- a/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx
+++ b/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx
@@ -86,7 +86,7 @@ bool BitmapGaussianSeparableBlurFilter::convolutionPass(Bitmap& rBitmap, Bitmap&
                                                         BitmapReadAccess const* pReadAcc,
                                                         int aNumberOfContributions,
                                                         const double* pWeights, int const* pPixels,
-                                                        const int* pCount) const
+                                                        const int* pCount)
 {
     if (!pReadAcc)
         return false;
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index 6aa89d937b8b..c6f6123c1a92 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -158,7 +158,7 @@ void MenuButton::MouseButtonDown( const MouseEvent& rMEvt )
                 mpMenuTimer->SetInvokeHandler( LINK( this, MenuButton, ImplMenuTimeoutHdl ) );
             }
 
-            mpMenuTimer->SetTimeout( GetSettings().GetMouseSettings().GetActionDelay() );
+            mpMenuTimer->SetTimeout( MouseSettings::GetActionDelay() );
             mpMenuTimer->Start();
 
             PushButton::MouseButtonDown( rMEvt );
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index 14d9fea61e2c..fe277456a613 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -35,7 +35,7 @@ void SpinButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
     mnValue     = 0;
     mnValueStep = 1;
 
-    maRepeatTimer.SetTimeout(GetSettings().GetMouseSettings().GetButtonStartRepeat());
+    maRepeatTimer.SetTimeout(MouseSettings::GetButtonStartRepeat());
     maRepeatTimer.SetInvokeHandler(LINK(this, SpinButton, ImplTimeout));
 
     mbRepeat = 0 != (nStyle & WB_REPEAT);
@@ -57,7 +57,7 @@ SpinButton::SpinButton( vcl::Window* pParent, WinBits nStyle )
 
 IMPL_LINK(SpinButton, ImplTimeout, Timer*, pTimer, void)
 {
-    if (pTimer->GetTimeout() == GetSettings().GetMouseSettings().GetButtonStartRepeat())
+    if (pTimer->GetTimeout() == MouseSettings::GetButtonStartRepeat())
     {
         pTimer->SetTimeout( GetSettings().GetMouseSettings().GetButtonRepeat() );
         pTimer->Start();
@@ -205,7 +205,7 @@ void SpinButton::MouseButtonUp( const MouseEvent& )
     if ( mbRepeat )
     {
         maRepeatTimer.Stop();
-        maRepeatTimer.SetTimeout(GetSettings().GetMouseSettings().GetButtonStartRepeat() );
+        maRepeatTimer.SetTimeout(MouseSettings::GetButtonStartRepeat() );
     }
 
     if ( mbUpperIn )
@@ -321,7 +321,7 @@ void SpinButton::StateChanged( StateChangedType nType )
             if ( maRepeatTimer.IsActive() )
             {
                 maRepeatTimer.Stop();
-                maRepeatTimer.SetTimeout( GetSettings().GetMouseSettings().GetButtonStartRepeat() );
+                maRepeatTimer.SetTimeout( MouseSettings::GetButtonStartRepeat() );
             }
             mbRepeat = bNewRepeat;
         }
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index f73ecec535c8..57c6542f3a8c 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -328,7 +328,7 @@ void SpinField::ImplInit(vcl::Window* pParent, WinBits nWinStyle)
         SetSubEdit(mpEdit);
 
         maRepeatTimer.SetInvokeHandler(LINK( this, SpinField, ImplTimeout));
-        maRepeatTimer.SetTimeout(GetSettings().GetMouseSettings().GetButtonStartRepeat());
+        maRepeatTimer.SetTimeout(MouseSettings::GetButtonStartRepeat());
         if (nWinStyle & WB_REPEAT)
             mbRepeat = true;
 
@@ -421,7 +421,7 @@ void SpinField::MouseButtonUp(const MouseEvent& rMEvt)
     ReleaseMouse();
     mbInitialUp = mbInitialDown = false;
     maRepeatTimer.Stop();
-    maRepeatTimer.SetTimeout(GetSettings().GetMouseSettings().GetButtonStartRepeat());
+    maRepeatTimer.SetTimeout(MouseSettings::GetButtonStartRepeat());
 
     if (mbUpperIn)
     {
@@ -943,7 +943,7 @@ Size SpinField::CalcSize(sal_Int32 nChars) const
 
 IMPL_LINK( SpinField, ImplTimeout, Timer*, pTimer, void )
 {
-    if ( pTimer->GetTimeout() == GetSettings().GetMouseSettings().GetButtonStartRepeat() )
+    if ( pTimer->GetTimeout() == MouseSettings::GetButtonStartRepeat() )
     {
         pTimer->SetTimeout( GetSettings().GetMouseSettings().GetButtonRepeat() );
         pTimer->Start();
diff --git a/vcl/source/font/fontinstance.cxx b/vcl/source/font/fontinstance.cxx
index 5b83587c0261..595259731db1 100644
--- a/vcl/source/font/fontinstance.cxx
+++ b/vcl/source/font/fontinstance.cxx
@@ -65,7 +65,7 @@ LogicalFontInstance::~LogicalFontInstance()
         hb_font_destroy(m_pHbFont);
 }
 
-hb_font_t* LogicalFontInstance::InitHbFont(hb_face_t* pHbFace) const
+hb_font_t* LogicalFontInstance::InitHbFont(hb_face_t* pHbFace)
 {
     assert(pHbFace);
     hb_font_t* pHbFont = hb_font_create(pHbFace);
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index 667503bb7300..54102dc44ede 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -3131,9 +3131,8 @@ Size SvTreeListBox::GetOptimalSize() const
         aRet.AdjustWidth(aWidth );
     if (GetStyle() & WB_BORDER)
     {
-        const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
-        aRet.AdjustWidth(rStyleSettings.GetBorderSize() * 2 );
-        aRet.AdjustHeight(rStyleSettings.GetBorderSize() * 2 );
+        aRet.AdjustWidth(StyleSettings::GetBorderSize() * 2 );
+        aRet.AdjustHeight(StyleSettings::GetBorderSize() * 2 );
     }
     long nMinWidth = nMinWidthInChars * approximate_char_width();
     aRet.setWidth( std::max(aRet.Width(), nMinWidth) );
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index ef2f0569e580..08121d571ac5 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1289,7 +1289,7 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
     else if ( pData->mnTitleType == BorderWindowTitleType::Tearoff )
         pData->mnBorderSize = 0;
     else
-        pData->mnBorderSize = rStyleSettings.GetBorderSize();
+        pData->mnBorderSize = StyleSettings::GetBorderSize();
     pData->mnLeftBorder     = aCalcRect.Left();
     pData->mnTopBorder      = aCalcRect.Top();
     pData->mnRightBorder    = aRect.Right()-aCalcRect.Right();
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index fe81a0f36016..179bf1b21859 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -143,7 +143,7 @@ weld::Builder* Application::CreateBuilder(weld::Widget* pParent, const OUString
 
 weld::Builder* Application::CreateInterimBuilder(vcl::Window* pParent, const OUString &rUIFile)
 {
-    return ImplGetSVData()->mpDefInst->CreateInterimBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile);
+    return SalInstance::CreateInterimBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile);
 }
 
 weld::MessageDialog* Application::CreateMessageDialog(weld::Widget* pParent, VclMessageType eMessageType,
@@ -314,14 +314,14 @@ namespace weld
         m_xSpinButton->set_width_chars(chars);
     }
 
-    tools::Time TimeSpinButton::ConvertValue(int nValue) const
+    tools::Time TimeSpinButton::ConvertValue(int nValue)
     {
         tools::Time aTime(0);
         aTime.MakeTimeFromMS(nValue);
         return aTime;
     }
 
-    int TimeSpinButton::ConvertValue(const tools::Time& rTime) const
+    int TimeSpinButton::ConvertValue(const tools::Time& rTime)
     {
         return rTime.GetMSFromTime();
     }
diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx
index ce85784ab0f1..636e5febec71 100644
--- a/vcl/source/window/settings.cxx
+++ b/vcl/source/window/settings.cxx
@@ -92,7 +92,7 @@ void Window::UpdateSettings( const AllSettings& rSettings, bool bChild )
     }
 
     AllSettings aOldSettings(*mxSettings);
-    AllSettingsFlags nChangeFlags = mxSettings->Update( mxSettings->GetWindowUpdate(), rSettings );
+    AllSettingsFlags nChangeFlags = mxSettings->Update( AllSettings::GetWindowUpdate(), rSettings );
 
     // recalculate AppFont-resolution and DPI-resolution
     ImplInitResolutionSettings();
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index bedb5ab01009..5955ea174ab8 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -61,12 +61,12 @@ void Splitter::ImplInitHorVer(bool bNew)
     if ( mbHorzSplit )
     {
         ePointerStyle = PointerStyle::HSplit;
-        SetSizePixel( Size( rSettings.GetSplitSize(), rSettings.GetScrollBarSize() ) );
+        SetSizePixel( Size( StyleSettings::GetSplitSize(), rSettings.GetScrollBarSize() ) );
     }
     else
     {
         ePointerStyle = PointerStyle::VSplit;
-        SetSizePixel( Size( rSettings.GetScrollBarSize(), rSettings.GetSplitSize() ) );
+        SetSizePixel( Size( rSettings.GetScrollBarSize(), StyleSettings::GetSplitSize() ) );
     }
 
     SetPointer( Pointer( ePointerStyle ) );
@@ -199,7 +199,7 @@ bool Splitter::ImplSplitterActive()
     bool bActive = true;
     const StyleSettings& rSettings = GetSettings().GetStyleSettings();
     long nA = rSettings.GetScrollBarSize();
-    long nB = rSettings.GetSplitSize();
+    long nB = StyleSettings::GetSplitSize();
 
     Size aSize = GetOutputSize();
     if ( mbHorzSplit )
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 7609d1ea11b3..8af6a6010dcf 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2035,7 +2035,7 @@ long Window::CalcTitleWidth() const
         long nTitleWidth = GetTextWidth( GetText() );
         const_cast<vcl::Window*>(this)->SetFont( aFont );
         nTitleWidth += rStyleSettings.GetTitleHeight() * 3;
-        nTitleWidth += rStyleSettings.GetBorderSize() * 2;
+        nTitleWidth += StyleSettings::GetBorderSize() * 2;
         nTitleWidth += 10;
         return nTitleWidth;
     }
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 45bbfaf7ef9a..922b4b4ab161 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -261,9 +261,9 @@ void Window::StartTracking( StartTrackingFlags nFlags )
         pSVData->maWinData.mpTrackTimer = new AutoTimer;
 
         if ( nFlags & StartTrackingFlags::ScrollRepeat )
-            pSVData->maWinData.mpTrackTimer->SetTimeout( GetSettings().GetMouseSettings().GetScrollRepeat() );
+            pSVData->maWinData.mpTrackTimer->SetTimeout( MouseSettings::GetScrollRepeat() );
         else
-            pSVData->maWinData.mpTrackTimer->SetTimeout( GetSettings().GetMouseSettings().GetButtonStartRepeat() );
+            pSVData->maWinData.mpTrackTimer->SetTimeout( MouseSettings::GetButtonStartRepeat() );
         pSVData->maWinData.mpTrackTimer->SetInvokeHandler( LINK( this, Window, ImplTrackTimerHdl ) );
         pSVData->maWinData.mpTrackTimer->SetDebugName( "vcl::Window pSVData->maWinData.mpTrackTimer" );
         pSVData->maWinData.mpTrackTimer->Start();
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index cf8608615517..0079d85a8dab 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -448,7 +448,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
             // change immediately to the copy mode
             const MouseSettings& rMSettings = pMouseDownWin->GetSettings().GetMouseSettings();
             if ( (nCode & (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE)) ==
-                 (rMSettings.GetStartDragCode() & (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE)) )
+                 (MouseSettings::GetStartDragCode() & (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE)) )
             {
                 if ( !pMouseDownWin->ImplGetFrameData()->mbStartDragCalled )
                 {
@@ -586,7 +586,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
                     pChild->ImplGetFrameData()->mnFirstMouseY      = nMouseY;
                     pChild->ImplGetFrameData()->mnFirstMouseCode   = nCode;
                     pChild->ImplGetFrameData()->mbStartDragCalled  = (nCode & (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE)) !=
-                                                                     (rMSettings.GetStartDragCode() & (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE));
+                                                                     (MouseSettings::GetStartDragCode() & (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE));
                 }
                 pChild->ImplGetFrameData()->mnMouseDownTime = nMsgTime;
             }
@@ -763,9 +763,8 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
         else
         {
             // ContextMenu
-            const MouseSettings& rMSettings = pChild->GetSettings().GetMouseSettings();
-            if ( (nCode == rMSettings.GetContextMenuCode()) &&
-                 (nClicks == rMSettings.GetContextMenuClicks()) )
+            if ( (nCode == MouseSettings::GetContextMenuCode()) &&
+                 (nClicks == MouseSettings::GetContextMenuClicks()) )
             {
                 bool bContextMenu = (nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN);
                 if ( bContextMenu )


More information about the Libreoffice-commits mailing list