diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-11-27 12:47:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-11-28 20:32:29 +0100 |
commit | 0820920e994cd2281cda34afa2235ee9aa1dd2c2 (patch) | |
tree | 711a08ebf8d8b32c3fb3164083bc44e2d79099e5 /vcl/source/outdev/textline.cxx | |
parent | fc011ac027da7574baa4b431ac800020170ba8b0 (diff) |
drawOutDevDirect always passed a non-null OutputDevice*
likewise:
DrawOutDevDirectProcess
ImplDrawWavePixel
DrawOutDevDirectCheck
and various members of SalGraphics dropping redundant nullptr checks
Change-Id: Iaa1ab7c8a605361a7c9cce0aeee974eec9ff246e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106788
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/outdev/textline.cxx')
-rw-r--r-- | vcl/source/outdev/textline.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index 09ee52f6339a..641765270444 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -51,7 +51,7 @@ void OutputDevice::ImplDrawWavePixel( tools::Long nOriginX, tools::Long nOriginY tools::Long nCurX, tools::Long nCurY, Degree10 nOrientation, SalGraphics* pGraphics, - OutputDevice const * pOutDev, + const OutputDevice& rOutDev, bool bDrawPixAsRect, tools::Long nPixWidth, tools::Long nPixHeight ) { @@ -64,11 +64,11 @@ void OutputDevice::ImplDrawWavePixel( tools::Long nOriginX, tools::Long nOriginY if ( bDrawPixAsRect ) { - pGraphics->DrawRect( nCurX, nCurY, nPixWidth, nPixHeight, pOutDev ); + pGraphics->DrawRect( nCurX, nCurY, nPixWidth, nPixHeight, rOutDev ); } else { - pGraphics->DrawPixel( nCurX, nCurY, pOutDev ); + pGraphics->DrawPixel( nCurX, nCurY, rOutDev ); } } @@ -98,7 +98,7 @@ void OutputDevice::ImplDrawWaveLine( tools::Long nBaseX, tools::Long nBaseY, aOriginPt.RotateAround( nStartX, nStartY, nOrientation ); aOriginPt.RotateAround( nEndX, nEndY, nOrientation ); } - mpGraphics->DrawLine( nStartX, nStartY, nEndX, nEndY, this ); + mpGraphics->DrawLine( nStartX, nStartY, nEndX, nEndY, *this ); } else { @@ -139,7 +139,7 @@ void OutputDevice::ImplDrawWaveLine( tools::Long nBaseX, tools::Long nBaseY, while ( nWidth ) { ImplDrawWavePixel( nBaseX, nBaseY, nCurX, nCurY, nOrientation, - mpGraphics, this, + mpGraphics, *this, bDrawPixAsRect, nPixWidth, nPixHeight ); nCurX++; nWidth--; @@ -154,7 +154,7 @@ void OutputDevice::ImplDrawWaveLine( tools::Long nBaseX, tools::Long nBaseY, for( tools::Long i = nDiffY; i; --i ) { ImplDrawWavePixel( nBaseX, nBaseY, nCurX, nCurY, nOrientation, - mpGraphics, this, + mpGraphics, *this, bDrawPixAsRect, nPixWidth, nPixHeight ); nCurX++; nCurY += nOffY; @@ -162,7 +162,7 @@ void OutputDevice::ImplDrawWaveLine( tools::Long nBaseX, tools::Long nBaseY, for( tools::Long i = nDiffX; i; --i ) { ImplDrawWavePixel( nBaseX, nBaseY, nCurX, nCurY, nOrientation, - mpGraphics, this, + mpGraphics, *this, bDrawPixAsRect, nPixWidth, nPixHeight ); nCurX++; } @@ -174,7 +174,7 @@ void OutputDevice::ImplDrawWaveLine( tools::Long nBaseX, tools::Long nBaseY, for( tools::Long i = nDiffY; i && nFreq; --i, --nFreq ) { ImplDrawWavePixel( nBaseX, nBaseY, nCurX, nCurY, nOrientation, - mpGraphics, this, + mpGraphics, *this, bDrawPixAsRect, nPixWidth, nPixHeight ); nCurX++; nCurY += nOffY; @@ -183,7 +183,7 @@ void OutputDevice::ImplDrawWaveLine( tools::Long nBaseX, tools::Long nBaseY, for( tools::Long i = nDiffX; i && nFreq; --i, --nFreq ) { ImplDrawWavePixel( nBaseX, nBaseY, nCurX, nCurY, nOrientation, - mpGraphics, this, + mpGraphics, *this, bDrawPixAsRect, nPixWidth, nPixHeight ); nCurX++; } |