summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-03-18 16:29:53 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-03-18 16:31:18 -0400
commit961da51ae28b46c96344be20abd1b5172a3faa3f (patch)
tree296a597c95dadc4bfdbc464d179e050d706c05ec /sw
parent075fc0c0a34875adf2833e5933b4982b9443a373 (diff)
fdo#75260: Apply the same fix from writer table to paragraph bordering.
Change-Id: Icb11a2e2f802cbf2af2362315f3acbc66f15334d
Diffstat (limited to 'sw')
-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 85ad6c713002..f9428ccc5a6f 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -4814,6 +4814,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
{
@@ -4880,6 +4890,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
{