From aead21f7528047fe5c31c39ac6bec14b55f80293 Mon Sep 17 00:00:00 2001 From: László Németh Date: Fri, 15 May 2015 16:25:00 +0200 Subject: tdf#91254: draw missing EMF hairlines with linecap settings By removing linecap settings here (meaningless with 0 line width). Change-Id: I532d09af77d77dadcbbdd2f957136689239ccc07 --- vcl/source/filter/wmf/enhwmf.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index c314ef69091f..f02871de2bd3 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -936,11 +936,17 @@ bool EnhWMFReader::ReadEnhWMF() switch( nStyle & 0xF00 ) { case PS_ENDCAP_ROUND : - aLineInfo.SetLineCap( com::sun::star::drawing::LineCap_ROUND ); - break; + if ( aSize.Width() ) + { + aLineInfo.SetLineCap( com::sun::star::drawing::LineCap_ROUND ); + break; + } case PS_ENDCAP_SQUARE : - aLineInfo.SetLineCap( com::sun::star::drawing::LineCap_SQUARE ); - break; + if ( aSize.Width() ) + { + aLineInfo.SetLineCap( com::sun::star::drawing::LineCap_SQUARE ); + break; + } case PS_ENDCAP_FLAT : default : aLineInfo.SetLineCap( com::sun::star::drawing::LineCap_BUTT ); -- cgit v1.2.3