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 /filter | |
parent | writerprefect: run astyle (diff) | |
download | core-612b489d3e05b24c1b6690082e8518bac033e9d2.tar.gz core-612b489d3e05b24c1b6690082e8518bac033e9d2.zip |
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 'filter')
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 4 | ||||
-rw-r--r-- | filter/source/svg/impsvgdialog.cxx | 32 | ||||
-rw-r--r-- | filter/source/svg/parserfragments.cxx | 8 | ||||
-rw-r--r-- | filter/source/svg/svgreader.cxx | 34 |
4 files changed, 31 insertions, 47 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 834b8927561d..97ced6128856 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -7228,7 +7228,7 @@ void GetRowPositions( const tools::Rectangle& rSnapRect, const std::set< sal_Int } -void GetColumnPositions( const tools::Rectangle& rSnapRect, const std::set< sal_Int32 >& /* rRows */, +void GetColumnPositions( const tools::Rectangle& rSnapRect, const std::set< sal_Int32 >& rColumns, std::vector< sal_Int32 >& rPositions, sal_Int32 nRow, sal_Int32 nFlags ) { std::set< sal_Int32 >::const_iterator aColumn( rColumns.find( rSnapRect.Left() ) ); @@ -7291,7 +7291,7 @@ void GetLinePositions( const SdrObject* pObj, const std::set< sal_Int32 >& rRows nRow = rRows.size(); nFlags = LinePositionBottom; } - GetColumnPositions( aSnapRect, rRows, rColumns, rPositions, nRow, nFlags ); + GetColumnPositions( aSnapRect, rColumns, rPositions, nRow, nFlags ); } } else diff --git a/filter/source/svg/impsvgdialog.cxx b/filter/source/svg/impsvgdialog.cxx index 62eee7edb76e..4acb378c4926 100644 --- a/filter/source/svg/impsvgdialog.cxx +++ b/filter/source/svg/impsvgdialog.cxx @@ -26,7 +26,7 @@ using namespace com::sun::star::uno; using namespace com::sun::star::beans; -inline sal_Int32 implMap( vcl::Window& /*rWnd*/, sal_Int32 nVal ) +inline sal_Int32 implMap( sal_Int32 nVal ) { return( nVal << 1 ); } @@ -45,34 +45,34 @@ ImpSVGDialog::ImpSVGDialog( vcl::Window* pParent, Sequence< PropertyValue >& rFi mbOldNativeDecoration( false ) { SetText( "SVG Export Options" ); - SetOutputSizePixel( Size( implMap( *this, 177 ), implMap( *this, 77 ) ) ); + SetOutputSizePixel( Size( implMap( 177 ), implMap( 77 ) ) ); maFI->SetText( "Export" ); - maFI->SetPosSizePixel( Point( implMap( *this, 6 ), implMap( *this, 3 ) ), - Size( implMap( *this, 165 ), implMap( *this, 8 ) ) ); + maFI->SetPosSizePixel( Point( implMap( 6 ), implMap( 3 ) ), + Size( implMap( 165 ), implMap( 8 ) ) ); maCBTinyProfile->SetText( "Use SVG Tiny profile" ); - maCBTinyProfile->SetPosSizePixel( Point( implMap( *this, 12 ), implMap( *this, 14 ) ), - Size( implMap( *this, 142 ), implMap( *this, 10 ) ) ); + maCBTinyProfile->SetPosSizePixel( Point( implMap( 12 ), implMap( 14 ) ), + Size( implMap( 142 ), implMap( 10 ) ) ); maCBEmbedFonts->SetText( "Embed fonts" ); - maCBEmbedFonts->SetPosSizePixel( Point( implMap( *this, 12 ), implMap( *this, 27 ) ), - Size( implMap( *this, 142 ), implMap( *this, 10 ) ) ); + maCBEmbedFonts->SetPosSizePixel( Point( implMap( 12 ), implMap( 27 ) ), + Size( implMap( 142 ), implMap( 10 ) ) ); maCBUseNativeDecoration->SetText( "Use SVG native text decoration" ); - maCBUseNativeDecoration->SetPosSizePixel( Point( implMap( *this, 12 ), implMap( *this, 41 ) ), - Size( implMap( *this, 142 ), implMap( *this, 10 ) ) ); + maCBUseNativeDecoration->SetPosSizePixel( Point( implMap( 12 ), implMap( 41 ) ), + Size( implMap( 142 ), implMap( 10 ) ) ); maCBTinyProfile->Check( maConfigItem.ReadBool( SVG_PROP_TINYPROFILE, false ) ); maCBEmbedFonts->Check( maConfigItem.ReadBool( SVG_PROP_EMBEDFONTS, true ) ); maCBUseNativeDecoration->Check( maConfigItem.ReadBool( SVG_PROP_NATIVEDECORATION, true ) ); - maBTOK->SetPosSizePixel( Point( implMap( *this, 12 ), implMap( *this, 57 ) ), - Size( implMap( *this, 50 ), implMap( *this, 14 ) ) ); - maBTCancel->SetPosSizePixel( Point( implMap( *this, 65 ), implMap( *this, 57 ) ), - Size( implMap( *this, 50 ), implMap( *this, 14 ) ) ); - maBTHelp->SetPosSizePixel( Point( implMap( *this, 121 ), implMap( *this, 57 ) ), - Size( implMap( *this, 50 ), implMap( *this, 14 ) ) ); + maBTOK->SetPosSizePixel( Point( implMap( 12 ), implMap( 57 ) ), + Size( implMap( 50 ), implMap( 14 ) ) ); + maBTCancel->SetPosSizePixel( Point( implMap( 65 ), implMap( 57 ) ), + Size( implMap( 50 ), implMap( 14 ) ) ); + maBTHelp->SetPosSizePixel( Point( implMap( 121 ), implMap( 57 ) ), + Size( implMap( 50 ), implMap( 14 ) ) ); maCBTinyProfile->SetToggleHdl( LINK( this, ImpSVGDialog, OnToggleCheckbox ) ); OnToggleCheckbox( *maCBTinyProfile.get() ); diff --git a/filter/source/svg/parserfragments.cxx b/filter/source/svg/parserfragments.cxx index e02fe3feeed4..94ccdab42b49 100644 --- a/filter/source/svg/parserfragments.cxx +++ b/filter/source/svg/parserfragments.cxx @@ -41,7 +41,7 @@ void setFourBitColor( double& rChannel, char nChar ) rChannel = (nVal*16+nVal)/255.0; } -void setEightBitColor( double& rChannel, const char* pStart, const char* ) +void setEightBitColor( double& rChannel, const char* pStart ) { const sal_uInt8 nVal0(hex2int(pStart[0])); const sal_uInt8 nVal1(hex2int(pStart[1])); @@ -124,9 +124,9 @@ namespace { using namespace ::boost::spirit::classic; - auto lambdaSetEightBitColorR = [&self](const char* pStart, const char* nChar){ setEightBitColor(self.m_rColor.r, pStart, nChar); }; - auto lambdaSetEightBitColorG = [&self](const char* pStart, const char* nChar){ setEightBitColor(self.m_rColor.g, pStart, nChar); }; - auto lambdaSetEightBitColorB = [&self](const char* pStart, const char* nChar){ setEightBitColor(self.m_rColor.b, pStart, nChar); }; + auto lambdaSetEightBitColorR = [&self](const char* pStart, const char* /*nChar*/){ setEightBitColor(self.m_rColor.r, pStart); }; + auto lambdaSetEightBitColorG = [&self](const char* pStart, const char* /*nChar*/){ setEightBitColor(self.m_rColor.g, pStart); }; + auto lambdaSetEightBitColorB = [&self](const char* pStart, const char* /*nChar*/){ setEightBitColor(self.m_rColor.b, pStart); }; auto lambdaSetFourBitColorR = [&self](char nChar){ setFourBitColor(self.m_rColor.r, nChar); }; auto lambdaSetFourBitColorG = [&self](char nChar){ setFourBitColor(self.m_rColor.g, nChar); }; auto lambdaSetFourBitColorB = [&self](char nChar){ setFourBitColor(self.m_rColor.b, nChar); }; diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx index 768c93f83031..482a8343dbcd 100644 --- a/filter/source/svg/svgreader.cxx +++ b/filter/source/svg/svgreader.cxx @@ -1391,8 +1391,7 @@ void annotateStyles( StatePool& rStatePoo struct ShapeWritingVisitor { - ShapeWritingVisitor(StatePool& /*rStatePool*/, - StateMap& rStateMap, + ShapeWritingVisitor(StateMap& rStateMap, const uno::Reference<xml::sax::XDocumentHandler>& xDocumentHandler) : mrStateMap(rStateMap), mxDocumentHandler(xDocumentHandler), @@ -1464,7 +1463,6 @@ struct ShapeWritingVisitor writePathShape(xAttrs, xUnoAttrs, - xElem, sStyleId, aPoly); } @@ -1482,7 +1480,6 @@ struct ShapeWritingVisitor writePathShape(xAttrs, xUnoAttrs, - xElem, sStyleId, basegfx::B2DPolyPolygon(aPoly)); break; @@ -1540,7 +1537,6 @@ struct ShapeWritingVisitor writePathShape(xAttrs, xUnoAttrs, - xElem, sStyleId, basegfx::B2DPolyPolygon(aPoly)); } @@ -1566,7 +1562,6 @@ struct ShapeWritingVisitor for( sal_uInt32 i(0L); i<aPoly.count(); ++i ) { writePathShape(xAttrs, xUnoAttrs, - xElem, sStyleId, basegfx::B2DPolyPolygon(aPoly.getB2DPolygon(i))); } @@ -1575,7 +1570,6 @@ struct ShapeWritingVisitor { writePathShape(xAttrs, xUnoAttrs, - xElem, sStyleId, aPoly); } @@ -1612,7 +1606,6 @@ struct ShapeWritingVisitor if ( r > 0 ) writeEllipseShape(xAttrs, xUnoAttrs, - xElem, sStyleId, basegfx::B2DEllipse(basegfx::B2DPoint(cx, cy), basegfx::B2DTuple(r,r))); break; @@ -1651,7 +1644,6 @@ struct ShapeWritingVisitor if ( rx > 0 && ry > 0 ) writeEllipseShape(xAttrs, xUnoAttrs, - xElem, sStyleId, basegfx::B2DEllipse(basegfx::B2DPoint(cx, cy), basegfx::B2DTuple(rx,ry))); break; @@ -1707,7 +1699,7 @@ struct ShapeWritingVisitor parseXlinkHref(aValueUtf8.getStr(), sLinkValue); if (!sLinkValue.isEmpty()) - writeBinaryData(xAttrs, xUnoAttrs, xElem, basegfx::B2DRange(x,y,x+width,y+height), sLinkValue); + writeBinaryData(xAttrs, xUnoAttrs, basegfx::B2DRange(x,y,x+width,y+height), sLinkValue); break; } case XML_TSPAN: @@ -1804,7 +1796,6 @@ struct ShapeWritingVisitor void writeBinaryData( rtl::Reference<SvXMLAttributeList> const & xAttrs, const uno::Reference<xml::sax::XAttributeList>& xUnoAttrs, - const uno::Reference<xml::dom::XElement>& /* xElem */, const basegfx::B2DRange& rShapeBounds, const OUString& data) { @@ -1833,7 +1824,6 @@ struct ShapeWritingVisitor void writeEllipseShape( rtl::Reference<SvXMLAttributeList> const & xAttrs, const uno::Reference<xml::sax::XAttributeList>& xUnoAttrs, - const uno::Reference<xml::dom::XElement>& xElem, const OUString& rStyleId, const basegfx::B2DEllipse& rEllipse) { @@ -1843,13 +1833,11 @@ struct ShapeWritingVisitor basegfx::B2DPolygon aPoly = basegfx::tools::createPolygonFromEllipse(rEllipse.getB2DEllipseCenter(), rEllipse.getB2DEllipseRadius().getX(), rEllipse.getB2DEllipseRadius().getY()); - writePathShape(xAttrs, xUnoAttrs, xElem, rStyleId, basegfx::B2DPolyPolygon(aPoly)); - + writePathShape(xAttrs, xUnoAttrs, rStyleId, basegfx::B2DPolyPolygon(aPoly)); } void writePathShape( rtl::Reference<SvXMLAttributeList> const & xAttrs, const uno::Reference<xml::sax::XAttributeList>& xUnoAttrs, - const uno::Reference<xml::dom::XElement>& xElem, const OUString& rStyleId, const basegfx::B2DPolyPolygon& rPoly ) { @@ -1876,7 +1864,6 @@ struct ShapeWritingVisitor basegfx::tools::adaptiveSubdivideByAngle(aPoly)) : basegfx::tools::getRange(aPoly)); fillShapeProperties(xAttrs, - xElem, aBounds, "svggraphicstyle"+rStyleId); @@ -1900,7 +1887,6 @@ struct ShapeWritingVisitor } void fillShapeProperties( rtl::Reference<SvXMLAttributeList> const & xAttrs, - const uno::Reference<xml::dom::XElement>& /* xElem */, const basegfx::B2DRange& rShapeBounds, const OUString& rStyleName ) { @@ -1932,13 +1918,12 @@ struct ShapeWritingVisitor }; /// Write out shapes from DOM tree -void writeShapes( StatePool& rStatePool, - StateMap& rStateMap, - const uno::Reference<xml::dom::XElement>& rElem, - const uno::Reference<xml::sax::XDocumentHandler>& xDocHdl, - std::vector< uno::Reference<xml::dom::XElement> >& rUseElementVector ) +void writeShapes( StateMap& rStateMap, + const uno::Reference<xml::dom::XElement>& rElem, + const uno::Reference<xml::sax::XDocumentHandler>& xDocHdl, + std::vector< uno::Reference<xml::dom::XElement> >& rUseElementVector ) { - ShapeWritingVisitor aVisitor(rStatePool,rStateMap,xDocHdl); + ShapeWritingVisitor aVisitor(rStateMap,xDocHdl); visitElements(aVisitor, rElem, SHAPE_WRITER); std::vector< uno::Reference<xml::dom::XElement> >::iterator it; @@ -2294,8 +2279,7 @@ bool SVGReader::parseAndConvert() m_xDocumentHandler->startElement("draw:page", xUnoAttrs); // write out all shapes - writeShapes(aStatePool, - aStateMap, + writeShapes(aStateMap, xDocElem, m_xDocumentHandler, aUseElementVector); |