summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-15 09:46:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-15 08:40:44 +0000
commit47f323d04ca6174f6d9c20061d84d7a7d727cd61 (patch)
tree3f2e1e5a5141ea849b173b7e53658755c71ce96c
parentc37b72c182894a481819b44b9a2dc9049dce2c61 (diff)
loplugin:constantparam
Change-Id: I1a6e13584ca516f44195e724b39e78360a842c7c Reviewed-on: https://gerrit.libreoffice.org/30859 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--include/svx/langbox.hxx2
-rw-r--r--include/svx/svdedtv.hxx4
-rw-r--r--include/vcl/bitmap.hxx3
-rw-r--r--rsc/inc/rsccont.hxx1
-rw-r--r--rsc/source/parser/rscicpx.cxx2
-rw-r--r--rsc/source/res/rsccont.cxx6
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx4
-rw-r--r--sc/source/ui/inc/checklistmenu.hxx2
-rw-r--r--svx/source/dialog/langbox.cxx8
-rw-r--r--svx/source/svdraw/svdedtv2.cxx14
-rw-r--r--vcl/source/gdi/bitmap4.cxx5
11 files changed, 25 insertions, 26 deletions
diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx
index a32e5f0ee452..6aeb86776d44 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 bcec800008d0..342ec3072bfc 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 0f773ba0da6a..95f715d5f7e5 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 07f29fd9b5d1..69a66f74848f 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 857d4aa61291..9927113a0b67 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 1f4ce70df5d0..2ffa8d3d83e9 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 9327e0099ed8..fd56093da389 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 44a0da483918..1ee9e7bdc102 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 69be7aaa7c94..ad29e4c7e6ca 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 bdd86ba25797..d0a15ece7dc6 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 cc7b7daebcde..256832883a0a 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;