Kaydet (Commit) 0794e9ec authored tarafından Armin Le Grand's avatar Armin Le Grand Kaydeden (comit) Caolán McNamara

corrected export of polygons with text

(cherry picked from commit c0f65b29)

Conflicts:
	xmloff/source/draw/shapeexport2.cxx

Change-Id: Ic8da384d094ce735ecba51b282de7a697558e51f
üst 8b2fb0e1
......@@ -2097,26 +2097,27 @@ void XMLShapeExport::ImpExportEllipseShape(
sal_Bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210#
// prepare name (with most used)
enum ::xmloff::token::XMLTokenEnum eName(XML_CIRCLE);
if(bCircle)
{
// write circle
SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_CIRCLE, bCreateNewline, sal_True);
ImpExportDescription( xShape ); // #i68101#
ImpExportEvents( xShape );
ImpExportGluePoints( xShape );
ImpExportText( xShape );
// name already set
}
else
{
// write ellipse
SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_ELLIPSE, bCreateNewline, sal_True);
// set name
eName = XML_ELLIPSE;
}
// write ellipse or circle
SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, eName, bCreateNewline, sal_True);
ImpExportDescription( xShape ); // #i68101#
ImpExportEvents( xShape );
ImpExportGluePoints( xShape );
ImpExportText( xShape );
}
}
}
......@@ -2152,6 +2153,9 @@ void XMLShapeExport::ImpExportPolygonShape(
sal_Bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210#
// prepare name (with most used)
enum ::xmloff::token::XMLTokenEnum eName(XML_PATH);
if(bBezier)
{
// get PolygonBezier
......@@ -2171,15 +2175,6 @@ void XMLShapeExport::ImpExportPolygonShape(
// write point array
mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_D, aPolygonString);
// write object now
SvXMLElementExport aOBJ(
mrExport,
XML_NAMESPACE_DRAW,
XML_PATH,
bCreateNewline,
sal_True);
}
}
else
......@@ -2198,13 +2193,8 @@ void XMLShapeExport::ImpExportPolygonShape(
// write point array
mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_POINTS, aPointString);
// write object now
SvXMLElementExport aOBJ(
mrExport,
XML_NAMESPACE_DRAW,
aPolygon.isClosed() ? XML_POLYGON : XML_POLYLINE,
bCreateNewline,
sal_True);
// set name
eName = aPolygon.isClosed() ? XML_POLYGON : XML_POLYLINE;
}
else
{
......@@ -2218,16 +2208,18 @@ void XMLShapeExport::ImpExportPolygonShape(
// write point array
mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_D, aPolygonString);
}
}
// write object now
// write object, but after attributes are added since the destructor will
// consume all of these added attributes. Also before text is added; this may
// open another SvXMLElementExport scope which needs to be inside this one
SvXMLElementExport aOBJ(
mrExport,
XML_NAMESPACE_DRAW,
XML_PATH,
eName,
bCreateNewline,
sal_True);
}
}
ImpExportDescription( xShape ); // #i68101#
ImpExportEvents( xShape );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment