Kaydet (Commit) 961da51a authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#75260: Apply the same fix from writer table to paragraph bordering.

Change-Id: Icb11a2e2f802cbf2af2362315f3acbc66f15334d
üst 075fc0c0
...@@ -4814,6 +4814,16 @@ static void lcl_PaintLeftRightLine( const bool _bLeft, ...@@ -4814,6 +4814,16 @@ static void lcl_PaintLeftRightLine( const bool _bLeft,
{ {
(aRect.*_rRectFn->fnAddRight)( ::lcl_AlignWidth( lcl_GetLineWidth( pLeftRightBorder ) ) - (aRect.*_rRectFn->fnAddRight)( ::lcl_AlignWidth( lcl_GetLineWidth( pLeftRightBorder ) ) -
(aRect.*_rRectFn->fnGetWidth)() ); (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 else
{ {
...@@ -4880,6 +4890,16 @@ static void lcl_PaintTopBottomLine( const bool _bTop, ...@@ -4880,6 +4890,16 @@ static void lcl_PaintTopBottomLine( const bool _bTop,
{ {
(aRect.*_rRectFn->fnAddBottom)( ::lcl_AlignHeight( lcl_GetLineWidth( pTopBottomBorder ) ) - (aRect.*_rRectFn->fnAddBottom)( ::lcl_AlignHeight( lcl_GetLineWidth( pTopBottomBorder ) ) -
(aRect.*_rRectFn->fnGetHeight)() ); (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 else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment