diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-03 10:04:50 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-03 11:15:52 +0200 |
commit | 99469ae7b9e3c6311ad2d5f894345df03efe7587 (patch) | |
tree | 80be711e62770558e437ebd34d02354d88cb23e1 | |
parent | 57de81580dc3a9c53c43871150109181da1bb646 (diff) |
loplugin:unuseddefaultparams in filter
Change-Id: Ife21ac3fc2ede30694a1c7e2f9296105aa548218
-rw-r--r-- | filter/source/flash/swfwriter.cxx | 11 | ||||
-rw-r--r-- | filter/source/flash/swfwriter.hxx | 4 | ||||
-rw-r--r-- | filter/source/graphicfilter/eps/eps.cxx | 36 | ||||
-rw-r--r-- | filter/source/msfilter/dffpropset.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 15 | ||||
-rw-r--r-- | filter/source/msfilter/eschesdo.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/eschesdo.hxx | 7 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 21 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 87 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.hxx | 18 | ||||
-rw-r--r-- | include/filter/msfilter/dffpropset.hxx | 2 | ||||
-rw-r--r-- | include/filter/msfilter/escherex.hxx | 2 | ||||
-rw-r--r-- | include/filter/msfilter/msdffimp.hxx | 3 |
13 files changed, 86 insertions, 126 deletions
diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx index 9a627dcf6782..6838e71b825c 100644 --- a/filter/source/flash/swfwriter.cxx +++ b/filter/source/flash/swfwriter.cxx @@ -206,7 +206,7 @@ void Writer::endSprite() } -void Writer::placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int32 y, sal_uInt16 nClip, const char* pName ) +void Writer::placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int32 y, sal_uInt16 nClip ) { startTag( TAG_PLACEOBJECT2 ); @@ -214,7 +214,7 @@ void Writer::placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int aBits.writeUB( sal_uInt32(nClip != 0), 1 ); // Has Clip Actions? aBits.writeUB( 0, 1 ); // reserved - aBits.writeUB( sal_uInt32(pName != nullptr), 1 ); // has a name + aBits.writeUB( sal_uInt32(0), 1 ); // has a name aBits.writeUB( 0, 1 ); // no ratio aBits.writeUB( 0, 1 ); // no color transform aBits.writeUB( 1, 1 ); // has a matrix @@ -231,9 +231,6 @@ void Writer::placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int _Int16(static_cast<long>(map100thmm(y)*mnDocYScale)))); mpTag->addMatrix( aMatrix ); // transformation matrix - if( pName ) - mpTag->addString( pName ); - if( nClip != 0 ) mpTag->addUI16( nClip ); @@ -285,7 +282,7 @@ void Writer::showFrame() } -sal_uInt16 Writer::defineShape( const GDIMetaFile& rMtf, sal_Int16 x, sal_Int16 y ) +sal_uInt16 Writer::defineShape( const GDIMetaFile& rMtf, sal_Int16 x ) { mpVDev->SetMapMode( rMtf.GetPrefMapMode() ); Impl_writeActions( rMtf ); @@ -304,7 +301,7 @@ sal_uInt16 Writer::defineShape( const GDIMetaFile& rMtf, sal_Int16 x, sal_Int16 sal_uInt16 iDepth = 1; for(; aIter != aEnd; ++aIter) { - placeShape( *aIter, iDepth++, x, y ); + placeShape( *aIter, iDepth++, x, 0 ); } endSprite(); diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx index 198c04948e96..62ac8ca3bd64 100644 --- a/filter/source/flash/swfwriter.hxx +++ b/filter/source/flash/swfwriter.hxx @@ -284,7 +284,7 @@ public: A character id of a flash sprite is returned that contains all geometry from the metafile. */ - sal_uInt16 defineShape( const GDIMetaFile& rMtf, sal_Int16 x = 0, sal_Int16 y = 0 ); + sal_uInt16 defineShape( const GDIMetaFile& rMtf, sal_Int16 x = 0 ); /** defines a bitmap and returns its flash id. */ @@ -293,7 +293,7 @@ public: // control tags /** inserts a place shape tag into the movie stream or the current sprite */ - void placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int32 y, sal_uInt16 nClipDepth = 0, const char* pName = nullptr ); + void placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int32 y, sal_uInt16 nClipDepth = 0 ); /** inserts a remove shape tag into the movie stream or the current sprite */ void removeShape( sal_uInt16 nDepth ); diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index 0704a13f4100..786c1128d732 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -179,14 +179,14 @@ private: void ImplWriteHexByte( sal_uInt8 nNumb, sal_uLong nMode = PS_WRAP ); // writes nNumb as number from 0.000 till 1.000 in ASCII format to stream - void ImplWriteB1( sal_uInt8 nNumb, sal_uLong nMode = PS_SPACE ); + void ImplWriteB1( sal_uInt8 nNumb ); - inline void ImplWritePoint( const Point&, sal_uInt32 nMode = PS_SPACE ); - void ImplMoveTo( const Point&, sal_uInt32 nMode = PS_SPACE ); + inline void ImplWritePoint( const Point& ); + void ImplMoveTo( const Point& ); void ImplLineTo( const Point&, sal_uInt32 nMode = PS_SPACE ); void ImplCurveTo( const Point& rP1, const Point& rP2, const Point& rP3, sal_uInt32 nMode = PS_SPACE ); - void ImplTranslate( const double& fX, const double& fY, sal_uInt32 nMode = PS_RET ); - void ImplScale( const double& fX, const double& fY, sal_uInt32 nMode = PS_RET ); + void ImplTranslate( const double& fX, const double& fY ); + void ImplScale( const double& fX, const double& fY ); void ImplAddPath( const tools::Polygon & rPolygon ); void ImplWriteLineInfo( double fLineWidth, double fMiterLimit, SvtGraphicStroke::CapType eLineCap, @@ -207,7 +207,7 @@ private: void ImplWriteString( const OString&, VirtualDevice& rVDev, const long* pDXArry = nullptr, bool bStretch = false ); void ImplDefineFont( const char*, const char* ); - void ImplClosePathDraw( sal_uLong nMode = PS_RET ); + void ImplClosePathDraw(); void ImplPathDraw(); inline void ImplWriteLineColor( sal_uLong nMode = PS_RET ); @@ -1423,17 +1423,17 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) } } -inline void PSWriter::ImplWritePoint( const Point& rPoint, sal_uInt32 nMode ) +inline void PSWriter::ImplWritePoint( const Point& rPoint ) { ImplWriteDouble( rPoint.X() ); - ImplWriteDouble( rPoint.Y(), nMode ); + ImplWriteDouble( rPoint.Y() ); } -void PSWriter::ImplMoveTo( const Point& rPoint, sal_uInt32 nMode ) +void PSWriter::ImplMoveTo( const Point& rPoint ) { ImplWritePoint( rPoint ); ImplWriteByte( 'm' ); - ImplExecMode( nMode ); + ImplExecMode( PS_SPACE ); } void PSWriter::ImplLineTo( const Point& rPoint, sal_uInt32 nMode ) @@ -1452,20 +1452,20 @@ void PSWriter::ImplCurveTo( const Point& rP1, const Point& rP2, const Point& rP3 ImplExecMode( nMode ); } -void PSWriter::ImplTranslate( const double& fX, const double& fY, sal_uInt32 nMode ) +void PSWriter::ImplTranslate( const double& fX, const double& fY ) { ImplWriteDouble( fX ); ImplWriteDouble( fY ); ImplWriteByte( 't' ); - ImplExecMode( nMode ); + ImplExecMode( PS_RET ); } -void PSWriter::ImplScale( const double& fX, const double& fY, sal_uInt32 nMode ) +void PSWriter::ImplScale( const double& fX, const double& fY ) { ImplWriteDouble( fX ); ImplWriteDouble( fY ); ImplWriteByte( 's' ); - ImplExecMode( nMode ); + ImplExecMode( PS_RET ); } void PSWriter::ImplRect( const Rectangle & rRect ) @@ -2137,11 +2137,11 @@ void PSWriter::ImplDefineFont( const char* pOriginalName, const char* pItalic ) ImplWriteLine( " f" ); } -void PSWriter::ImplClosePathDraw( sal_uLong nMode ) +void PSWriter::ImplClosePathDraw() { mpPS->WriteCharPtr( "pc" ); mnCursorPos += 2; - ImplExecMode( nMode ); + ImplExecMode( PS_RET ); } void PSWriter::ImplPathDraw() @@ -2447,9 +2447,9 @@ void PSWriter::ImplWriteHexByte( sal_uInt8 nNumb, sal_uLong nMode ) // writes the sal_uInt8 nNumb as a Number from 0.000 up to 1.000 -void PSWriter::ImplWriteB1( sal_uInt8 nNumb, sal_uLong nMode ) +void PSWriter::ImplWriteB1( sal_uInt8 nNumb ) { - ImplWriteF( 1000 * ( nNumb + 1 ) / 256 , 3, nMode ); + ImplWriteF( 1000 * ( nNumb + 1 ) / 256 ); } inline void PSWriter::WriteBits( sal_uInt16 nCode, sal_uInt16 nCodeLen ) diff --git a/filter/source/msfilter/dffpropset.cxx b/filter/source/msfilter/dffpropset.cxx index a3517330829a..68eb93f9596e 100644 --- a/filter/source/msfilter/dffpropset.cxx +++ b/filter/source/msfilter/dffpropset.cxx @@ -1284,12 +1284,12 @@ sal_uInt32 DffPropSet::GetPropertyValue( sal_uInt32 nId, sal_uInt32 nDefault ) c return ( mpPropSetEntries[ nId ].aFlags.bSet ) ? mpPropSetEntries[ nId ].nContent : nDefault; }; -bool DffPropSet::GetPropertyBool( sal_uInt32 nId, bool bDefault ) const +bool DffPropSet::GetPropertyBool( sal_uInt32 nId ) const { sal_uInt32 nBaseId = nId | 31; // base ID to get the sal_uInt32 property value sal_uInt32 nMask = 1 << (nBaseId - nId); // bit mask of the boolean property - sal_uInt32 nPropValue = GetPropertyValue( nBaseId, bDefault ? nMask : 0 ); + sal_uInt32 nPropValue = GetPropertyValue( nBaseId, 0 ); return (nPropValue & nMask) != 0; } diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 0dbec5d52a77..b51989eda217 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -5373,17 +5373,12 @@ void EscherEx::Commit( EscherPropertyContainer& rProps, const Rectangle& ) rProps.Commit( GetStream() ); } -sal_uInt32 EscherEx::GetColor( const sal_uInt32 nSOColor, bool bSwap ) +sal_uInt32 EscherEx::GetColor( const sal_uInt32 nSOColor ) { - if ( bSwap ) - { - sal_uInt32 nColor = nSOColor & 0xff00; // Green - nColor |= (sal_uInt8)( nSOColor ) << 16; // Red - nColor |= (sal_uInt8)( nSOColor >> 16 ); // Blue - return nColor; - } - else - return nSOColor & 0xffffff; + sal_uInt32 nColor = nSOColor & 0xff00; // Green + nColor |= (sal_uInt8)( nSOColor ) << 16; // Red + nColor |= (sal_uInt8)( nSOColor >> 16 ); // Blue + return nColor; } sal_uInt32 EscherEx::GetColor( const Color& rSOColor, bool bSwap ) diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 971b65b70c76..6e94cb526c7b 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -822,7 +822,7 @@ bool ImplEESdrWriter::ImplInitPageValues() void ImplEESdrWriter::ImplWritePage( EscherSolverContainer& rSolverContainer, - ImplEESdrPageType ePageType, bool /* bBackGround */ ) + ImplEESdrPageType ePageType ) { ImplInitPageValues(); diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx index e7a089b0d4e0..6a3f58c6ea25 100644 --- a/filter/source/msfilter/eschesdo.hxx +++ b/filter/source/msfilter/eschesdo.hxx @@ -58,8 +58,8 @@ public: sal_Int32 ImplGetInt32PropertyValue( const sal_Unicode* pStr, sal_uInt32 nDef = 0 ) { return ImplGetPropertyValue( pStr ) ? *static_cast<sal_Int32 const *>(mAny.getValue()) : nDef; } - sal_Int32 ImplGetInt32PropertyValue( const OUString& rStr, sal_uInt32 nDef = 0 ) - { return ImplGetInt32PropertyValue(rStr.getStr(), nDef); } + sal_Int32 ImplGetInt32PropertyValue( const OUString& rStr ) + { return ImplGetInt32PropertyValue(rStr.getStr()); } const css::uno::Reference< css::drawing::XShape >& GetShapeRef() const { return mXShape; } const css::uno::Any& GetUsrAny() const { return mAny; } @@ -141,8 +141,7 @@ protected: void ImplWritePage( EscherSolverContainer& rSolver, - ImplEESdrPageType ePageType, - bool bBackGround = false ); + ImplEESdrPageType ePageType ); sal_uInt32 ImplWriteShape( ImplEESdrObject& rObj, EscherSolverContainer& rSolver, diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 28068954df93..1bbd826682fb 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -3290,7 +3290,7 @@ bool SvxMSDffManager::SeekToRec( SvStream& rSt, sal_uInt16 nRecId, sal_uLong nMa return bRet; } -bool SvxMSDffManager::SeekToRec2( sal_uInt16 nRecId1, sal_uInt16 nRecId2, sal_uLong nMaxFilePos, DffRecordHeader* pRecHd, sal_uLong nSkipCount ) const +bool SvxMSDffManager::SeekToRec2( sal_uInt16 nRecId1, sal_uInt16 nRecId2, sal_uLong nMaxFilePos, DffRecordHeader* pRecHd ) const { bool bRet = false; sal_uLong nFPosMerk = rStCtrl.Tell(); // remember FilePos for conditionally later restoration @@ -3301,21 +3301,16 @@ bool SvxMSDffManager::SeekToRec2( sal_uInt16 nRecId1, sal_uInt16 nRecId2, sal_uL break; if ( aHd.nRecType == nRecId1 || aHd.nRecType == nRecId2 ) { - if ( nSkipCount ) - nSkipCount--; + bRet = true; + if ( pRecHd ) + *pRecHd = aHd; else { - bRet = true; - if ( pRecHd ) - *pRecHd = aHd; - else + bool bSeekSuccess = aHd.SeekToBegOfRecord(rStCtrl); + if (!bSeekSuccess) { - bool bSeekSuccess = aHd.SeekToBegOfRecord(rStCtrl); - if (!bSeekSuccess) - { - bRet = false; - break; - } + bRet = false; + break; } } } diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 2caae96f1c4d..67bc12b837ae 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -107,9 +107,9 @@ SVGAttributeWriter::~SVGAttributeWriter() } -double SVGAttributeWriter::ImplRound( double fValue, sal_Int32 nDecs ) +double SVGAttributeWriter::ImplRound( double fValue ) { - return floor( fValue * pow( 10.0, (int)nDecs ) + 0.5 ) / pow( 10.0, (int)nDecs ); + return floor( fValue * pow( 10.0, 3 ) + 0.5 ) / pow( 10.0, 3 ); } @@ -1497,8 +1497,7 @@ void SVGTextWriter::implWriteEmbeddedBitmaps() void SVGTextWriter::writeTextPortion( const Point& rPos, - const OUString& rText, - bool bApplyMapping ) + const OUString& rText ) { if( rText.isEmpty() ) return; @@ -1564,14 +1563,14 @@ void SVGTextWriter::writeTextPortion( const Point& rPos, if( true || !bTextSpecial ) { - implWriteTextPortion( rPos, rText, mpVDev->GetTextColor(), bApplyMapping ); + implWriteTextPortion( rPos, rText, mpVDev->GetTextColor(), true/*bApplyMapping*/ ); } else { // to be implemented } #else - implWriteTextPortion( rPos, rText, mpVDev->GetTextColor(), bApplyMapping ); + implWriteTextPortion( rPos, rText, mpVDev->GetTextColor(), true/*bApplyMapping*/ ); #endif if( bStandAloneTextPortion ) @@ -1918,20 +1917,16 @@ void SVGActionWriter::ImplWriteRect( const Rectangle& rRect, long nRadX, long nR } -void SVGActionWriter::ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY, - bool bApplyMapping ) +void SVGActionWriter::ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY ) { Point aCenter; - if( bApplyMapping ) - ImplMap( rCenter, aCenter ); - else - aCenter = rCenter; + ImplMap( rCenter, aCenter ); mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrCX, OUString::number( aCenter.X() ) ); mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrCY, OUString::number( aCenter.Y() ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRX, OUString::number( bApplyMapping ? ImplMap( nRadX ) : nRadX ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRY, OUString::number( bApplyMapping ? ImplMap( nRadY ) : nRadY ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRX, OUString::number( ImplMap( nRadX ) ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrRY, OUString::number( ImplMap( nRadY ) ) ); { SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemEllipse, true, true ); @@ -1939,12 +1934,11 @@ void SVGActionWriter::ImplWriteEllipse( const Point& rCenter, long nRadX, long n } -void SVGActionWriter::ImplAddLineAttr( const LineInfo &rAttrs, - bool bApplyMapping ) +void SVGActionWriter::ImplAddLineAttr( const LineInfo &rAttrs ) { if ( !rAttrs.IsDefault() ) { - sal_Int32 nStrokeWidth = bApplyMapping ? ImplMap( rAttrs.GetWidth() ) : rAttrs.GetWidth(); + sal_Int32 nStrokeWidth = ImplMap( rAttrs.GetWidth() ); mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStrokeWidth, OUString::number( nStrokeWidth ) ); // support for LineJoint @@ -2015,14 +2009,11 @@ void SVGActionWriter::ImplWritePolyPolygon( const tools::PolyPolygon& rPolyPoly, } -void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape, bool bApplyMapping ) +void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape ) { tools::PolyPolygon aPolyPoly; - if( bApplyMapping ) - ImplMap( rShape.maShapePolyPoly, aPolyPoly ); - else - aPolyPoly = rShape.maShapePolyPoly; + ImplMap( rShape.maShapePolyPoly, aPolyPoly ); const bool bLineOnly = ( rShape.maShapeFillColor == Color( COL_TRANSPARENT ) ) && ( !rShape.mapShapeGradient.get() ); Rectangle aBoundRect( aPolyPoly.GetBoundRect() ); @@ -2034,7 +2025,7 @@ void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape, bool bAp if( rShape.mnStrokeWidth ) { - sal_Int32 nStrokeWidth = ( bApplyMapping ? ImplMap( rShape.mnStrokeWidth ) : rShape.mnStrokeWidth ); + sal_Int32 nStrokeWidth = ImplMap( rShape.mnStrokeWidth ); mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStrokeWidth, OUString::number( nStrokeWidth ) ); } @@ -2090,9 +2081,7 @@ void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape, bool bAp for( size_t k = 0; k < rShape.maDashArray.size(); ++k ) { - const sal_Int32 nDash = ( bApplyMapping ? - ImplMap( FRound( rShape.maDashArray[ k ] ) ) : - FRound( rShape.maDashArray[ k ] ) ); + const sal_Int32 nDash = ImplMap( FRound( rShape.maDashArray[ k ] ) ); if( k ) aDashArrayStr += aComma; @@ -2397,8 +2386,7 @@ void SVGActionWriter::ImplWriteMask( GDIMetaFile& rMtf, void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText, - const long* pDXArray, long nWidth, - bool bApplyMapping ) + const long* pDXArray, long nWidth ) { const FontMetric aMetric( mpVDev->GetFontMetric() ); @@ -2406,7 +2394,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText, if( !bTextSpecial ) { - ImplWriteText( rPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), bApplyMapping ); + ImplWriteText( rPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), true/*bApplyMapping*/ ); } else { @@ -2434,8 +2422,8 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText, aPos += aOffset; } - ImplWriteText( aPos, rText, pDXArray, nWidth, aReliefColor, bApplyMapping ); - ImplWriteText( rPos, rText, pDXArray, nWidth, aTextColor, bApplyMapping ); + ImplWriteText( aPos, rText, pDXArray, nWidth, aReliefColor, true/*bApplyMapping*/ ); + ImplWriteText( rPos, rText, pDXArray, nWidth, aTextColor, true/*bApplyMapping*/ ); } else { @@ -2453,34 +2441,34 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText, Point aPos( rPos ); aPos += Point( nOff, nOff ); - ImplWriteText( aPos, rText, pDXArray, nWidth, aShadowColor, bApplyMapping ); + ImplWriteText( aPos, rText, pDXArray, nWidth, aShadowColor, true/*bApplyMapping*/ ); if( !aMetric.IsOutline() ) { - ImplWriteText( rPos, rText, pDXArray, nWidth, aTextColor, bApplyMapping ); + ImplWriteText( rPos, rText, pDXArray, nWidth, aTextColor, true/*bApplyMapping*/ ); } } if( aMetric.IsOutline() ) { Point aPos = rPos + Point( -6, -6 ); - ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), bApplyMapping ); + ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), true/*bApplyMapping*/ ); aPos = rPos + Point( +6, +6); - ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), bApplyMapping ); + ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), true/*bApplyMapping*/ ); aPos = rPos + Point( -6, +0); - ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), bApplyMapping ); + ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), true/*bApplyMapping*/ ); aPos = rPos + Point( -6, +6); - ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), bApplyMapping ); + ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), true/*bApplyMapping*/ ); aPos = rPos + Point( +0, +6); - ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), bApplyMapping ); + ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), true/*bApplyMapping*/ ); aPos = rPos + Point( +0, -6); - ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), bApplyMapping ); + ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), true/*bApplyMapping*/ ); aPos = rPos + Point( +6, -1); - ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), bApplyMapping ); + ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), true/*bApplyMapping*/ ); aPos = rPos + Point( +6, +0); - ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), bApplyMapping ); + ImplWriteText( aPos, rText, pDXArray, nWidth, mpVDev->GetTextColor(), true/*bApplyMapping*/ ); - ImplWriteText( rPos, rText, pDXArray, nWidth, Color( COL_WHITE ), bApplyMapping ); + ImplWriteText( rPos, rText, pDXArray, nWidth, Color( COL_WHITE ), true/*bApplyMapping*/ ); } } } @@ -2674,8 +2662,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText, void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, - const Point& rSrcPt, const Size& rSrcSz, - bool bApplyMapping ) + const Point& rSrcPt, const Size& rSrcSz ) { if( !!rBmpEx ) { @@ -2699,16 +2686,8 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx, OUStringBuffer aBuffer( "data:image/png;base64," ); ::sax::Converter::encodeBase64( aBuffer, aSeq ); - if( bApplyMapping ) - { - ImplMap( rPt, aPt ); - ImplMap( rSz, aSz ); - } - else - { - aPt = rPt; - aSz = rSz; - } + ImplMap( rPt, aPt ); + ImplMap( rSz, aSz ); mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, OUString::number( aPt.X() ) ); mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, OUString::number( aPt.Y() ) ); diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx index 28c9eae65d0b..5c0107700be4 100644 --- a/filter/source/svg/svgwriter.hxx +++ b/filter/source/svg/svgwriter.hxx @@ -91,7 +91,7 @@ private: SVGAttributeWriter(); - static double ImplRound( double fVal, sal_Int32 nDecs = 3 ); + static double ImplRound( double fVal ); public: @@ -213,8 +213,7 @@ class SVGTextWriter template< typename MetaBitmapActionType > void writeBitmapPlaceholder( const MetaBitmapActionType* pAction ); void implWriteEmbeddedBitmaps(); - void writeTextPortion( const Point& rPos, const OUString& rText, - bool bApplyMapping = true ); + void writeTextPortion( const Point& rPos, const OUString& rText ); void implWriteTextPortion( const Point& rPos, const OUString& rText, Color aTextColor, bool bApplyMapping ); @@ -303,24 +302,21 @@ private: bool bApplyMapping = true ); void ImplWriteRect( const Rectangle& rRect, long nRadX = 0, long nRadY = 0, bool bApplyMapping = true ); - void ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY, - bool bApplyMapping = true ); + void ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY ); void ImplWritePattern( const tools::PolyPolygon& rPolyPoly, const Hatch* pHatch, const Gradient* pGradient, sal_uInt32 nWriteFlags ); - void ImplAddLineAttr( const LineInfo &rAttrs, - bool bApplyMapping = true ); + void ImplAddLineAttr( const LineInfo &rAttrs ); void ImplWritePolyPolygon( const tools::PolyPolygon& rPolyPoly, bool bLineOnly, bool bApplyMapping = true ); - void ImplWriteShape( const SVGShapeDescriptor& rShape, bool bApplyMapping = true ); + void ImplWriteShape( const SVGShapeDescriptor& rShape ); void ImplWriteGradientEx( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, sal_uInt32 nWriteFlags); void ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient ); void ImplWriteGradientStop( const Color& rColor, double fOffset ); static Color ImplGetColorWithIntensity( const Color& rColor, sal_uInt16 nIntensity ); static Color ImplGetGradientColor( const Color& rStartColor, const Color& rEndColor, double fOffset ); void ImplWriteMask( GDIMetaFile& rMtf, const Point& rDestPt, const Size& rDestSize, const Gradient& rGradient, sal_uInt32 nWriteFlags ); - void ImplWriteText( const Point& rPos, const OUString& rText, const long* pDXArray, long nWidth, bool bApplyMapping = true ); + void ImplWriteText( const Point& rPos, const OUString& rText, const long* pDXArray, long nWidth ); void ImplWriteText( const Point& rPos, const OUString& rText, const long* pDXArray, long nWidth, Color aTextColor, bool bApplyMapping ); - void ImplWriteBmp( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, - bool bApplyMapping = true ); + void ImplWriteBmp( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz ); void ImplWriteActions( const GDIMetaFile& rMtf, sal_uInt32 nWriteFlags, diff --git a/include/filter/msfilter/dffpropset.hxx b/include/filter/msfilter/dffpropset.hxx index ff2173c013fd..57da2debe0b4 100644 --- a/include/filter/msfilter/dffpropset.hxx +++ b/include/filter/msfilter/dffpropset.hxx @@ -56,7 +56,7 @@ class MSFILTER_DLLPUBLIC DffPropSet bool IsHardAttribute( sal_uInt32 nId ) const; sal_uInt32 GetPropertyValue( sal_uInt32 nId, sal_uInt32 nDefault ) const; /** Returns a boolean property by its real identifier. */ - bool GetPropertyBool( sal_uInt32 nId, bool bDefault = false ) const; + bool GetPropertyBool( sal_uInt32 nId ) const; /** Returns a string property. */ OUString GetPropertyString( sal_uInt32 nId, SvStream& rStrm ) const; bool SeekToContent( sal_uInt32 nRecType, SvStream& rSt ) const; diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx index c6c9065ac037..9648f66dd2a8 100644 --- a/include/filter/msfilter/escherex.hxx +++ b/include/filter/msfilter/escherex.hxx @@ -1242,7 +1242,7 @@ public: virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect); - static sal_uInt32 GetColor( const sal_uInt32 nColor, bool bSwap = true ); + static sal_uInt32 GetColor( const sal_uInt32 nColor ); static sal_uInt32 GetColor( const Color& rColor, bool bSwap = true ); // ...Sdr... implemented in eschesdo.cxx diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx index fed255e2b488..3e3f414af5fa 100644 --- a/include/filter/msfilter/msdffimp.hxx +++ b/include/filter/msfilter/msdffimp.hxx @@ -526,8 +526,7 @@ public: bool SeekToRec2( sal_uInt16 nRecId1, sal_uInt16 nRecId2, sal_uLong nMaxFilePos, - DffRecordHeader* pRecHd = nullptr, - sal_uLong nSkipCount = 0 ) const; + DffRecordHeader* pRecHd = nullptr ) const; static OUString MSDFFReadZString( SvStream& rIn, sal_uInt32 nMaxLen, |