diff options
author | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2021-05-13 20:11:19 +0200 |
---|---|---|
committer | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2021-05-13 22:00:05 +0200 |
commit | 699295ca7cab3a4f4e801a14496f202c05d18899 (patch) | |
tree | 8258546259bb86b77e315bf778588ee6858270a5 /emfio/source | |
parent | 5846f376b7e2fecc6b7fc5315095234b7aeed6c5 (diff) |
tdf#142014 Fix displaying strokes when line width is 0
Change-Id: I80e05ff2f24f5da2f5c124c0ee1b302a1c8226ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115570
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'emfio/source')
-rw-r--r-- | emfio/source/reader/mtftools.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index 2d9fe3601ebd..011ff4647a11 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -1323,11 +1323,15 @@ namespace emfio mpGDIMetaFile->AddAction( new MetaPopAction() ); } // tdf#142014 By default the stroke is made with hairline. If width is bigger, we need to use PolyLineAction - if ( bStroke && ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LineStyle::Dash ) ) ) + if ( bStroke ) { - sal_uInt16 i, nCount = maPathObj.Count(); - for ( i = 0; i < nCount; i++ ) - mpGDIMetaFile->AddAction( new MetaPolyLineAction( maPathObj[ i ], maLineStyle.aLineInfo ) ); + // bFill is drawing hairstyle line. So we need to to draw it only when the width is different than 0 + if ( !bFill || maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LineStyle::Dash ) ) + { + sal_uInt16 i, nCount = maPathObj.Count(); + for ( i = 0; i < nCount; i++ ) + mpGDIMetaFile->AddAction( new MetaPolyLineAction( maPathObj[ i ], maLineStyle.aLineInfo ) ); + } } ClearPath(); } |