summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-07-02 09:44:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-07-06 13:27:50 +0200
commit5e95aa716d58f80aaec259008b95d8b4d501fc6d (patch)
tree0c5c70fcc17d9b31bb0b4c7d02178db2c6ac348a
parent91ccd9fda9c953dbe88b99673491aabeb64ff330 (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> (cherry picked from commit 006572e4d808e95a6624d0c5f37be8b8d14449ce) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97808
-rw-r--r--sw/source/core/layout/paintfrm.cxx16
1 files changed, 8 insertions, 8 deletions
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 )