[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 6 11:28:23 UTC 2020


 sw/source/core/layout/paintfrm.cxx |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 5e95aa716d58f80aaec259008b95d8b4d501fc6d
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jul 2 09:44:33 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Jul 6 13:27:50 2020 +0200

    tdf#133944 writer image shadow incorrect
    
    regression from
        commit 1f59cbe36c9899f6fa9a869331c9be454abd4606
        Date:   Fri Apr 17 15:38:05 2020 +0200
        simplify some SwRect code - use the SwRect Add* variants
    
    Change-Id: I435b1153f272b08a2bfe7d90145de1ee5a702b08
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97720
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 006572e4d808e95a6624d0c5f37be8b8d14449ce)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97808

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index a77960ee3e98..7e398600603d 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -4243,8 +4243,8 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect,
                 if ( bDrawFullShadowRectangle )
                 {
                     // draw full shadow rectangle
-                    aOut.AddTop( nHeight );
-                    aOut.AddLeft( nWidth );
+                    aOut.Top( rOutRect.Top() + nHeight );
+                    aOut.Left( rOutRect.Left() + nWidth );
                     aRegion.push_back( aOut );
                 }
                 else
@@ -4253,18 +4253,18 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect,
                     {
                         aOut.Top( rOutRect.Bottom() - nHeight );
                         if( bLeft )
-                            aOut.AddLeft( nWidth );
+                            aOut.Left( rOutRect.Left() + nWidth );
                         aRegion.push_back( aOut );
                     }
                     if( bRight )
                     {
                         aOut.Left( rOutRect.Right() - nWidth );
                         if( bTop )
-                            aOut.AddTop( nHeight );
+                            aOut.Top( rOutRect.Top() + nHeight );
                         else
                             aOut.Top( rOutRect.Top() );
                         if( bBottom )
-                            aOut.AddBottom( - nHeight );
+                            aOut.Bottom( rOutRect.Bottom() - nHeight );
                         aRegion.push_back( aOut );
                     }
                 }
@@ -4280,8 +4280,8 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect,
                 if ( bDrawFullShadowRectangle )
                 {
                     // draw full shadow rectangle
-                    aOut.AddBottom( - nHeight );
-                    aOut.AddRight( - nWidth );
+                    aOut.Bottom( rOutRect.Bottom() - nHeight );
+                    aOut.Right( rOutRect.Right() - nWidth );
                     aRegion.push_back( aOut );
                 }
                 else
@@ -4290,7 +4290,7 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect,
                     {
                         aOut.Bottom( rOutRect.Top() + nHeight );
                         if( bRight )
-                            aOut.AddRight( - nWidth );
+                            aOut.Right( rOutRect.Right() - nWidth );
                         aRegion.push_back( aOut );
                     }
                     if( bLeft )


More information about the Libreoffice-commits mailing list