diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-03-25 20:44:59 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-04-25 13:54:09 +0100 |
commit | d90e03478ab6cbdf2073dd6a646dfacfc76b3c14 (patch) | |
tree | a0e6a0d4e3dc35ce4b7fc40af9c81c4e5ae0b041 /filter | |
parent | 976a85dc20b0f274d0f51e9eb83e08b4763bdd2a (diff) |
fdo#42939 - write svg line widths for META_POLYLINE_ACTION.
Change-Id: Ib282a3db6ecb5c7d1d4117e1bb48920ee7b2f562
Reviewed-on: https://gerrit.libreoffice.org/3606
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 12 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.hxx | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 2f269ba9fda9..ae2372c92911 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -2186,7 +2186,16 @@ void SVGActionWriter::ImplWriteEllipse( const Point& rCenter, long nRadX, long n } } -// ----------------------------------------------------------------------------- +void SVGActionWriter::ImplAddLineAttr( const LineInfo &rAttrs, + sal_Bool bApplyMapping ) +{ + if ( !rAttrs.IsDefault() ) + { + sal_Int32 nStrokeWidth = bApplyMapping ? ImplMap( rAttrs.GetWidth() ) : rAttrs.GetWidth(); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStrokeWidth, + OUString::valueOf( nStrokeWidth ) ); + } +} void SVGActionWriter::ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bool bLineOnly, sal_Bool bApplyMapping ) @@ -3172,6 +3181,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, if( rPoly.GetSize() ) { mpContext->AddPaintAttr( mpVDev->GetLineColor(), Color( COL_TRANSPARENT ) ); + ImplAddLineAttr( pA->GetLineInfo() ); ImplWritePolyPolygon( rPoly, sal_True ); } } diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx index ebffda9a5f10..0e2d7a5b97dc 100644 --- a/filter/source/svg/svgwriter.hxx +++ b/filter/source/svg/svgwriter.hxx @@ -364,6 +364,8 @@ private: void ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY, sal_Bool bApplyMapping = sal_True ); void ImplWritePattern( const PolyPolygon& rPolyPoly, const Hatch* pHatch, const Gradient* pGradient, sal_uInt32 nWriteFlags ); + void ImplAddLineAttr( const LineInfo &rAttrs, + sal_Bool bApplyMapping = sal_True ); void ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bool bLineOnly, sal_Bool bApplyMapping = sal_True ); void ImplWriteShape( const SVGShapeDescriptor& rShape, sal_Bool bApplyMapping = sal_True ); |