diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-01 08:40:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-01 11:06:26 +0200 |
commit | 612b489d3e05b24c1b6690082e8518bac033e9d2 (patch) | |
tree | 23a6c556989071385d1c64730ed72bdbae7c239c /svx/source | |
parent | 17e14d459dea201b57be2d8e677fa776ead03291 (diff) |
loplugin:checkunusedparams
the "check for taking address of function" part was generating false+
Change-Id: Iad6203850901229b7b1b2f8938c68ec703cd343f
Reviewed-on: https://gerrit.libreoffice.org/40613
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 6 | ||||
-rw-r--r-- | svx/source/dialog/svxruler.cxx | 28 | ||||
-rw-r--r-- | svx/source/form/fmtextcontrolshell.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdobj.cxx | 6 | ||||
-rw-r--r-- | svx/source/toolbars/extrusionbar.cxx | 4 | ||||
-rw-r--r-- | svx/source/toolbars/fontworkbar.cxx | 4 | ||||
-rw-r--r-- | svx/source/xoutdev/xattr.cxx | 6 | ||||
-rw-r--r-- | svx/source/xoutdev/xattrbmp.cxx | 1 |
8 files changed, 17 insertions, 46 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index cefeb456d3e3..18b4965e87f4 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -551,7 +551,7 @@ void CalcDistances( const tools::Polygon& rPoly, std::vector< double >& rDistanc } } -void InsertMissingOutlinePoints( const tools::Polygon& /*rOutlinePoly*/, const std::vector< double >& rDistances, +void InsertMissingOutlinePoints( const std::vector< double >& rDistances, const tools::Rectangle& rTextAreaBoundRect, tools::Polygon& rPoly ) { sal_uInt16 nSize = rPoly.GetSize(); @@ -749,8 +749,8 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa // create local polygon copy to work on tools::Polygon aLocalPoly(aCandidate); - InsertMissingOutlinePoints( rOutlinePoly, vDistances, rTextAreaBoundRect, aLocalPoly ); - InsertMissingOutlinePoints( rOutlinePoly2, vDistances2, rTextAreaBoundRect, aLocalPoly ); + InsertMissingOutlinePoints( vDistances, rTextAreaBoundRect, aLocalPoly ); + InsertMissingOutlinePoints( vDistances2, rTextAreaBoundRect, aLocalPoly ); sal_uInt16 _nPointCount = aLocalPoly.GetSize(); if (_nPointCount) diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 307c31b51863..a506345821c3 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -2572,19 +2572,6 @@ void SvxRuler::Click() } } -bool SvxRuler::CalcLimits ( long& nMax1, // minimum value to be set - long& nMax2, // minimum value to be set - bool ) -{ - /* - Default implementation of the virtual function; the application can be - overridden to implement customized limits. The values are based on the page. - */ - nMax1 = LONG_MIN; - nMax2 = LONG_MAX; - return false; -} - void SvxRuler::CalcMinMax() { /* @@ -2966,19 +2953,8 @@ void SvxRuler::CalcMinMax() // ObjectItem else { - if(mxObjectItem->HasLimits()) - { - if(CalcLimits(nMaxLeft, nMaxRight, (nIdx & 1) == 0)) - { - nMaxLeft = ConvertPosPixel(nMaxLeft); - nMaxRight = ConvertPosPixel(nMaxRight); - } - } - else - { - nMaxLeft = LONG_MIN; - nMaxRight = LONG_MAX; - } + nMaxLeft = LONG_MIN; + nMaxRight = LONG_MAX; } break; } diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 4eded5beda73..e32cc0112dd8 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -406,7 +406,7 @@ namespace svx } - OUString lcl_getUnoSlotName( SfxApplication&, SfxSlotId _nSlotId ) + OUString lcl_getUnoSlotName( SfxSlotId _nSlotId ) { OUString sSlotUnoName; @@ -565,7 +565,7 @@ namespace svx #if OSL_DEBUG_LEVEL > 0 OUString sUnoSlotName; if ( SfxGetpApp() ) - sUnoSlotName = lcl_getUnoSlotName( *SfxGetpApp(), nSlotId ); + sUnoSlotName = lcl_getUnoSlotName( nSlotId ); else sUnoSlotName = "<unknown>"; OString sUnoSlotNameAscii( "\"" ); @@ -711,7 +711,7 @@ namespace svx #if OSL_DEBUG_LEVEL > 0 else { - OUString sUnoSlotName = lcl_getUnoSlotName( *SfxGetpApp(), nSlotForItemSet ); + OUString sUnoSlotName = lcl_getUnoSlotName( nSlotForItemSet ); if ( sUnoSlotName.isEmpty() ) sUnoSlotName = "unknown (no SfxSlot)"; SAL_WARN( "svx", "FmTextControShell::executeAttributeDialog: Could not handle the following item:" @@ -1259,7 +1259,7 @@ namespace svx { OSL_PRECOND( _rxProvider.is() && _pApplication, "FmTextControlShell::implGetFeatureDispatcher: invalid arg(s)!" ); URL aFeatureURL; - aFeatureURL.Complete = lcl_getUnoSlotName( *_pApplication, _nSlot ); + aFeatureURL.Complete = lcl_getUnoSlotName( _nSlot ); try { if ( !m_xURLTransformer.is() ) diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index bbb564ed2cb8..2a1881eb974d 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -3099,7 +3099,7 @@ SdrDelayBroadcastObjectChange::~SdrDelayBroadcastObjectChange() } -SdrObject* SdrObjFactory::CreateObjectFromFactory( SdrInventor nInventor, sal_uInt16 nObjIdentifier, SdrPage* , SdrModel* ) +SdrObject* SdrObjFactory::CreateObjectFromFactory( SdrInventor nInventor, sal_uInt16 nObjIdentifier ) { SdrObjCreatorParams aParams { nInventor, nObjIdentifier }; for (const auto & i : ImpGetUserMakeObjHdl()) { @@ -3159,7 +3159,7 @@ SdrObject* SdrObjFactory::MakeNewObject(SdrInventor nInvent, sal_uInt16 nIdent, } if (!pObj) - pObj = CreateObjectFromFactory(nInvent, nIdent, pPage, pModel); + pObj = CreateObjectFromFactory(nInvent, nIdent); if (!pObj) { @@ -3246,7 +3246,7 @@ SdrObject* SdrObjFactory::MakeNewObject( } if (!pObj) - pObj = CreateObjectFromFactory(nInventor, nIdentifier, pPage, pModel); + pObj = CreateObjectFromFactory(nInventor, nIdentifier); if (!pObj) { diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx index 92aa0e7aba11..3245a65aacd1 100644 --- a/svx/source/toolbars/extrusionbar.cxx +++ b/svx/source/toolbars/extrusionbar.cxx @@ -111,7 +111,7 @@ void getLightingDirectionDefaults( const Direction3D **pLighting1Defaults, const *pLighting2Defaults = aLighting2Defaults; }; -static void impl_execute( SdrView*, SfxRequest const & rReq, SdrCustomShapeGeometryItem& rGeometryItem, SdrObject* pObj ) +static void impl_execute( SfxRequest const & rReq, SdrCustomShapeGeometryItem& rGeometryItem, SdrObject* pObj ) { static const char sExtrusion[] = "Extrusion"; static const char sRotateAngle[] = "RotateAngle"; @@ -546,7 +546,7 @@ void ExtrusionBar::execute( SdrView* pSdrView, SfxRequest const & rReq, SfxBindi pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) ); } SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ))); - impl_execute( pSdrView, rReq, aGeometryItem, pObj ); + impl_execute( rReq, aGeometryItem, pObj ); pObj->SetMergedItem( aGeometryItem ); pObj->BroadcastObjectChange(); if( bUndo ) diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx index 8fffcccf549e..f5557b5faaa6 100644 --- a/svx/source/toolbars/fontworkbar.cxx +++ b/svx/source/toolbars/fontworkbar.cxx @@ -246,7 +246,7 @@ bool checkForSelectedFontWork( SdrView const * pSdrView, sal_uInt32& nCheckStatu } } -static void impl_execute( SdrView*, SfxRequest const & rReq, SdrCustomShapeGeometryItem& rGeometryItem, SdrObject* pObj ) +static void impl_execute( SfxRequest const & rReq, SdrCustomShapeGeometryItem& rGeometryItem, SdrObject* pObj ) { sal_uInt16 nSID = rReq.GetSlot(); switch( nSID ) @@ -534,7 +534,7 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest const & rReq, SfxBindin pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) ); } SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ))); - impl_execute( pSdrView, rReq, aGeometryItem, pObj ); + impl_execute( rReq, aGeometryItem, pObj ); pObj->SetMergedItem( aGeometryItem ); pObj->BroadcastObjectChange(); if( bUndo ) diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index 17d40cccc111..9f56324a21fd 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -136,7 +136,7 @@ SvStream& NameOrIndex::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const Argument pPool2 can be null. If returned string equals NameOrIndex->GetName(), the name was already unique. */ -OUString NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uInt16 nWhich, const SfxItemPool* pPool1, const SfxItemPool* /*pPool2*/, SvxCompareValueFunc pCompareValueFunc, const char* pPrefixResId, const XPropertyListRef &pDefaults ) +OUString NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uInt16 nWhich, const SfxItemPool* pPool1, SvxCompareValueFunc pCompareValueFunc, const char* pPrefixResId, const XPropertyListRef &pDefaults ) { bool bForceNew = false; @@ -1005,7 +1005,6 @@ XLineDashItem* XLineDashItem::checkForUniqueItem( SdrModel* pModel ) const { const OUString aUniqueName = NameOrIndex::CheckNamedItem( this, XATTR_LINEDASH, &pModel->GetItemPool(), - pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : nullptr, XLineDashItem::CompareValueFunc, RID_SVXSTR_DASH11, pModel->GetPropertyList( XPropertyListType::Dash ) ); @@ -2734,7 +2733,6 @@ XFillGradientItem* XFillGradientItem::checkForUniqueItem( SdrModel* pModel ) con { const OUString aUniqueName = NameOrIndex::CheckNamedItem( this, Which(), &pModel->GetItemPool(), - pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : nullptr, XFillGradientItem::CompareValueFunc, RID_SVXSTR_GRADIENT, pModel->GetPropertyList( XPropertyListType::Gradient ) ); @@ -2829,7 +2827,6 @@ XFillFloatTransparenceItem* XFillFloatTransparenceItem::checkForUniqueItem( SdrM const OUString aUniqueName = NameOrIndex::CheckNamedItem( this, XATTR_FILLFLOATTRANSPARENCE, &pModel->GetItemPool(), - pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : nullptr, XFillFloatTransparenceItem::CompareValueFunc, RID_SVXSTR_TRASNGR0, XPropertyListRef() ); @@ -3140,7 +3137,6 @@ XFillHatchItem* XFillHatchItem::checkForUniqueItem( SdrModel* pModel ) const { const OUString aUniqueName = NameOrIndex::CheckNamedItem( this, XATTR_FILLHATCH, &pModel->GetItemPool(), - pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : nullptr, XFillHatchItem::CompareValueFunc, RID_SVXSTR_HATCH10, pModel->GetPropertyList( XPropertyListType::Hatch ) ); diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index e3e51300469c..2ffb49bfad19 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -482,7 +482,6 @@ XFillBitmapItem* XFillBitmapItem::checkForUniqueItem( SdrModel* pModel ) const aListType = XPropertyListType::Pattern; const OUString aUniqueName = NameOrIndex::CheckNamedItem( this, XATTR_FILLBITMAP, &pModel->GetItemPool(), - pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : nullptr, XFillBitmapItem::CompareValueFunc, RID_SVXSTR_BMP21, pModel->GetPropertyList( aListType ) ); |