[Libreoffice-commits] core.git: sw/source

Kohei Yoshida kohei.yoshida at collabora.com
Tue Mar 18 13:32:34 PDT 2014


 sw/source/core/layout/paintfrm.cxx |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

New commits:
commit 961da51ae28b46c96344be20abd1b5172a3faa3f
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Tue Mar 18 16:29:53 2014 -0400

    fdo#75260: Apply the same fix from writer table to paragraph bordering.
    
    Change-Id: Icb11a2e2f802cbf2af2362315f3acbc66f15334d

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 85ad6c7..f9428cc 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
     {


More information about the Libreoffice-commits mailing list