summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2014-01-19 14:15:05 +0100
committerAndras Timar <andras.timar@collabora.com>2014-04-22 23:18:50 +0200
commit1e1dc2294219a0fad1814ade77f17bea28e951ba (patch)
treeefdb40a831716f870df603db4a72012b21def3eb /vcl
parenta88fda247ac70828d1304261db56cfeab6d1ccd1 (diff)
WMF: parse line cap and line join
Change-Id: I5a19a724856938d5a0495ee1e454582238dbd3f0
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx28
1 files changed, 27 insertions, 1 deletions
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index 1ae9047e7e0d..4de55dff059a 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -751,7 +751,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
sal_Bool bTransparent = sal_False;
sal_uInt16 nDashCount = 0;
sal_uInt16 nDotCount = 0;
- switch( nStyle )
+ switch( nStyle & 0xFF )
{
case PS_DASHDOTDOT :
nDotCount++;
@@ -772,6 +772,32 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case PS_SOLID :
aLineInfo.SetStyle( LINE_SOLID );
}
+ switch( nStyle & 0xF00 )
+ {
+ case PS_ENDCAP_ROUND :
+ aLineInfo.SetLineCap( com::sun::star::drawing::LineCap_ROUND );
+ break;
+ case PS_ENDCAP_SQUARE :
+ aLineInfo.SetLineCap( com::sun::star::drawing::LineCap_SQUARE );
+ break;
+ case PS_ENDCAP_FLAT :
+ default :
+ aLineInfo.SetLineCap( com::sun::star::drawing::LineCap_BUTT );
+ }
+ switch( nStyle & 0xF000 )
+ {
+ case PS_JOIN_ROUND :
+ aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_ROUND );
+ break;
+ case PS_JOIN_MITER :
+ aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_MITER );
+ break;
+ case PS_JOIN_BEVEL :
+ aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_BEVEL );
+ break;
+ default :
+ aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_NONE );
+ }
if ( nDashCount | nDotCount )
{
aLineInfo.SetStyle( LINE_DASH );