[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sw/source

Kohei Yoshida kohei.yoshida at collabora.com
Thu Mar 20 10:10:27 PDT 2014


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

New commits:
commit 4d2ff40bf36f52c3fdd61311159a4ace5e631298
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
    (cherry picked from commit 961da51ae28b46c96344be20abd1b5172a3faa3f)
    Reviewed-on: https://gerrit.libreoffice.org/8649
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

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


More information about the Libreoffice-commits mailing list