summaryrefslogtreecommitdiff
path: root/oox/source
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2016-11-19 10:56:40 +0800
committerMark Hung <marklh9@gmail.com>2016-11-19 17:27:18 +0000
commitafc37372c1e1e8a865a4ad91a4b998e861ad9f02 (patch)
treeddd7a65bd9d1fa187e3bb5ae5c855d7d27b3be7d /oox/source
parentdfee3a97a0bd30e461974af4ecb09f67bded584d (diff)
tdf#92076 oox - export PolyPolygonShape and PolyLineShape.
1. Export PolyPolygonShape and PolyLineShape. 2. Rename WriteBezierShape to WritePolyPolygonShape because ClosedBezierShape, OpenBezierShape, PolyPolygonShape,and PolyLineShape share the function and all use EscherPropertyContainer::GetPolyPolygon to get PolyPolygon structure and use WritePolyPolygon to write xml tags. Change-Id: I9ffdc26cf1f6fe8ea3b91b7b218d67f9e5585617 Reviewed-on: https://gerrit.libreoffice.org/30972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/export/shapes.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index c9d693cf56e8..820cb4ca56d3 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -428,9 +428,9 @@ bool ShapeExport::NonEmptyText( const Reference< XInterface >& xIface )
return false;
}
-ShapeExport& ShapeExport::WriteBezierShape( const Reference< XShape >& xShape, bool bClosed )
+ShapeExport& ShapeExport::WritePolyPolygonShape( const Reference< XShape >& xShape, bool bClosed )
{
- SAL_INFO("oox.shape", "write open bezier shape");
+ SAL_INFO("oox.shape", "write polypolygon shape");
FSHelperPtr pFS = GetFS();
pFS->startElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp), FSEND );
@@ -481,14 +481,14 @@ ShapeExport& ShapeExport::WriteBezierShape( const Reference< XShape >& xShape, b
return *this;
}
-ShapeExport& ShapeExport::WriteClosedBezierShape( const Reference< XShape >& xShape )
+ShapeExport& ShapeExport::WriteClosedPolyPolygonShape( const Reference< XShape >& xShape )
{
- return WriteBezierShape( xShape, true );
+ return WritePolyPolygonShape( xShape, true );
}
-ShapeExport& ShapeExport::WriteOpenBezierShape( const Reference< XShape >& xShape )
+ShapeExport& ShapeExport::WriteOpenPolyPolygonShape( const Reference< XShape >& xShape )
{
- return WriteBezierShape( xShape, false );
+ return WritePolyPolygonShape( xShape, false );
}
ShapeExport& ShapeExport::WriteGroupShape(const uno::Reference<drawing::XShape>& xShape)
@@ -1388,13 +1388,15 @@ static const NameToConvertMapType& lcl_GetConverters(DocumentType eDocumentType)
return shape_converters;
}
- shape_converters[ "com.sun.star.drawing.ClosedBezierShape" ] = &ShapeExport::WriteClosedBezierShape;
+ shape_converters[ "com.sun.star.drawing.ClosedBezierShape" ] = &ShapeExport::WriteClosedPolyPolygonShape;
shape_converters[ "com.sun.star.drawing.ConnectorShape" ] = &ShapeExport::WriteConnectorShape;
shape_converters[ "com.sun.star.drawing.CustomShape" ] = &ShapeExport::WriteCustomShape;
shape_converters[ "com.sun.star.drawing.EllipseShape" ] = &ShapeExport::WriteEllipseShape;
shape_converters[ "com.sun.star.drawing.GraphicObjectShape" ] = &ShapeExport::WriteGraphicObjectShape;
shape_converters[ "com.sun.star.drawing.LineShape" ] = &ShapeExport::WriteLineShape;
- shape_converters[ "com.sun.star.drawing.OpenBezierShape" ] = &ShapeExport::WriteOpenBezierShape;
+ shape_converters[ "com.sun.star.drawing.OpenBezierShape" ] = &ShapeExport::WriteOpenPolyPolygonShape;
+ shape_converters[ "com.sun.star.drawing.PolyPolygonShape" ] = &ShapeExport::WriteClosedPolyPolygonShape;
+ shape_converters[ "com.sun.star.drawing.PolyLineShape" ] = &ShapeExport::WriteClosedPolyPolygonShape;
shape_converters[ "com.sun.star.drawing.RectangleShape" ] = &ShapeExport::WriteRectangleShape;
shape_converters[ "com.sun.star.drawing.OLE2Shape" ] = &ShapeExport::WriteOLE2Shape;
shape_converters[ "com.sun.star.drawing.TableShape" ] = &ShapeExport::WriteTableShape;