diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-18 12:53:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-19 09:26:05 +0200 |
commit | 7b83ed313e0e54cb7da4525d13f63937e10867fa (patch) | |
tree | e5b950d14cfb8461f5ffb81af1af023b546024f7 /svtools/source/graphic | |
parent | 32878b68574f8fb27a122dd3a356e369391bdfa6 (diff) |
loplugin:constparams in svtools
Change-Id: I2620419828864363af55011abe56143bb7d42f48
Reviewed-on: https://gerrit.libreoffice.org/40154
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/graphic')
-rw-r--r-- | svtools/source/graphic/grfcache.cxx | 14 | ||||
-rw-r--r-- | svtools/source/graphic/grfcache.hxx | 4 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 4 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr2.cxx | 8 | ||||
-rw-r--r-- | svtools/source/graphic/provider.cxx | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index 6945de277d98..7684a08a1260 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -407,7 +407,7 @@ private: DrawModeFlags mnOutDevDrawMode; sal_uInt16 mnOutDevBitCount; - static bool IsCacheableAsBitmap( const GDIMetaFile& rMtf, OutputDevice* pOut, const Size& rSz ); + static bool IsCacheableAsBitmap( const GDIMetaFile& rMtf, OutputDevice const * pOut, const Size& rSz ); // Copy assignment is forbidden and not implemented. GraphicDisplayCacheEntry (const GraphicDisplayCacheEntry &) = delete; @@ -415,7 +415,7 @@ private: public: - static sal_uLong GetNeededSize( OutputDevice* pOut, const Point& rPt, const Size& rSz, + static sal_uLong GetNeededSize( OutputDevice const * pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ); public: @@ -455,7 +455,7 @@ public: void SetReleaseTime( const ::salhelper::TTimeValue& rReleaseTime ) { maReleaseTime = rReleaseTime; } const ::salhelper::TTimeValue& GetReleaseTime() const { return maReleaseTime; } - bool Matches( OutputDevice* pOut, const Point& /*rPtPixel*/, const Size& rSzPixel, + bool Matches( OutputDevice const * pOut, const Point& /*rPtPixel*/, const Size& rSzPixel, const GraphicCacheEntry* pCacheEntry, const GraphicAttr& rAttr ) const { // #i46805# Additional match @@ -510,7 +510,7 @@ static void checkMetadataBitmap( const BitmapEx& rBmpEx, // ImplCreateOutput() would use the optimization of using the single bitmap. // If you do changes here, change the original function too. bool GraphicDisplayCacheEntry::IsCacheableAsBitmap( const GDIMetaFile& rMtf, - OutputDevice* pOut, const Size& rSz ) + OutputDevice const * pOut, const Size& rSz ) { const Size aNewSize( rMtf.GetPrefSize() ); GDIMetaFile rOutMtf = rMtf; @@ -757,7 +757,7 @@ bool GraphicDisplayCacheEntry::IsCacheableAsBitmap( const GDIMetaFile& rMtf, return nNumBitmaps == 1 && !bNonBitmapActionEncountered; } -sal_uLong GraphicDisplayCacheEntry::GetNeededSize( OutputDevice* pOut, const Point& /*rPt*/, const Size& rSz, +sal_uLong GraphicDisplayCacheEntry::GetNeededSize( OutputDevice const * pOut, const Point& /*rPt*/, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) { const Graphic& rGraphic = rObj.GetGraphic(); @@ -1061,14 +1061,14 @@ void GraphicCache::SetCacheTimeout( sal_uLong nTimeoutSeconds ) } } -bool GraphicCache::IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz, +bool GraphicCache::IsDisplayCacheable( OutputDevice const * pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) const { return( GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr ) <= GetMaxObjDisplayCacheSize() ); } -bool GraphicCache::IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz, +bool GraphicCache::IsInDisplayCache( OutputDevice const * pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) const { const Point aPtPixel( pOut->LogicToPixel( rPt ) ); diff --git a/svtools/source/graphic/grfcache.hxx b/svtools/source/graphic/grfcache.hxx index 8db16aee1d52..4402573e84dc 100644 --- a/svtools/source/graphic/grfcache.hxx +++ b/svtools/source/graphic/grfcache.hxx @@ -91,7 +91,7 @@ public: sal_uLong GetCacheTimeout() const { return mnReleaseTimeoutSeconds; } bool IsDisplayCacheable( - OutputDevice* pOut, + OutputDevice const * pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, @@ -99,7 +99,7 @@ public: ) const; bool IsInDisplayCache( - OutputDevice* pOut, + OutputDevice const * pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 0a1e4021e332..83b42ccfa2e4 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -231,7 +231,7 @@ void GraphicObject::ImplAutoSwapIn() } } -bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr, +bool GraphicObject::ImplGetCropParams( OutputDevice const * pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr, tools::PolyPolygon& rClipPolyPoly, bool& bRectClipRegion ) const { bool bRet = false; @@ -420,7 +420,7 @@ void GraphicObject::FireSwapOutRequest() ImplAutoSwapOutHdl( nullptr ); } -bool GraphicObject::IsCached( OutputDevice* pOut, const Size& rSz, +bool GraphicObject::IsCached( OutputDevice const * pOut, const Size& rSz, const GraphicAttr* pAttr, GraphicManagerDrawFlags nFlags ) const { bool bRet; diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 541f90ee69e5..b2efd6003b95 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -73,7 +73,7 @@ void GraphicManager::SetCacheTimeout( sal_uLong nTimeoutSeconds ) mpCache->SetCacheTimeout( nTimeoutSeconds ); } -bool GraphicManager::IsInCache( OutputDevice* pOut, const Point& rPt, +bool GraphicManager::IsInCache( OutputDevice const * pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) const { @@ -81,7 +81,7 @@ bool GraphicManager::IsInCache( OutputDevice* pOut, const Point& rPt, } bool GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, - GraphicObject& rObj, const GraphicAttr& rAttr, + GraphicObject const & rObj, const GraphicAttr& rAttr, const GraphicManagerDrawFlags nFlags, bool& rCached ) { Point aPt( rPt ); @@ -178,7 +178,7 @@ namespace { struct simpleSortByDataChangeTimeStamp { - bool operator() (GraphicObject* p1, GraphicObject* p2) const + bool operator() (GraphicObject const * p1, GraphicObject const * p2) const { return p1->GetDataChangeTimeStamp() < p2->GetDataChangeTimeStamp(); } @@ -230,7 +230,7 @@ void GraphicManager::ImplGraphicObjectWasSwappedIn( const GraphicObject& rObj ) } bool GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, - const Size& rSz, GraphicObject& rObj, + const Size& rSz, GraphicObject const & rObj, const GraphicAttr& rAttr, bool& rCached ) { diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index 44dc8de4981b..d8df2c321c89 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -485,7 +485,7 @@ uno::Sequence< uno::Reference<graphic::XGraphic> > SAL_CALL GraphicProvider::que return comphelper::containerToSequence(aRet); } -void ImplCalculateCropRect( ::Graphic& rGraphic, const text::GraphicCrop& rGraphicCropLogic, tools::Rectangle& rGraphicCropPixel ) +void ImplCalculateCropRect( ::Graphic const & rGraphic, const text::GraphicCrop& rGraphicCropLogic, tools::Rectangle& rGraphicCropPixel ) { if ( rGraphicCropLogic.Left || rGraphicCropLogic.Top || rGraphicCropLogic.Right || rGraphicCropLogic.Bottom ) { |