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 /canvas | |
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 'canvas')
-rw-r--r-- | canvas/source/vcl/canvashelper.cxx | 22 | ||||
-rw-r--r-- | canvas/source/vcl/canvashelper_texturefill.cxx | 8 |
2 files changed, 15 insertions, 15 deletions
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index bec73b3d336a..a6cd6e0b6fd3 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -835,16 +835,16 @@ namespace vclcanvas const ::Size aSz( ::basegfx::fround( aScale.getX() * aBmpSize.Width() ), ::basegfx::fround( aScale.getY() * aBmpSize.Height() ) ); - pGrfObj->Draw( &mpOutDevProvider->getOutDev(), - aPt, - aSz, - &aGrfAttr ); + pGrfObj->Draw(mpOutDevProvider->getOutDev(), + aPt, + aSz, + &aGrfAttr); if( mp2ndOutDevProvider ) - pGrfObj->Draw( &mp2ndOutDevProvider->getOutDev(), - aPt, - aSz, - &aGrfAttr ); + pGrfObj->Draw(mp2ndOutDevProvider->getOutDev(), + aPt, + aSz, + &aGrfAttr); // created GraphicObject, which possibly cached // display bitmap - return cache object, to retain @@ -1161,12 +1161,12 @@ namespace vclcanvas tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDevProvider ); setupOutDevState( viewState, renderState, IGNORE_COLOR ); - if( !rGrf->Draw( &mpOutDevProvider->getOutDev(), rPt, rSz, &rAttr ) ) + if (!rGrf->Draw(mpOutDevProvider->getOutDev(), rPt, rSz, &rAttr)) return false; // #i80779# Redraw also into mask outdev - if( mp2ndOutDevProvider ) - return rGrf->Draw( &mp2ndOutDevProvider->getOutDev(), rPt, rSz, &rAttr ); + if (mp2ndOutDevProvider) + return rGrf->Draw(mp2ndOutDevProvider->getOutDev(), rPt, rSz, &rAttr); return true; } diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx index c0ef516d4c0a..b397ffcb7d2e 100644 --- a/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/canvas/source/vcl/canvashelper_texturefill.cxx @@ -77,10 +77,10 @@ namespace vclcanvas { // update return value. This method should return true, if // at least one of the looped Draws succeeded. - bRet |= rGraphic.Draw( &rOutDev, - aCurrPos, - rTileSize, - &rAttr ); + bRet |= rGraphic.Draw(rOutDev, + aCurrPos, + rTileSize, + &rAttr); aCurrPos.AdjustX(rNextTileX.Width() ); aCurrPos.AdjustY(rNextTileX.Height() ); |