diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-06-03 21:07:19 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-06-05 21:18:00 +0200 |
commit | 905ee1626e8b1938aa49d6e9465f6c27cdeaafa4 (patch) | |
tree | 20c730e854aa21814b614755a57551e8b56fed7b | |
parent | f9efb261dd4a0627ab144aa450c45d07f0420f23 (diff) |
Improved loplugin:cstylecast to reference types: vcl
Change-Id: I86d31a6dcd01700d6ac8712134f82f0cc83e46f6
-rw-r--r-- | include/vcl/graphicfilter.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/octree.hxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winmtf.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/alpha.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/bitmap3.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/octree.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/wall.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/status.cxx | 4 |
8 files changed, 13 insertions, 13 deletions
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx index f2b07db11047..01b6e07f58d0 100644 --- a/include/vcl/graphicfilter.hxx +++ b/include/vcl/graphicfilter.hxx @@ -206,10 +206,10 @@ public: GraphicFileFormat GetFileFormat() const { return nFormat; } /** @return graphic size in pixels or 0 size */ - const Size& GetSizePixel() const { return (Size&) aPixSize; } + const Size& GetSizePixel() const { return aPixSize; } /** @return the logical graphic size in 1/100mm or 0 size */ - const Size& GetSize_100TH_MM() const { return (Size&) aLogSize; } + const Size& GetSize_100TH_MM() const { return aLogSize; } /** @return bits/pixel or 0 **/ sal_uInt16 GetBitsPerPixel() const { return nBitsPerPixel; } diff --git a/vcl/inc/octree.hxx b/vcl/inc/octree.hxx index 44a4c5e0a77f..9f670fa6bf98 100644 --- a/vcl/inc/octree.hxx +++ b/vcl/inc/octree.hxx @@ -59,7 +59,7 @@ private: sal_uLong nLevel; NODE* pTree; NODE* pReduce[ OCTREE_BITS + 1 ]; - BitmapColor* pColor; + BitmapColor const * pColor; ImpNodeCache* pNodeCache; const BitmapReadAccess* pAcc; sal_uInt16 nPalIndex; @@ -83,7 +83,7 @@ inline const BitmapPalette& Octree::GetPalette() inline sal_uInt16 Octree::GetBestPaletteIndex( const BitmapColor& rColor ) { - pColor = &(BitmapColor&) rColor; + pColor = &rColor; nPalIndex = 65535; nLevel = 0L; GetPalIndex( pTree ); diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index 818ef4884197..9e6b84dbb112 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -99,7 +99,7 @@ void WinMtfPathObj::AddPoint( const Point& rPoint ) { if ( bClosed ) Insert( tools::Polygon() ); - tools::Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ]; + tools::Polygon& rPoly = static_cast<tools::PolyPolygon&>(*this)[ Count() - 1 ]; rPoly.Insert( rPoly.GetSize(), rPoint ); bClosed = false; } @@ -108,7 +108,7 @@ void WinMtfPathObj::AddPolyLine( const tools::Polygon& rPolyLine ) { if ( bClosed ) Insert( tools::Polygon() ); - tools::Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ]; + tools::Polygon& rPoly = static_cast<tools::PolyPolygon&>(*this)[ Count() - 1 ]; rPoly.Insert( rPoly.GetSize(), rPolyLine ); bClosed = false; } @@ -131,7 +131,7 @@ void WinMtfPathObj::ClosePath() { if ( Count() ) { - tools::Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ]; + tools::Polygon& rPoly = static_cast<tools::PolyPolygon&>(*this)[ Count() - 1 ]; if ( rPoly.GetSize() > 2 ) { Point aFirst( rPoly[ 0 ] ); diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx index fab58d0b0b52..5ee1adbff428 100644 --- a/vcl/source/gdi/alpha.cxx +++ b/vcl/source/gdi/alpha.cxx @@ -65,7 +65,7 @@ AlphaMask& AlphaMask::operator=( const Bitmap& rBitmap ) const Bitmap& AlphaMask::ImplGetBitmap() const { - return( (const Bitmap&) *this ); + return *this; } void AlphaMask::ImplSetBitmap( const Bitmap& rBitmap ) diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index ce0f22210a32..38c3dbcc68dc 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -386,7 +386,7 @@ bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys ) bool bPalDiffers = !pReadAcc->HasPalette() || ( rPal.GetEntryCount() != pReadAcc->GetPaletteEntryCount() ); if( !bPalDiffers ) - bPalDiffers = ( (BitmapPalette&) rPal != pReadAcc->GetPalette() ); + bPalDiffers = ( rPal != pReadAcc->GetPalette() ); if( bPalDiffers ) { diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx index 2abad5187f6e..23ebea3dba40 100644 --- a/vcl/source/gdi/octree.cxx +++ b/vcl/source/gdi/octree.cxx @@ -75,7 +75,7 @@ Octree::Octree(const BitmapReadAccess& rReadAcc, sal_uLong nColors) { for( long nX = 0; nX < nWidth; nX++ ) { - pColor = &(BitmapColor&) pAcc->GetPaletteColor( pAcc->GetPixelIndex( nY, nX ) ); + pColor = &pAcc->GetPaletteColor( pAcc->GetPixelIndex( nY, nX ) ); nLevel = 0; ImplAdd( &pTree ); diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx index 2dc6d77a7f40..54afa1eb20e2 100644 --- a/vcl/source/gdi/wall.cxx +++ b/vcl/source/gdi/wall.cxx @@ -127,7 +127,7 @@ SvStream& WriteImplWallpaper( SvStream& rOStm, const ImplWallpaper& rImplWallpap WriteDIBBitmapEx(*rImplWallpaper.mpBitmap, rOStm); // version 3 (new color format) - ( (Color&) rImplWallpaper.maColor ).Write( rOStm ); + rImplWallpaper.maColor.Write( rOStm ); return rOStm; } diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index c4643dabbad8..aa5c1f59f6e6 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -608,7 +608,7 @@ void StatusBar::ImplCalcProgressRect() if( IsNativeControlSupported( ControlType::Progress, ControlPart::Entire ) ) { ImplControlValue aValue; - tools::Rectangle aControlRegion( tools::Rectangle( (const Point&)Point(), maPrgsFrameRect.GetSize() ) ); + tools::Rectangle aControlRegion( tools::Rectangle( Point(), maPrgsFrameRect.GetSize() ) ); tools::Rectangle aNativeControlRegion, aNativeContentRegion; if( (bNativeOK = GetNativeControlRegion( ControlType::Progress, ControlPart::Entire, aControlRegion, ControlState::ENABLED, aValue, @@ -1414,7 +1414,7 @@ Size StatusBar::CalcWindowSizePixel() const if( IsNativeControlSupported( ControlType::Progress, ControlPart::Entire ) ) { ImplControlValue aValue; - tools::Rectangle aControlRegion( (const Point&)Point(), Size( nCalcWidth, nMinHeight ) ); + tools::Rectangle aControlRegion( Point(), Size( nCalcWidth, nMinHeight ) ); tools::Rectangle aNativeControlRegion, aNativeContentRegion; if( GetNativeControlRegion( ControlType::Progress, ControlPart::Entire, aControlRegion, ControlState::ENABLED, aValue, |