summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/pdfwriter_impl.cxx
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 /vcl/source/gdi/pdfwriter_impl.cxx
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 'vcl/source/gdi/pdfwriter_impl.cxx')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx21
1 files changed, 1 insertions, 20 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 1847eb7d7f78..40eab868a80a 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -7780,26 +7780,7 @@ void PDFWriterImpl::convertLineInfoToExtLineInfo( const LineInfo& rIn, PDFWriter
rOut.m_eCap = PDFWriter::capButt;
rOut.m_eJoin = PDFWriter::joinMiter;
rOut.m_fMiterLimit = 10;
- rOut.m_aDashArray.clear();
-
- // add DashDot to DashArray
- const int nDashes = rIn.GetDashCount();
- const int nDashLen = rIn.GetDashLen();
- const int nDistance = rIn.GetDistance();
-
- for( int n = 0; n < nDashes; n++ )
- {
- rOut.m_aDashArray.push_back( nDashLen );
- rOut.m_aDashArray.push_back( nDistance );
- }
- const int nDots = rIn.GetDotCount();
- const int nDotLen = rIn.GetDotLen();
-
- for( int n = 0; n < nDots; n++ )
- {
- rOut.m_aDashArray.push_back( nDotLen );
- rOut.m_aDashArray.push_back( nDistance );
- }
+ rOut.m_aDashArray = rIn.GetDotDashArray();
// add LineJoin
switch(rIn.GetLineJoin())