[Libreoffice-commits] core.git: sw/source

Stephan Bergmann sbergman at redhat.com
Mon Dec 12 13:37:10 UTC 2016


 sw/source/ui/dialog/uiregionsw.cxx |   18 +++++++++++-------
 sw/source/uibase/inc/regionsw.hxx  |    2 --
 2 files changed, 11 insertions(+), 9 deletions(-)

New commits:
commit b472cced4669de6774ffb6a771a4eab4eaee2067
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Dec 12 14:36:24 2016 +0100

    loplugin:staticmethods
    
    Change-Id: Ic8e00ab8961811044c26eb237f283617ddeb5cb6

diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 8eb04e5..0c7af41 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -67,6 +67,17 @@
 
 using namespace ::com::sun::star;
 
+namespace {
+
+Image BuildBitmap(bool bProtect, bool bHidden)
+{
+    if (bProtect)
+        return Image(BitmapEx(SW_RES(bHidden ? RID_BMP_PROT_HIDE : RID_BMP_PROT_NO_HIDE)));
+    return Image(BitmapEx(SW_RES(bHidden ? RID_BMP_HIDE : RID_BMP_NO_HIDE)));
+}
+
+}
+
 static void   lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox );
 
 static void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames, const SwSectionFormat* pNewFormat )
@@ -1366,13 +1377,6 @@ IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent&, rEvent, void )
     }
 }
 
-Image SwEditRegionDlg::BuildBitmap(bool bProtect, bool bHidden)
-{
-    if (bProtect)
-        return Image(BitmapEx(SW_RES(bHidden ? RID_BMP_PROT_HIDE : RID_BMP_PROT_NO_HIDE)));
-    return Image(BitmapEx(SW_RES(bHidden ? RID_BMP_HIDE : RID_BMP_NO_HIDE)));
-}
-
 // helper function - read region names from medium
 static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox )
 {
diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx
index 9abc8c8..cc1a007 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -98,8 +98,6 @@ class SwEditRegionDlg : public SfxModalDialog
     bool            bDontCheckPasswd :1;
     bool            bWeb            :1;
 
-    Image  BuildBitmap(bool bProtect, bool bHidden);
-
     void    RecurseList( const SwSectionFormat* pFormat, SvTreeListEntry* pEntry);
     size_t  FindArrPos(const SwSectionFormat* pFormat);
 


More information about the Libreoffice-commits mailing list