diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-05-18 11:44:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-19 09:45:46 +0200 |
commit | 692c5df18ec1f558abe1a3a658c9881cfb7210a9 (patch) | |
tree | f9d6d6d6750ffcfa9401660314c0a1d61993766b /include/vcl | |
parent | 1815aa9472080b9dac263d393b9c922dd16351fe (diff) |
ImplPlayWithRenderer never checks its OutputDevice against nullptr
just pass a reference instead and spread that around to some similar
cases
Change-Id: Ifb2dee8c7bf02a9f01982b928c90666cbbdd84fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115759
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/GraphicObject.hxx | 18 | ||||
-rw-r--r-- | include/vcl/animate/Animation.hxx | 6 | ||||
-rw-r--r-- | include/vcl/gdimtf.hxx | 9 | ||||
-rw-r--r-- | include/vcl/graph.hxx | 26 |
4 files changed, 27 insertions, 32 deletions
diff --git a/include/vcl/GraphicObject.hxx b/include/vcl/GraphicObject.hxx index d10b46b92c4c..27b50455864a 100644 --- a/include/vcl/GraphicObject.hxx +++ b/include/vcl/GraphicObject.hxx @@ -59,7 +59,7 @@ private: std::unique_ptr<GrfSimpleCacheObj> mxSimpleCache; bool VCL_DLLPRIVATE ImplGetCropParams( - OutputDevice const * pOut, + const OutputDevice& rOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr, @@ -128,7 +128,7 @@ private: ); bool VCL_DLLPRIVATE ImplDrawTiled( - OutputDevice* pOut, + OutputDevice& rOut, const tools::Rectangle& rArea, const Size& rSizePixel, const Size& rOffset, @@ -217,12 +217,10 @@ public: bool IsAnimated() const; bool IsEPS() const; - bool Draw( - OutputDevice* pOut, - const Point& rPt, - const Size& rSz, - const GraphicAttr* pAttr = nullptr - ); + bool Draw(OutputDevice& rOut, + const Point& rPt, + const Size& rSz, + const GraphicAttr* pAttr = nullptr); /** Draw the graphic repeatedly into the given output rectangle @@ -253,7 +251,7 @@ public: bitmap drawings appear on the outdev. */ void DrawTiled( - OutputDevice* pOut, + OutputDevice& rOut, const tools::Rectangle& rArea, const Size& rSize, const Size& rOffset, @@ -261,7 +259,7 @@ public: ); bool StartAnimation( - OutputDevice* pOut, + OutputDevice& rOut, const Point& rPt, const Size& rSz, tools::Long nExtraData = 0, diff --git a/include/vcl/animate/Animation.hxx b/include/vcl/animate/Animation.hxx index e6b55a7c510f..8c187723e78f 100644 --- a/include/vcl/animate/Animation.hxx +++ b/include/vcl/animate/Animation.hxx @@ -41,13 +41,13 @@ public: void Clear(); - bool Start(OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz, + bool Start(OutputDevice& rOutDev, const Point& rDestPt, const Size& rDestSz, tools::Long nExtraData, OutputDevice* pFirstFrameOutDev); void Stop(const OutputDevice* pOutDev = nullptr, tools::Long nExtraData = 0); - void Draw(OutputDevice* pOutDev, const Point& rDestPt) const; - void Draw(OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz) const; + void Draw(OutputDevice& rOutDev, const Point& rDestPt) const; + void Draw(OutputDevice& rOutDev, const Point& rDestPt, const Size& rDestSz) const; bool IsInAnimation() const { return mbIsInAnimation; } bool IsTransparent() const; diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx index 363f15f10842..5293958ddaad 100644 --- a/include/vcl/gdimtf.hxx +++ b/include/vcl/gdimtf.hxx @@ -97,7 +97,7 @@ private: const tools::PolyPolygon& rPolyPoly, const Gradient& rGrad ); - SAL_DLLPRIVATE bool ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, Size rLogicDestSize ); + SAL_DLLPRIVATE bool ImplPlayWithRenderer(OutputDevice& rOut, const Point& rPos, Size rLogicDestSize); void Linker( OutputDevice* pOut, bool bLink ); @@ -144,10 +144,9 @@ public: void Record( OutputDevice* pOutDev ); bool IsRecord() const { return m_bRecord; } - void Play( GDIMetaFile& rMtf ); - void Play( OutputDevice* pOutDev, size_t nPos = GDI_METAFILE_END ); - void Play( OutputDevice* pOutDev, const Point& rPos, - const Size& rSize ); + void Play(GDIMetaFile& rMtf); + void Play(OutputDevice& rOutDev, size_t nPos = GDI_METAFILE_END); + void Play(OutputDevice& rOutDev, const Point& rPos, const Size& rSize); void Pause( bool bPause ); bool IsPause() const { return m_bPause; } diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx index f74cfe91ae30..abff7521381f 100644 --- a/include/vcl/graph.hxx +++ b/include/vcl/graph.hxx @@ -147,20 +147,18 @@ public: sal_uLong GetSizeBytes() const; - void Draw( OutputDevice* pOutDev, - const Point& rDestPt ) const; - void Draw( OutputDevice* pOutDev, - const Point& rDestPt, - const Size& rDestSize ) const; - static void DrawEx( OutputDevice* pOutDev, const OUString& rText, - vcl::Font& rFont, const BitmapEx& rBitmap, - const Point& rDestPt, const Size& rDestSize ); - - void StartAnimation( OutputDevice* pOutDev, - const Point& rDestPt, - const Size& rDestSize, - tools::Long nExtraData = 0, - OutputDevice* pFirstFrameOutDev = nullptr ); + void Draw(OutputDevice& rOutDev, const Point& rDestPt) const; + void Draw(OutputDevice& rOutDev, const Point& rDestPt, + const Size& rDestSize) const; + static void DrawEx(OutputDevice& rOutDev, const OUString& rText, + vcl::Font& rFont, const BitmapEx& rBitmap, + const Point& rDestPt, const Size& rDestSize); + + void StartAnimation(OutputDevice& rOutDev, + const Point& rDestPt, + const Size& rDestSize, + tools::Long nExtraData = 0, + OutputDevice* pFirstFrameOutDev = nullptr); void StopAnimation( const OutputDevice* pOutputDevice, tools::Long nExtraData ); |