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>
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 335bb00..b6d5a91 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 )