[Libreoffice-commits] .: cppcanvas/source

Radek Doulík rodo at kemper.freedesktop.org
Fri Apr 13 07:25:37 PDT 2012


 cppcanvas/source/mtfrenderer/emfplus.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e94e669bd3499827f19585b704e7c0ef4f21bd13
Author: Radek Doulik <rodo at novell.com>
Date:   Fri Apr 13 16:24:25 2012 +0200

    set minimal width if pen width is set to zero

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 8409d7f..0d8005c 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -608,7 +608,8 @@ namespace cppcanvas
 
             void SetStrokeAttributes (rendering::StrokeAttributes& rStrokeAttributes, ImplRenderer& rR, const OutDevState& rState)
             {
-                rStrokeAttributes.StrokeWidth = (rState.mapModeTransform * rR.MapSize (width, 0)).getX ();
+                EMFP_DEBUG (if (width == 0.0) printf ("EMF+\tTODO: pen with zero width - using minimal which might not be correct\n"));
+                rStrokeAttributes.StrokeWidth = (rState.mapModeTransform * rR.MapSize (width == 0.0 ? 0.05 : width, 0)).getX ();
             }
 
             void Read (SvStream& s, ImplRenderer& rR, sal_Int32, sal_Int32 )


More information about the Libreoffice-commits mailing list