diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-16 10:41:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-21 12:44:55 +0100 |
commit | 2dbd02b576f28224204ac962f6ce20fde6687093 (patch) | |
tree | 28b3f8807d5909e7bcc3c5a629dadd6f475ad9d3 /filter | |
parent | 48314f25241e014a634dd5371543b90137ffd2bc (diff) |
loplugin:redundantfcast improvements
check for calls to constructors, and extend the list of types we check
for unnecessary temporary creation
Change-Id: Ia2c1f202b41ed6866779fff5343c821128033eec
Reviewed-on: https://gerrit.libreoffice.org/63472
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/flash/swfwriter1.cxx | 4 | ||||
-rw-r--r-- | filter/source/graphicfilter/eps/eps.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 436c2783d63a..7f51c6ddc9db 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -593,7 +593,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon } basegfx::B2DHomMatrix m(basegfx::utils::createRotateB2DHomMatrix(static_cast<double>(nOrientation) * F_PI1800)); - m.translate( double(aPt.X() / scale), double(aPt.Y()) ); + m.translate( aPt.X() / scale, double(aPt.Y()) ); m.scale( scale, scale ); sal_Int16 nHeight = Int16_( map( Size( 0, aFont.GetFontHeight() ) ).Height() ); @@ -1266,7 +1266,7 @@ void Writer::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegf for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) { const tools::Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); - Impl_writePolyPolygon(tools::PolyPolygon(tools::Polygon(aPolygon)), true ); + Impl_writePolyPolygon(tools::PolyPolygon(aPolygon), true ); } mpVDev->SetLineColor(aOldLineColor); diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index 59d61fcaffd9..b8568ede408d 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -1676,7 +1676,7 @@ void PSWriter::ImplBmp( Bitmap const * pBitmap, Bitmap const * pMaskBitmap, cons if ( mnLevel == 1 && nHeight > 10 ) nHeight = 8; aRect = tools::Rectangle( Point( 0, nHeightOrg - nHeightLeft ), Size( nWidth, nHeight ) ); - aRegion = vcl::Region( pMaskBitmap->CreateRegion( COL_BLACK, aRect ) ); + aRegion = pMaskBitmap->CreateRegion( COL_BLACK, aRect ); if( mnLevel == 1 ) { diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 47360682cacd..0178c1af94ef 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -4538,7 +4538,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r aP.setY( nY ); aXP[ static_cast<sal_uInt16>(nPtNum) ] = aP; } - aPolyBoundRect = tools::Rectangle( aXP.GetBoundRect() ); + aPolyBoundRect = aXP.GetBoundRect(); if ( nNumElemVert >= 3 ) { // arc first command is always wr -- clockwise arc // the parameters are : (left,top),(right,bottom),start(x,y),end(x,y) @@ -6351,7 +6351,7 @@ bool SvxMSDffManager::GetBLIP( sal_uLong nIdx_, Graphic& rGraphic, tools::Rectan if (iter != aEscherBlipCache.end()) { /* if this entry is available */ - rGraphic = Graphic(iter->second); + rGraphic = iter->second; if (rGraphic.GetType() != GraphicType::NONE) bOk = true; else |