summaryrefslogtreecommitdiff
path: root/drawinglayer/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-04-15 15:46:06 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-04-15 14:46:00 +0000
commit1ee570a4e625719f8bf270d372926c0d829ae6f0 (patch)
tree9639106c0e9e46dee8eb5636bf8e4574e0bc9abd /drawinglayer/source
parent2e6a05d6da0ae33a456b1ca40677df56611e779c (diff)
Related: tdf#99315 BorderLinePrimitive2D: fix solid line primitive width
Regression from commit 2c62596cf264ef10749d8bfdb2bb2ebef2d98fbc (fdo#75260: Correctly draw double lines for both Writer and Calc., 2014-03-03), the problem was that when decomposing a double border line promitive to solid line primitives (which happens for the legacy "border" type, while both the Calc UI and Excel importer creates "border-thin" ones), the decomposed inner line's height was larger than the requested width. As a result there was no gap between the polygon of the inner and the outer line of the double border, looking like a non-double border. The width of the outer border is still incorrect on the screen, though. Change-Id: Ia9713c315ce8f23e2579b257169798e7c82c0a64 Reviewed-on: https://gerrit.libreoffice.org/24115 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'drawinglayer/source')
-rw-r--r--drawinglayer/source/primitive2d/borderlineprimitive2d.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
index b2df3a35b007..4a6a15018715 100644
--- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
@@ -63,7 +63,7 @@ primitive2d::Primitive2DReference makeSolidLinePrimitive(
const basegfx::B2DVector& rVector, const basegfx::BColor& rColor, double fLineWidth, double fGap)
{
const basegfx::B2DVector aPerpendicular = basegfx::getPerpendicular(rVector);
- const basegfx::B2DVector aLineWidthOffset = ((fLineWidth + 1.0) * 0.5) * aPerpendicular;
+ const basegfx::B2DVector aLineWidthOffset = (fLineWidth * 0.5) * aPerpendicular;
basegfx::B2DPolygon aPolygon;
aPolygon.append(rStart + aLineWidthOffset);