[Libreoffice-commits] core.git: vcl/source

László Németh laszlo.nemeth at collabora.com
Fri May 15 07:35:09 PDT 2015


 vcl/source/filter/wmf/enhwmf.cxx |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit aead21f7528047fe5c31c39ac6bec14b55f80293
Author: László Németh <laszlo.nemeth at collabora.com>
Date:   Fri May 15 16:25:00 2015 +0200

    tdf#91254: draw missing EMF hairlines with linecap settings
    
    By removing linecap settings here (meaningless with 0 line width).
    
    Change-Id: I532d09af77d77dadcbbdd2f957136689239ccc07

diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index c314ef6..f02871d 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 );


More information about the Libreoffice-commits mailing list