summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-03-22 12:14:52 +0100
committerLuboš Luňák <l.lunak@collabora.com>2022-03-22 15:17:08 +0100
commitff8b9f6fca5784f62427302026642de0cdb1ef11 (patch)
tree67ba16fc1cb93f054580f25e3a390469d097fabd /drawinglayer
parent7bc16436e28153dfdd01e8d49cd193f62098476c (diff)
use dashing info from struct LineInfo in EPS writer (tdf#146804)
It had a random(?) hardcoded '2' as the dashing info. While at it, I've also made few other places use the common implementation of creating the dotdash array instead of doing it manually. Change-Id: Id349ca138c98d08eef47dc0bfe6d162e03fc4a9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131932 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/tools/wmfemfhelper.cxx18
1 files changed, 1 insertions, 17 deletions
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx
index 7f07e472bef8..592e67bab9a5 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -524,23 +524,7 @@ namespace wmfemfhelper
if(bDashDotUsed)
{
- std::vector< double > fDotDashArray;
- const double fDashLen(rLineInfo.GetDashLen());
- const double fDotLen(rLineInfo.GetDotLen());
- const double fDistance(rLineInfo.GetDistance());
-
- for(sal_uInt16 a(0); a < rLineInfo.GetDashCount(); a++)
- {
- fDotDashArray.push_back(fDashLen);
- fDotDashArray.push_back(fDistance);
- }
-
- for(sal_uInt16 b(0); b < rLineInfo.GetDotCount(); b++)
- {
- fDotDashArray.push_back(fDotLen);
- fDotDashArray.push_back(fDistance);
- }
-
+ std::vector< double > fDotDashArray = rLineInfo.GetDotDashArray();
const double fAccumulated(std::accumulate(fDotDashArray.begin(), fDotDashArray.end(), 0.0));
const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(
std::move(fDotDashArray),