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

Kohei Yoshida kohei.yoshida at collabora.com
Tue Mar 18 18:48:44 PDT 2014


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

New commits:
commit 8ff746e1ad4950124e09da2dc913d8d64c726c90
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.
    
    Change-Id: I76527d610b74018b5e056ff72cc9e37e9f9c6f03

diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx
index 2558d12..f9e801cd2 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