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

Michael Meeks michael.meeks at suse.com
Mon Mar 25 13:45:56 PDT 2013


 filter/source/svg/svgwriter.cxx |   12 ++++++++++++
 filter/source/svg/svgwriter.hxx |    2 ++
 2 files changed, 14 insertions(+)

New commits:
commit 501145f2e3c84d1b07930ea8f0a012060dbff48b
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Mon Mar 25 20:44:59 2013 +0000

    write svg line widths for META_POLYLINE_ACTION.
    
    Change-Id: Ib282a3db6ecb5c7d1d4117e1bb48920ee7b2f562

diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 55a1985..c969b64 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -2051,6 +2051,17 @@ 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 )
 {
@@ -2986,6 +2997,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 e8032fe..bd766b7 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -362,6 +362,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 );


More information about the Libreoffice-commits mailing list