summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorVort <vvort@yandex.ru>2014-02-12 12:35:26 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-02-12 10:48:51 +0000
commit9616b786adb9491f7c26fc0f1053e7b3d1b35f27 (patch)
tree95344f4193d498ed4c8201761c9f94f8ffa1132e /sdext
parent51fc602184ab8d1afbfb183a3d25b1122c8b1e29 (diff)
fdo#45003 PDF import: Implementing linejoin and linecap properties
Change-Id: I4b09cd7b970d5aca4500ae333edef0e4c2f618b9 Reviewed-on: https://gerrit.libreoffice.org/8009 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/tree/drawtreevisiting.cxx32
1 files changed, 32 insertions, 0 deletions
diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
index e3b013502f0d..bd44686270ac 100644
--- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
@@ -35,6 +35,8 @@
#include "comphelper/processfactory.hxx"
#include "com/sun/star/i18n/ScriptType.hpp"
#include "com/sun/star/i18n/DirectionProperty.hpp"
+#include "com/sun/star/rendering/PathCapType.hpp"
+#include "com/sun/star/rendering/PathJoinType.hpp"
#include <string.h>
@@ -793,6 +795,36 @@ void DrawXmlFinalizer::visit( PolyPolyElement& elem, const std::list< Element* >
aGCProps[ "svg:stroke-width" ] = OUString::number( aVec.getLength() );
}
+ OUString strokeLinejoinValue;
+ OUString strokeLinecapValue;
+ switch (rGC.LineJoin)
+ {
+ default:
+ case rendering::PathJoinType::MITER:
+ strokeLinejoinValue = "miter";
+ break;
+ case rendering::PathJoinType::ROUND:
+ strokeLinejoinValue = "round";
+ break;
+ case rendering::PathJoinType::BEVEL:
+ strokeLinejoinValue = "bevel";
+ break;
+ }
+ switch (rGC.LineCap)
+ {
+ default:
+ case rendering::PathCapType::BUTT:
+ strokeLinecapValue = "butt";
+ break;
+ case rendering::PathCapType::ROUND:
+ strokeLinecapValue = "round";
+ break;
+ case rendering::PathCapType::SQUARE:
+ strokeLinecapValue = "square";
+ break;
+ }
+ aGCProps[ "draw:stroke-linejoin" ] = strokeLinejoinValue;
+ aGCProps[ "svg:stroke-linecap" ] = strokeLinecapValue;
}
else
{