summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-03-18 21:45:15 -0400
committerFridrich Strba <fridrich@documentfoundation.org>2014-03-20 17:11:20 +0000
commit76ac4d0e2c34d3fd2ba9cc7825c7cff25d463c1d (patch)
treec6cf342786091b50465cc3ba4b06f292e857b1db
parent0fbd73b8f02926664c9d04fc596f482f5977ae59 (diff)
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@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
-rw-r--r--svx/source/table/viewcontactoftableobj.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx
index 683ec24f5165..05ba4048785e 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))
{