[Libreoffice-commits] core.git: vcl/inc vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Dec 1 11:15:09 UTC 2020


 vcl/inc/salgdi.hxx                |   14 ++---
 vcl/source/gdi/salgdilayout.cxx   |   99 ++++++++++++++++++--------------------
 vcl/source/outdev/bitmap.cxx      |    6 +-
 vcl/source/outdev/line.cxx        |    6 +-
 vcl/source/outdev/outdev.cxx      |    2 
 vcl/source/outdev/polygon.cxx     |   12 ++--
 vcl/source/outdev/polyline.cxx    |    4 -
 vcl/source/outdev/textline.cxx    |    2 
 vcl/source/outdev/transparent.cxx |    8 +--
 9 files changed, 76 insertions(+), 77 deletions(-)

New commits:
commit e6c9396c555cdcbe8d7eb49ab48065c5df525107
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Nov 30 12:10:47 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Dec 1 12:14:21 2020 +0100

    DrawPolyLine/DrawPolyPolygon never called with null OutputDevice*
    
    so we can remove some redundant nullptr checks, maybe making this
    a tiny less confusing
    
    Change-Id: Icba4ea1edd5b4883a294f52e0facaab631d94aed
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106860
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index e0cd3e53a2ac..b9f15c324eb1 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -206,13 +206,13 @@ public:
     void                        mirror( tools::Long& nX, const OutputDevice& rOutDev ) const;
     // only called mirror2 to avoid ambiguity
     [[nodiscard]] tools::Long   mirror2( tools::Long nX, const OutputDevice& rOutDev ) const;
-    void                        mirror( tools::Long& nX, tools::Long nWidth, const OutputDevice *pOutDev, bool bBack = false ) const;
+    void                        mirror( tools::Long& nX, tools::Long nWidth, const OutputDevice& rOutDev, bool bBack = false ) const;
     bool                        mirror( sal_uInt32 nPoints, const Point *pPtAry, Point *pPtAry2, const OutputDevice& rOutDev ) const;
     void                        mirror( tools::Rectangle& rRect, const OutputDevice&, bool bBack = false ) const;
     void                        mirror( vcl::Region& rRgn, const OutputDevice& rOutDev ) const;
     void                        mirror( ImplControlValue&, const OutputDevice& ) const;
     basegfx::B2DPolyPolygon     mirror( const basegfx::B2DPolyPolygon& i_rPoly, const OutputDevice& rOutDev ) const;
-    const basegfx::B2DHomMatrix& getMirror( const OutputDevice *pOutDev ) const;
+    const basegfx::B2DHomMatrix& getMirror( const OutputDevice& rOutDev ) const;
 
     // non virtual methods; these do possible coordinate mirroring and
     // then delegate to protected virtual methods
@@ -240,7 +240,7 @@ public:
                                     const basegfx::B2DHomMatrix& rObjectToDevice,
                                     const basegfx::B2DPolyPolygon &i_rPolyPolygon,
                                     double i_fTransparency,
-                                    const OutputDevice *i_pOutDev);
+                                    const OutputDevice& i_rOutDev);
 
     bool                        DrawPolyLine(
                                     const basegfx::B2DHomMatrix& rObjectToDevice,
@@ -252,7 +252,7 @@ public:
                                     css::drawing::LineCap i_eLineCap,
                                     double i_fMiterMinimumAngle,
                                     bool bPixelSnapHairline,
-                                    const OutputDevice* i_pOutDev);
+                                    const OutputDevice& i_rOutDev);
 
     bool                        DrawPolyLineBezier(
                                     sal_uInt32 nPoints,
@@ -305,13 +305,13 @@ public:
     void                        DrawBitmap(
                                     const SalTwoRect& rPosAry,
                                     const SalBitmap& rSalBitmap,
-                                    const OutputDevice* pOutDev );
+                                    const OutputDevice& rOutDev );
 
     void                        DrawBitmap(
                                     const SalTwoRect& rPosAry,
                                     const SalBitmap& rSalBitmap,
                                     const SalBitmap& rTransparentBitmap,
-                                    const OutputDevice* pOutDev );
+                                    const OutputDevice& rOutDev );
 
     void                        DrawMask(
                                     const SalTwoRect& rPosAry,
@@ -614,7 +614,7 @@ protected:
     /// flags which hold the SetAntialiasing() value from OutputDevice
     bool                        m_bAntiAlias : 1;
 
-    inline tools::Long GetDeviceWidth(const OutputDevice* pOutDev) const;
+    inline tools::Long GetDeviceWidth(const OutputDevice& rOutDev) const;
 
     /**
      * Handle damage done by drawing with a widget draw override
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 7079fabcf500..eab208eb8689 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -142,15 +142,14 @@ tools::Long SalGraphics::mirror2( tools::Long x, const OutputDevice& rOutDev ) c
     return x;
 }
 
-inline tools::Long SalGraphics::GetDeviceWidth(const OutputDevice* pOutDev) const
+inline tools::Long SalGraphics::GetDeviceWidth(const OutputDevice& rOutDev) const
 {
-    return (pOutDev && pOutDev->IsVirtual())
-        ? pOutDev->GetOutputWidthPixel() : GetGraphicsWidth();
+    return rOutDev.IsVirtual() ? rOutDev.GetOutputWidthPixel() : GetGraphicsWidth();
 }
 
 void SalGraphics::mirror( tools::Long& x, const OutputDevice& rOutDev ) const
 {
-    const tools::Long w = GetDeviceWidth(&rOutDev);
+    const tools::Long w = GetDeviceWidth(rOutDev);
     if( !w )
         return;
 
@@ -172,30 +171,30 @@ void SalGraphics::mirror( tools::Long& x, const OutputDevice& rOutDev ) const
         x = w-1-x;
 }
 
-void SalGraphics::mirror( tools::Long& x, tools::Long nWidth, const OutputDevice *pOutDev, bool bBack ) const
+void SalGraphics::mirror( tools::Long& x, tools::Long nWidth, const OutputDevice& rOutDev, bool bBack ) const
 {
-    const tools::Long w = GetDeviceWidth(pOutDev);
+    const tools::Long w = GetDeviceWidth(rOutDev);
     if( !w )
         return;
 
-    if( pOutDev && pOutDev->ImplIsAntiparallel() )
+    if (rOutDev.ImplIsAntiparallel() )
     {
         // mirror this window back
         if( m_nLayout & SalLayoutFlags::BiDiRtl )
         {
-            tools::Long devX = w - pOutDev->GetOutputWidthPixel() - pOutDev->GetOutOffXPixel();   // re-mirrored mnOutOffX
+            tools::Long devX = w - rOutDev.GetOutputWidthPixel() - rOutDev.GetOutOffXPixel();   // re-mirrored mnOutOffX
             if( bBack )
-                x = x - devX + pOutDev->GetOutOffXPixel();
+                x = x - devX + rOutDev.GetOutOffXPixel();
             else
-                x = devX + (x - pOutDev->GetOutOffXPixel());
+                x = devX + (x - rOutDev.GetOutOffXPixel());
         }
         else
         {
-            tools::Long devX = pOutDev->GetOutOffXPixel();   // re-mirrored mnOutOffX
+            tools::Long devX = rOutDev.GetOutOffXPixel();   // re-mirrored mnOutOffX
             if( bBack )
-                x = devX + (pOutDev->GetOutputWidthPixel() + devX) - (x + nWidth);
+                x = devX + (rOutDev.GetOutputWidthPixel() + devX) - (x + nWidth);
             else
-                x = pOutDev->GetOutputWidthPixel() - (x - devX) + pOutDev->GetOutOffXPixel() - nWidth;
+                x = rOutDev.GetOutputWidthPixel() - (x - devX) + rOutDev.GetOutOffXPixel() - nWidth;
         }
     }
     else if( m_nLayout & SalLayoutFlags::BiDiRtl )
@@ -204,7 +203,7 @@ void SalGraphics::mirror( tools::Long& x, tools::Long nWidth, const OutputDevice
 
 bool SalGraphics::mirror( sal_uInt32 nPoints, const Point *pPtAry, Point *pPtAry2, const OutputDevice& rOutDev ) const
 {
-    const tools::Long w = GetDeviceWidth(&rOutDev);
+    const tools::Long w = GetDeviceWidth(rOutDev);
     if( w )
     {
         sal_uInt32 i, j;
@@ -288,13 +287,13 @@ void SalGraphics::mirror( tools::Rectangle& rRect, const OutputDevice& rOutDev,
     tools::Long x      = rRect.Left();
     tools::Long x_org = x;
 
-    mirror( x, nWidth, &rOutDev, bBack );
+    mirror( x, nWidth, rOutDev, bBack );
     rRect.Move( x - x_org, 0 );
 }
 
 basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& i_rPoly, const OutputDevice& i_rOutDev ) const
 {
-    const basegfx::B2DHomMatrix& rMirror(getMirror(&i_rOutDev));
+    const basegfx::B2DHomMatrix& rMirror(getMirror(i_rOutDev));
 
     if(rMirror.isIdentity())
     {
@@ -309,16 +308,16 @@ basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& i_rP
     }
 }
 
-const basegfx::B2DHomMatrix& SalGraphics::getMirror( const OutputDevice* i_pOutDev ) const
+const basegfx::B2DHomMatrix& SalGraphics::getMirror( const OutputDevice& i_rOutDev ) const
 {
     // get mirroring transformation
-    const tools::Long w = GetDeviceWidth(i_pOutDev);
+    const tools::Long w = GetDeviceWidth(i_rOutDev);
     SAL_WARN_IF( !w, "vcl", "missing graphics width" );
 
-    const bool bMirrorDeviceLTRButBiDiRtlSet = i_pOutDev && !i_pOutDev->IsRTLEnabled();
+    const bool bMirrorDeviceLTRButBiDiRtlSet = !i_rOutDev.IsRTLEnabled();
     tools::Long nMirrorDeviceLTRButBiDiRtlTranslate(0);
     if (bMirrorDeviceLTRButBiDiRtlSet)
-        nMirrorDeviceLTRButBiDiRtlTranslate = w - i_pOutDev->GetOutputWidthPixel() - (2 * i_pOutDev->GetOutOffXPixel());
+        nMirrorDeviceLTRButBiDiRtlTranslate = w - i_rOutDev.GetOutputWidthPixel() - (2 * i_rOutDev.GetOutOffXPixel());
 
     // if the device width, or mirror state of the device changed, then m_aLastMirror is invalid
     bool bLastMirrorValid = w == m_aLastMirrorW && bMirrorDeviceLTRButBiDiRtlSet == m_bLastMirrorDeviceLTRButBiDiRtlSet;
@@ -342,10 +341,10 @@ const basegfx::B2DHomMatrix& SalGraphics::getMirror( const OutputDevice* i_pOutD
                 /* This path gets exercised in calc's RTL UI (e.g. SAL_RTL_ENABLED=1)
                    with its LTR horizontal scrollbar */
 
-                // Original code was (removed here already pOutDev->i_pOutDev):
+                // Original code was:
                 //      // mirror this window back
-                //      double devX = w-i_pOutDev->GetOutputWidthPixel()-i_pOutDev->GetOutOffXPixel();   // re-mirrored mnOutOffX
-                //      aRet.setX( devX + (i_rPoint.getX() - i_pOutDev->GetOutOffXPixel()) );
+                //      double devX = w-i_rOutDev.GetOutputWidthPixel()-i_rOutDev.GetOutOffXPixel();   // re-mirrored mnOutOffX
+                //      aRet.setX( devX + (i_rPoint.getX() - i_rOutDev.GetOutOffXPixel()) );
                 // I do not really understand the comment 'mirror this window back', so cannot guarantee
                 // that this works as before, but I have reduced this (by re-placing and re-formatting) to
                 // a simple translation:
@@ -413,7 +412,7 @@ void SalGraphics::DrawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, t
 void SalGraphics::DrawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const OutputDevice& rOutDev )
 {
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
-        mirror( nX, nWidth, &rOutDev );
+        mirror( nX, nWidth, rOutDev );
     drawRect( nX, nY, nWidth, nHeight );
 }
 
@@ -478,12 +477,12 @@ bool SalGraphics::DrawPolyPolygon(
     const basegfx::B2DHomMatrix& rObjectToDevice,
     const basegfx::B2DPolyPolygon& i_rPolyPolygon,
     double i_fTransparency,
-    const OutputDevice* i_pOutDev)
+    const OutputDevice& i_rOutDev)
 {
-    if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (i_pOutDev && i_pOutDev->IsRTLEnabled()) )
+    if( (m_nLayout & SalLayoutFlags::BiDiRtl) || i_rOutDev.IsRTLEnabled() )
     {
         // mirroring set
-        const basegfx::B2DHomMatrix& rMirror(getMirror(i_pOutDev));
+        const basegfx::B2DHomMatrix& rMirror(getMirror(i_rOutDev));
         if(!rMirror.isIdentity())
         {
             return drawPolyPolygon(
@@ -563,12 +562,12 @@ bool SalGraphics::DrawPolyLine(
     css::drawing::LineCap i_eLineCap,
     double i_fMiterMinimumAngle,
     bool bPixelSnapHairline,
-    const OutputDevice* i_pOutDev)
+    const OutputDevice& i_rOutDev)
 {
-    if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (i_pOutDev && i_pOutDev->IsRTLEnabled()) )
+    if( (m_nLayout & SalLayoutFlags::BiDiRtl) || i_rOutDev.IsRTLEnabled() )
     {
         // mirroring set
-        const basegfx::B2DHomMatrix& rMirror(getMirror(i_pOutDev));
+        const basegfx::B2DHomMatrix& rMirror(getMirror(i_rOutDev));
         if(!rMirror.isIdentity())
         {
             return drawPolyLine(
@@ -614,8 +613,8 @@ void SalGraphics::CopyArea( tools::Long nDestX, tools::Long nDestY,
 {
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
     {
-        mirror( nDestX, nSrcWidth, &rOutDev );
-        mirror( nSrcX, nSrcWidth, &rOutDev );
+        mirror( nDestX, nSrcWidth, rOutDev );
+        mirror( nSrcX, nSrcWidth, rOutDev );
     }
     copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, true/*bWindowInvalidate*/ );
 }
@@ -625,7 +624,7 @@ void SalGraphics::CopyBits(const SalTwoRect& rPosAry, const OutputDevice& rOutDe
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
     {
         SalTwoRect aPosAry2 = rPosAry;
-        mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, &rOutDev );
+        mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
         copyBits( aPosAry2, nullptr );
     }
     else
@@ -640,9 +639,9 @@ void SalGraphics::CopyBits(const SalTwoRect& rPosAry, SalGraphics& rSrcGraphics,
     {
         SalTwoRect aPosAry2 = rPosAry;
         if( (rSrcGraphics.GetLayout() & SalLayoutFlags::BiDiRtl) || rSrcOutDev.IsRTLEnabled() )
-            mirror( aPosAry2.mnSrcX, aPosAry2.mnSrcWidth, &rSrcOutDev );
+            mirror( aPosAry2.mnSrcX, aPosAry2.mnSrcWidth, rSrcOutDev );
         if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
-            mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, &rOutDev );
+            mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
         copyBits( aPosAry2, &rSrcGraphics );
     }
     else
@@ -650,12 +649,12 @@ void SalGraphics::CopyBits(const SalTwoRect& rPosAry, SalGraphics& rSrcGraphics,
 }
 
 void SalGraphics::DrawBitmap( const SalTwoRect& rPosAry,
-                              const SalBitmap& rSalBitmap, const OutputDevice *pOutDev )
+                              const SalBitmap& rSalBitmap, const OutputDevice& rOutDev )
 {
-    if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
+    if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
     {
         SalTwoRect aPosAry2 = rPosAry;
-        mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, pOutDev );
+        mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
         drawBitmap( aPosAry2, rSalBitmap );
     }
     else
@@ -664,12 +663,12 @@ void SalGraphics::DrawBitmap( const SalTwoRect& rPosAry,
 
 void SalGraphics::DrawBitmap( const SalTwoRect& rPosAry,
                               const SalBitmap& rSalBitmap,
-                              const SalBitmap& rTransparentBitmap, const OutputDevice *pOutDev )
+                              const SalBitmap& rTransparentBitmap, const OutputDevice& rOutDev )
 {
-    if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
+    if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
     {
         SalTwoRect aPosAry2 = rPosAry;
-        mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, pOutDev );
+        mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
         drawBitmap( aPosAry2, rSalBitmap, rTransparentBitmap );
     }
     else
@@ -683,7 +682,7 @@ void SalGraphics::DrawMask( const SalTwoRect& rPosAry,
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
     {
         SalTwoRect aPosAry2 = rPosAry;
-        mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, &rOutDev );
+        mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
         drawMask( aPosAry2, rSalBitmap, nMaskColor );
     }
     else
@@ -693,7 +692,7 @@ void SalGraphics::DrawMask( const SalTwoRect& rPosAry,
 std::shared_ptr<SalBitmap> SalGraphics::GetBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const OutputDevice& rOutDev )
 {
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
-        mirror( nX, nWidth, &rOutDev );
+        mirror( nX, nWidth, rOutDev );
     return getBitmap( nX, nY, nWidth, nHeight );
 }
 
@@ -707,7 +706,7 @@ Color SalGraphics::GetPixel( tools::Long nX, tools::Long nY, const OutputDevice&
 void SalGraphics::Invert( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags, const OutputDevice& rOutDev )
 {
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
-        mirror( nX, nWidth, &rOutDev );
+        mirror( nX, nWidth, rOutDev );
     invert( nX, nY, nWidth, nHeight, nFlags );
 }
 
@@ -726,7 +725,7 @@ void SalGraphics::Invert( sal_uInt32 nPoints, const Point* pPtAry, SalInvert nFl
 bool SalGraphics::DrawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void* pPtr, sal_uInt32 nSize, const OutputDevice& rOutDev )
 {
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
-        mirror( nX, nWidth, &rOutDev );
+        mirror( nX, nWidth, rOutDev );
     return drawEPS( nX, nY, nWidth, nHeight,  pPtr, nSize );
 }
 
@@ -835,7 +834,7 @@ bool SalGraphics::BlendBitmap( const SalTwoRect& rPosAry,
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
     {
         SalTwoRect aPosAry2 = rPosAry;
-        mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, &rOutDev );
+        mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
         return blendBitmap( aPosAry2, rBitmap );
     }
     else
@@ -851,7 +850,7 @@ bool SalGraphics::BlendAlphaBitmap( const SalTwoRect& rPosAry,
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
     {
         SalTwoRect aPosAry2 = rPosAry;
-        mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, &rOutDev );
+        mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
         return blendAlphaBitmap( aPosAry2, rSrcBitmap, rMaskBitmap, rAlphaBitmap );
     }
     else
@@ -866,7 +865,7 @@ bool SalGraphics::DrawAlphaBitmap( const SalTwoRect& rPosAry,
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
     {
         SalTwoRect aPosAry2 = rPosAry;
-        mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, &rOutDev );
+        mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
         return drawAlphaBitmap( aPosAry2, rSourceBitmap, rAlphaBitmap );
     }
     else
@@ -884,7 +883,7 @@ bool SalGraphics::DrawTransformedBitmap(
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
     {
         // mirroring set
-        const basegfx::B2DHomMatrix& rMirror(getMirror(&rOutDev));
+        const basegfx::B2DHomMatrix& rMirror(getMirror(rOutDev));
         if (!rMirror.isIdentity())
         {
             basegfx::B2DPolygon aPoints({rNull, rX, rY});
@@ -906,7 +905,7 @@ bool SalGraphics::DrawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWi
                                  sal_uInt8 nTransparency, const OutputDevice& rOutDev )
 {
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
-        mirror( nX, nWidth, &rOutDev );
+        mirror( nX, nWidth, rOutDev );
 
     return drawAlphaRect( nX, nY, nWidth, nHeight, nTransparency );
 }
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 9ed95ddf748a..cd2ea0cfce6b 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -166,7 +166,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
                 if ( nAction == MetaActionType::BMPSCALE )
                     ScaleBitmap (aBmp, aPosAry);
 
-                mpGraphics->DrawBitmap( aPosAry, *aBmp.ImplGetSalBitmap(), this );
+                mpGraphics->DrawBitmap( aPosAry, *aBmp.ImplGetSalBitmap(), *this );
             }
         }
     }
@@ -588,7 +588,7 @@ void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize
                         }
                     }
 
-                    mpGraphics->DrawBitmap(aPosAry, *pSalSrcBmp, *xMaskBmp, this);
+                    mpGraphics->DrawBitmap(aPosAry, *pSalSrcBmp, *xMaskBmp, *this);
                 }
 
                 // #110958# Paint mask to alpha channel. Luckily, the
@@ -608,7 +608,7 @@ void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize
             }
             else
             {
-                mpGraphics->DrawBitmap(aPosAry, *pSalSrcBmp, this);
+                mpGraphics->DrawBitmap(aPosAry, *pSalSrcBmp, *this);
 
                 if (mpAlphaVDev)
                 {
diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx
index 4a51ef68f120..12e32fe0553e 100644
--- a/vcl/source/outdev/line.cxx
+++ b/vcl/source/outdev/line.cxx
@@ -135,7 +135,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt )
             css::drawing::LineCap_BUTT,
             basegfx::deg2rad(15.0), // not used with B2DLineJoin::NONE, but the correct default
             bPixelSnapHairline,
-            this);
+            *this);
     }
     if(!bDrawn)
     {
@@ -244,7 +244,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin
                     css::drawing::LineCap_BUTT,
                     basegfx::deg2rad(15.0), // not used with B2DLineJoin::NONE, but the correct default
                     bPixelSnapHairline,
-                    this);
+                    *this);
             }
 
             if(!bDone)
@@ -276,7 +276,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin
                 basegfx::B2DHomMatrix(),
                 aFillPolyPolygon,
                 0.0,
-                this);
+                *this);
         }
 
         if(!bDone)
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 063e9485d2e4..f2e19889d06b 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -557,7 +557,7 @@ void OutputDevice::DrawOutDevDirectProcess(const OutputDevice& rSrcDev, SalTwoRe
     if( pSrcGraphics && (pSrcGraphics->GetLayout() & SalLayoutFlags::BiDiRtl) )
     {
         SalTwoRect aPosAry2 = rPosAry;
-        pSrcGraphics->mirror( aPosAry2.mnSrcX, aPosAry2.mnSrcWidth, &rSrcDev );
+        pSrcGraphics->mirror( aPosAry2.mnSrcX, aPosAry2.mnSrcWidth, rSrcDev );
         mpGraphics->CopyBits( aPosAry2, *pSrcGraphics, *this, rSrcDev );
         return;
     }
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index 7bc768121367..5f48bacfa6a5 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -82,7 +82,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly )
                 aTransform,
                 aB2DPolyPolygon,
                 0.0,
-                this);
+                *this);
         }
 
         if(bSuccess && IsLineColor())
@@ -101,7 +101,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly )
                     css::drawing::LineCap_BUTT,
                     basegfx::deg2rad(15.0), // not used with B2DLineJoin::NONE, but the correct default
                     bPixelSnapHairline,
-                    this);
+                    *this);
                 if (!bSuccess)
                     break;
             }
@@ -201,7 +201,7 @@ void OutputDevice::DrawPolygon( const tools::Polygon& rPoly )
                 aTransform,
                 basegfx::B2DPolyPolygon(aB2DPolygon),
                 0.0,
-                this);
+                *this);
         }
 
         if(bSuccess && IsLineColor())
@@ -218,7 +218,7 @@ void OutputDevice::DrawPolygon( const tools::Polygon& rPoly )
                 css::drawing::LineCap_BUTT,
                 basegfx::deg2rad(15.0), // not used with B2DLineJoin::NONE, but the correct default
                 bPixelSnapHairline,
-                this);
+                *this);
         }
 
         if(bSuccess)
@@ -310,7 +310,7 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP
                 aTransform,
                 aB2DPolyPolygon,
                 0.0,
-                this);
+                *this);
         }
 
         if(bSuccess && IsLineColor())
@@ -329,7 +329,7 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP
                     css::drawing::LineCap_BUTT,
                     basegfx::deg2rad(15.0), // not used with B2DLineJoin::NONE, but the correct default
                     bPixelSnapHairline,
-                    this);
+                    *this);
                 if (!bSuccess)
                     break;
             }
diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx
index 31b15c50f2ac..b48adfa5cace 100644
--- a/vcl/source/outdev/polyline.cxx
+++ b/vcl/source/outdev/polyline.cxx
@@ -77,7 +77,7 @@ void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly )
         css::drawing::LineCap_BUTT,
         basegfx::deg2rad(15.0) /*default fMiterMinimumAngle, not used*/,
         bPixelSnapHairline,
-        this);
+        *this);
 
     if(!bDrawn)
     {
@@ -371,7 +371,7 @@ bool OutputDevice::DrawPolyLineDirectInternal(
             eLineCap,
             fMiterMinimumAngle,
             bPixelSnapHairline,
-            this);
+            *this);
 
         if( bDrawSuccess )
         {
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 641765270444..9189f4e9c8e5 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -1017,7 +1017,7 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, to
             css::drawing::LineCap_BUTT,
             basegfx::deg2rad(15.0),
             bPixelSnapHairline,
-            this);
+            *this);
 
     if( mpAlphaVDev )
         mpAlphaVDev->DrawWaveLine( rStartPos, rEndPos, nLineWidth );
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 08cb57e06505..68650650a472 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -258,7 +258,7 @@ void OutputDevice::DrawTransparent(
                 aFullTransform,
                 aB2DPolyPolygon,
                 fAdjustedTransparency,
-                this);
+                *this);
         }
 
         if( bDrawnOk && IsLineColor() )
@@ -277,7 +277,7 @@ void OutputDevice::DrawTransparent(
                     css::drawing::LineCap_BUTT,
                     basegfx::deg2rad(15.0), // not used with B2DLineJoin::NONE, but the correct default
                     bPixelSnapHairline,
-                    this );
+                    *this );
             }
         }
 
@@ -379,7 +379,7 @@ bool OutputDevice::DrawTransparentNatively ( const tools::PolyPolygon& rPolyPoly
                 aTransform,
                 aB2DPolyPolygon,
                 fTransparency,
-                this);
+                *this);
         }
 
         if( mbLineColor )
@@ -402,7 +402,7 @@ bool OutputDevice::DrawTransparentNatively ( const tools::PolyPolygon& rPolyPoly
                     css::drawing::LineCap_BUTT,
                     basegfx::deg2rad(15.0), // not used with B2DLineJoin::NONE, but the correct default
                     bPixelSnapHairline,
-                    this );
+                    *this );
             }
 
             // prepare to restore the fill color


More information about the Libreoffice-commits mailing list