summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-03-18 16:29:53 -0400
committerFridrich Strba <fridrich@documentfoundation.org>2014-03-20 17:10:01 +0000
commit4d2ff40bf36f52c3fdd61311159a4ace5e631298 (patch)
tree69382f853e753f3d10c8db0805f75c67720251ed
parentbb75460ad23edcf23cded63e554c611bded2dd04 (diff)
fdo#75260: Apply the same fix from writer table to paragraph bordering.
Change-Id: Icb11a2e2f802cbf2af2362315f3acbc66f15334d (cherry picked from commit 961da51ae28b46c96344be20abd1b5172a3faa3f) Reviewed-on: https://gerrit.libreoffice.org/8649 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
-rw-r--r--sw/source/core/layout/paintfrm.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index c2719ddbda05..ee0047ee3b74 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -4899,6 +4899,16 @@ static void lcl_PaintLeftRightLine( const bool _bLeft,
{
(aRect.*_rRectFn->fnAddRight)( ::lcl_AlignWidth( lcl_GetLineWidth( pLeftRightBorder ) ) -
(aRect.*_rRectFn->fnGetWidth)() );
+
+ // Shift the left border to the left.
+ Point aCurPos = aRect.Pos();
+ sal_uInt16 nOffset = pLeftRightBorder->GetDistance();
+ aCurPos.X() -= nOffset;
+ aCurPos.Y() -= nOffset;
+ aRect.Pos(aCurPos);
+ Size aCurSize = aRect.SSize();
+ aCurSize.Height() += nOffset * 2;
+ aRect.SSize(aCurSize);
}
else
{
@@ -4965,6 +4975,16 @@ static void lcl_PaintTopBottomLine( const bool _bTop,
{
(aRect.*_rRectFn->fnAddBottom)( ::lcl_AlignHeight( lcl_GetLineWidth( pTopBottomBorder ) ) -
(aRect.*_rRectFn->fnGetHeight)() );
+
+ // Push the top border up a bit.
+ sal_uInt16 nOffset = pTopBottomBorder->GetDistance();
+ Point aCurPos = aRect.Pos();
+ aCurPos.X() -= nOffset;
+ aCurPos.Y() -= nOffset;
+ aRect.Pos(aCurPos);
+ Size aCurSize = aRect.SSize();
+ aCurSize.Width() += nOffset * 2;
+ aRect.SSize(aCurSize);
}
else
{