diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-02 09:44:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-03 09:00:36 +0200 |
commit | 006572e4d808e95a6624d0c5f37be8b8d14449ce (patch) | |
tree | 745470189aef22213af714adccc922f0ac5bc814 /sw | |
parent | 645d5113965942ee9cba2670fc897b9f8f56a1fb (diff) |
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@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 335bb0024aa2..b6d5a9159f34 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 ) |