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

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


 svx/source/table/viewcontactoftableobj.cxx |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

New commits:
commit 76ac4d0e2c34d3fd2ba9cc7825c7cff25d463c1d
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Tue Mar 18 21:45:15 2014 -0400

    fdo#75260: Align exterior borders of a table correctly for double lines.
    
    This fixes double border drawing problem with table objects in Draw and
    Impress.
    
    Change-Id: I76527d610b74018b5e056ff72cc9e37e9f9c6f03
    (cherry picked from commit 8ff746e1ad4950124e09da2dc913d8d64c726c90)
    Reviewed-on: https://gerrit.libreoffice.org/8651
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx
index 683ec24..05ba404 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -298,8 +298,13 @@ namespace drawinglayer
             if(!getLeftLine().isEmpty())
             {
                 // create left line from top to bottom
-                const basegfx::B2DPoint aStart(getTransform() * basegfx::B2DPoint(0.0, 0.0));
-                const basegfx::B2DPoint aEnd(getTransform() * basegfx::B2DPoint(0.0, 1.0));
+                basegfx::B2DPoint aStart(getTransform() * basegfx::B2DPoint(0.0, 0.0));
+                basegfx::B2DPoint aEnd(getTransform() * basegfx::B2DPoint(0.0, 1.0));
+
+                // Move the left border to the left.
+                double fOffset = getChangedValue(getLeftLine().GetDistance(), getInTwips());
+                aStart += basegfx::B2DPoint(-fOffset,-fOffset);
+                aEnd += basegfx::B2DPoint(-fOffset,fOffset);
 
                 if(!aStart.equal(aEnd))
                 {
@@ -391,8 +396,13 @@ namespace drawinglayer
             if(!getTopLine().isEmpty())
             {
                 // create top line from left to right
-                const basegfx::B2DPoint aStart(getTransform() * basegfx::B2DPoint(0.0, 0.0));
-                const basegfx::B2DPoint aEnd(getTransform() * basegfx::B2DPoint(1.0, 0.0));
+                basegfx::B2DPoint aStart(getTransform() * basegfx::B2DPoint(0.0, 0.0));
+                basegfx::B2DPoint aEnd(getTransform() * basegfx::B2DPoint(1.0, 0.0));
+
+                // Move the top border up a bit.
+                double fOffset = getChangedValue(getTopLine().GetDistance(), getInTwips());
+                aStart += basegfx::B2DPoint(-fOffset,-fOffset);
+                aEnd += basegfx::B2DPoint(fOffset,-fOffset);
 
                 if(!aStart.equal(aEnd))
                 {


More information about the Libreoffice-commits mailing list