diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-18 21:45:15 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-18 21:47:20 -0400 |
commit | 8ff746e1ad4950124e09da2dc913d8d64c726c90 (patch) | |
tree | bb384d8f1f654c23049bc7ada000e008ba2af0ca | |
parent | 90dd4320de6ace24e464979630a2c9fbab35f64b (diff) |
fdo#75260: Align exterior borders of a table correctly for double lines.
Change-Id: I76527d610b74018b5e056ff72cc9e37e9f9c6f03
-rw-r--r-- | svx/source/table/viewcontactoftableobj.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx index 2558d12014c8..f9e801cd2143 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)) { |