summaryrefslogtreecommitdiff
path: root/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer/source/primitive2d/borderlineprimitive2d.cxx')
-rw-r--r--drawinglayer/source/primitive2d/borderlineprimitive2d.cxx27
1 files changed, 21 insertions, 6 deletions
diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
index 5fc3b57fbbda..eba1f7f0d996 100644
--- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
@@ -439,7 +439,15 @@ namespace drawinglayer
return Primitive2DReference();
}
- if(!rBT.isGap())
+ if(rBT.isGap())
+ {
+ // when gap, width has to be equal
+ if(!rtl::math::approxEqual(rBT.getLineAttribute().getWidth(), rBC.getLineAttribute().getWidth()))
+ {
+ return Primitive2DReference();
+ }
+ }
+ else
{
// when not gap, the line extends have at least reach to the center ( > 0.0),
// else there is a extend usage. When > 0.0 they just overlap, no problem
@@ -465,11 +473,18 @@ namespace drawinglayer
const BorderLine& rBT(pCandidateA->getBorderLines()[a]);
const BorderLine& rBC(pCandidateB->getBorderLines()[a]);
- aMergedBorderLines.push_back(
- BorderLine(
- rBT.getLineAttribute(),
- rBT.getStartLeft(), rBT.getStartRight(),
- rBC.getEndLeft(), rBC.getEndRight()));
+ if(rBT.isGap())
+ {
+ aMergedBorderLines.push_back(rBT);
+ }
+ else
+ {
+ aMergedBorderLines.push_back(
+ BorderLine(
+ rBT.getLineAttribute(),
+ rBT.getStartLeft(), rBT.getStartRight(),
+ rBC.getEndLeft(), rBC.getEndRight()));
+ }
}
return Primitive2DReference(