[Libreoffice-commits] core.git: include/svx include/vcl rsc/inc rsc/source sc/source svx/source vcl/source

Noel Grandin noel.grandin at collabora.co.uk
Tue Nov 15 08:41:12 UTC 2016


 include/svx/langbox.hxx              |    2 +-
 include/svx/svdedtv.hxx              |    4 ++--
 include/vcl/bitmap.hxx               |    3 +--
 rsc/inc/rsccont.hxx                  |    1 -
 rsc/source/parser/rscicpx.cxx        |    2 +-
 rsc/source/res/rsccont.cxx           |    6 +++---
 sc/source/ui/cctrl/checklistmenu.cxx |    4 ++--
 sc/source/ui/inc/checklistmenu.hxx   |    2 +-
 svx/source/dialog/langbox.cxx        |    8 ++++----
 svx/source/svdraw/svdedtv2.cxx       |   14 +++++++-------
 vcl/source/gdi/bitmap4.cxx           |    5 +++--
 11 files changed, 25 insertions(+), 26 deletions(-)

New commits:
commit 47f323d04ca6174f6d9c20061d84d7a7d727cd61
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Nov 15 09:46:46 2016 +0200

    loplugin:constantparam
    
    Change-Id: I1a6e13584ca516f44195e724b39e78360a842c7c
    Reviewed-on: https://gerrit.libreoffice.org/30859
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx
index a32e5f0..6aeb867 100644
--- a/include/svx/langbox.hxx
+++ b/include/svx/langbox.hxx
@@ -61,7 +61,7 @@ private:
     SvxLanguageBoxBase(const SvxLanguageBoxBase&) = delete;
     SvxLanguageBoxBase& operator=(const SvxLanguageBoxBase&) = delete;
 public:
-    explicit SvxLanguageBoxBase( bool bCheck );
+    explicit SvxLanguageBoxBase();
     virtual ~SvxLanguageBoxBase();
 
     void            SetLanguageList( SvxLanguageListFlags nLangList,
diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index bcec800..342ec30 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -144,8 +144,8 @@ protected:
     // for CombineMarkedObjects
     static bool ImpCanConvertForCombine1(const SdrObject* pObj);
     static bool ImpCanConvertForCombine(const SdrObject* pObj);
-    static basegfx::B2DPolyPolygon ImpGetPolyPolygon1(const SdrObject* pObj, bool bCombine);
-    static basegfx::B2DPolyPolygon ImpGetPolyPolygon(const SdrObject* pObj, bool bCombine);
+    static basegfx::B2DPolyPolygon ImpGetPolyPolygon1(const SdrObject* pObj);
+    static basegfx::B2DPolyPolygon ImpGetPolyPolygon(const SdrObject* pObj);
     static basegfx::B2DPolygon ImpCombineToSinglePolygon(const basegfx::B2DPolyPolygon& rPolyPolygon);
 
     // for DismantleMarkedObjects
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index 0f773ba..95f715d 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -715,8 +715,7 @@ public:
                                 long nR1, long nR2, long nG1, long nG2, long nB1, long nB2,
                                 long nColors, long nPixels, long& rIndex );
 
-    SAL_DLLPRIVATE bool     ImplConvolute3(
-                                const long* pMatrix, long nDivisor );
+    SAL_DLLPRIVATE bool     ImplConvolute3( const long* pMatrix );
 
     SAL_DLLPRIVATE bool     ImplMedianFilter();
     SAL_DLLPRIVATE bool     ImplSobelGrey();
diff --git a/rsc/inc/rsccont.hxx b/rsc/inc/rsccont.hxx
index 07f29fd..69a66f7 100644
--- a/rsc/inc/rsccont.hxx
+++ b/rsc/inc/rsccont.hxx
@@ -55,7 +55,6 @@ protected:
                                  RscTypCont * pTC, sal_uInt32, bool bExtra );
 public:
                     RscBaseCont( Atom nId, sal_uInt32 nTypId,
-                                 RscTop * pSuper,
                                  bool bNoId );
                     virtual ~RscBaseCont() override;
     virtual RSCCLASS_TYPE   GetClassType() const override;
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index 857d4aa..9927113 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -39,7 +39,7 @@ RscTop * RscTypCont::InitClassMgr()
     RscBaseCont *   pClass;
     Atom            nId;
 
-    aBaseLst.push_back( pClass = new RscBaseCont( InvalidAtom, RSC_NOTYPE, nullptr, false ) );
+    aBaseLst.push_back( pClass = new RscBaseCont( InvalidAtom, RSC_NOTYPE, false ) );
 
     nId = pHS->getID( "Resource" );
     pClassMgr = new RscMgr( nId, RSC_RESOURCE, pClass );
diff --git a/rsc/source/res/rsccont.cxx b/rsc/source/res/rsccont.cxx
index 1f4ce70..2ffa8d3 100644
--- a/rsc/source/res/rsccont.cxx
+++ b/rsc/source/res/rsccont.cxx
@@ -35,9 +35,9 @@ void ENTRY_STRUCT::Destroy()
     }
 }
 
-RscBaseCont::RscBaseCont( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper,
+RscBaseCont::RscBaseCont( Atom nId, sal_uInt32 nTypeId,
                           bool bNoIdent )
-    : RscTop(nId, nTypeId, pSuper)
+    : RscTop(nId, nTypeId, nullptr)
     , pTypeClass(nullptr), pTypeClass1(nullptr)
     , bNoId(bNoIdent), nOffInstData(RscTop::Size())
     , nSize(nOffInstData + ALIGNED_SIZE(sizeof(RscBaseContInst)))
@@ -720,7 +720,7 @@ ERRTYPE RscBaseCont::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
 }
 
 RscContWriteSrc::RscContWriteSrc( Atom nId, sal_uInt32 nTypeId )
-    : RscBaseCont( nId, nTypeId, nullptr, true )
+    : RscBaseCont( nId, nTypeId, true )
 {
 }
 
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 9327e00..fd56093 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1610,8 +1610,8 @@ void ScTabStops::clear()
     maControls.clear();
 }
 
-ScCheckListBox::ScCheckListBox( vcl::Window* pParent, WinBits nWinStyle )
-    :  SvTreeListBox( pParent, nWinStyle ), mpCheckButton( nullptr ), mbSeenMouseButtonDown( false )
+ScCheckListBox::ScCheckListBox( vcl::Window* pParent )
+    :  SvTreeListBox( pParent, 0 ), mpCheckButton( nullptr ), mbSeenMouseButtonDown( false )
 {
     Init();
 }
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index 44a0da4..1ee9e7b 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -231,7 +231,7 @@ class ScCheckListBox : public SvTreeListBox
 
     public:
 
-    ScCheckListBox( vcl::Window* pParent, WinBits nWinStyle = 0 );
+    ScCheckListBox( vcl::Window* pParent );
     virtual ~ScCheckListBox() override { disposeOnce(); }
     virtual void dispose() override { delete mpCheckButton; SvTreeListBox::dispose(); }
     void Init();
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 69be7aa..ad29e4c 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -129,12 +129,12 @@ VCL_BUILDER_DECL_FACTORY(SvxLanguageComboBox)
     rRet = pLanguageBox;
 }
 
-SvxLanguageBoxBase::SvxLanguageBoxBase( bool bCheck )
+SvxLanguageBoxBase::SvxLanguageBoxBase()
     : m_pSpellUsedLang(nullptr)
     , m_nLangList(SvxLanguageListFlags::EMPTY)
     , m_bHasLangNone(false)
     , m_bLangNoneIsLangAll(false)
-    , m_bWithCheckmark(bCheck)
+    , m_bWithCheckmark(false)
 {
 }
 
@@ -487,7 +487,7 @@ sal_Int32 SvxLanguageBoxBase::GetSavedValueLBB() const
 
 SvxLanguageBox::SvxLanguageBox( vcl::Window* pParent, WinBits nBits )
     : ListBox( pParent, nBits )
-    , SvxLanguageBoxBase( false )
+    , SvxLanguageBoxBase()
 {
     // display entries sorted
     SetStyle( GetStyle() | WB_SORT );
@@ -497,7 +497,7 @@ SvxLanguageBox::SvxLanguageBox( vcl::Window* pParent, WinBits nBits )
 
 SvxLanguageComboBox::SvxLanguageComboBox( vcl::Window* pParent, WinBits nBits )
     : ComboBox( pParent, nBits )
-    , SvxLanguageBoxBase( false )
+    , SvxLanguageBoxBase()
     , mnSavedValuePos( COMBOBOX_ENTRY_NOTFOUND )
     , meEditedAndValid( EditedAndValid::No )
 {
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index bdd86ba..d0a15ec 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -612,18 +612,18 @@ bool SdrEditView::ImpCanConvertForCombine(const SdrObject* pObj)
     return true;
 }
 
-basegfx::B2DPolyPolygon SdrEditView::ImpGetPolyPolygon1(const SdrObject* pObj, bool bCombine)
+basegfx::B2DPolyPolygon SdrEditView::ImpGetPolyPolygon1(const SdrObject* pObj)
 {
     basegfx::B2DPolyPolygon aRetval;
     const SdrPathObj* pPath = dynamic_cast<const SdrPathObj*>( pObj );
 
-    if(bCombine && pPath && !pObj->GetOutlinerParaObject())
+    if(pPath && !pObj->GetOutlinerParaObject())
     {
         aRetval = pPath->GetPathPoly();
     }
     else
     {
-        SdrObject* pConvObj = pObj->ConvertToPolyObj(bCombine, false);
+        SdrObject* pConvObj = pObj->ConvertToPolyObj(true/*bCombine*/, false);
 
         if(pConvObj)
         {
@@ -661,7 +661,7 @@ basegfx::B2DPolyPolygon SdrEditView::ImpGetPolyPolygon1(const SdrObject* pObj, b
     return aRetval;
 }
 
-basegfx::B2DPolyPolygon SdrEditView::ImpGetPolyPolygon(const SdrObject* pObj, bool bCombine)
+basegfx::B2DPolyPolygon SdrEditView::ImpGetPolyPolygon(const SdrObject* pObj)
 {
     SdrObjList* pOL = pObj->GetSubList();
 
@@ -673,14 +673,14 @@ basegfx::B2DPolyPolygon SdrEditView::ImpGetPolyPolygon(const SdrObject* pObj, bo
         while(aIter.IsMore())
         {
             SdrObject* pObj1 = aIter.Next();
-            aRetval.append(ImpGetPolyPolygon1(pObj1, bCombine));
+            aRetval.append(ImpGetPolyPolygon1(pObj1));
         }
 
         return aRetval;
     }
     else
     {
-        return ImpGetPolyPolygon1(pObj, bCombine);
+        return ImpGetPolyPolygon1(pObj);
     }
 }
 
@@ -1296,7 +1296,7 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly)
             // unfortunately ConvertMarkedToPathObj has converted all
             // involved polygon data to curve segments, even if not necessary.
             // It is better to try to reduce to more simple polygons.
-            basegfx::B2DPolyPolygon aTmpPoly(basegfx::tools::simplifyCurveSegments(ImpGetPolyPolygon(pObj, true)));
+            basegfx::B2DPolyPolygon aTmpPoly(basegfx::tools::simplifyCurveSegments(ImpGetPolyPolygon(pObj)));
             aPolyPolygon.insert(0L, aTmpPoly);
 
             if(!pInsOL)
diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index cc7b7da..2568328 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -66,7 +66,7 @@ bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam )
         case BMP_FILTER_SHARPEN:
         {
             const long pSharpenMatrix[] = { -1, -1,  -1, -1, 16, -1, -1, -1,  -1 };
-            bRet = ImplConvolute3( &pSharpenMatrix[ 0 ], 8 );
+            bRet = ImplConvolute3( &pSharpenMatrix[ 0 ] );
         }
         break;
 
@@ -110,8 +110,9 @@ bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam )
     return bRet;
 }
 
-bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor )
+bool Bitmap::ImplConvolute3( const long* pMatrix )
 {
+    const long          nDivisor = 8;
     BitmapReadAccess*   pReadAcc = AcquireReadAccess();
     bool                bRet = false;
 


More information about the Libreoffice-commits mailing list