corrected export of polygons with text
(cherry picked from commit c0f65b29f8028ab750c8caac033645c3da3cf2f5) Conflicts: xmloff/source/draw/shapeexport2.cxx Change-Id: Ic8da384d094ce735ecba51b282de7a697558e51f
This commit is contained in:
committed by
Caolán McNamara
parent
8b2fb0e153
commit
0794e9ec93
@@ -2097,26 +2097,27 @@ void XMLShapeExport::ImpExportEllipseShape(
|
|||||||
|
|
||||||
sal_Bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210#
|
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)
|
if(bCircle)
|
||||||
{
|
{
|
||||||
// write circle
|
// name already set
|
||||||
SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_CIRCLE, bCreateNewline, sal_True);
|
|
||||||
|
|
||||||
ImpExportDescription( xShape ); // #i68101#
|
|
||||||
ImpExportEvents( xShape );
|
|
||||||
ImpExportGluePoints( xShape );
|
|
||||||
ImpExportText( xShape );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// write ellipse
|
// set name
|
||||||
SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_ELLIPSE, bCreateNewline, sal_True);
|
eName = XML_ELLIPSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// write ellipse or circle
|
||||||
|
SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, eName, bCreateNewline, sal_True);
|
||||||
|
|
||||||
ImpExportDescription( xShape ); // #i68101#
|
ImpExportDescription( xShape ); // #i68101#
|
||||||
ImpExportEvents( xShape );
|
ImpExportEvents( xShape );
|
||||||
ImpExportGluePoints( xShape );
|
ImpExportGluePoints( xShape );
|
||||||
ImpExportText( xShape );
|
ImpExportText( xShape );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2152,6 +2153,9 @@ void XMLShapeExport::ImpExportPolygonShape(
|
|||||||
|
|
||||||
sal_Bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210#
|
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)
|
if(bBezier)
|
||||||
{
|
{
|
||||||
// get PolygonBezier
|
// get PolygonBezier
|
||||||
@@ -2171,15 +2175,6 @@ void XMLShapeExport::ImpExportPolygonShape(
|
|||||||
|
|
||||||
// write point array
|
// write point array
|
||||||
mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_D, aPolygonString);
|
mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_D, aPolygonString);
|
||||||
|
|
||||||
// write object now
|
|
||||||
SvXMLElementExport aOBJ(
|
|
||||||
mrExport,
|
|
||||||
XML_NAMESPACE_DRAW,
|
|
||||||
XML_PATH,
|
|
||||||
bCreateNewline,
|
|
||||||
sal_True);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2198,13 +2193,8 @@ void XMLShapeExport::ImpExportPolygonShape(
|
|||||||
// write point array
|
// write point array
|
||||||
mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_POINTS, aPointString);
|
mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_POINTS, aPointString);
|
||||||
|
|
||||||
// write object now
|
// set name
|
||||||
SvXMLElementExport aOBJ(
|
eName = aPolygon.isClosed() ? XML_POLYGON : XML_POLYLINE;
|
||||||
mrExport,
|
|
||||||
XML_NAMESPACE_DRAW,
|
|
||||||
aPolygon.isClosed() ? XML_POLYGON : XML_POLYLINE,
|
|
||||||
bCreateNewline,
|
|
||||||
sal_True);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2218,16 +2208,18 @@ void XMLShapeExport::ImpExportPolygonShape(
|
|||||||
|
|
||||||
// write point array
|
// write point array
|
||||||
mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_D, aPolygonString);
|
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(
|
SvXMLElementExport aOBJ(
|
||||||
mrExport,
|
mrExport,
|
||||||
XML_NAMESPACE_DRAW,
|
XML_NAMESPACE_DRAW,
|
||||||
XML_PATH,
|
eName,
|
||||||
bCreateNewline,
|
bCreateNewline,
|
||||||
sal_True);
|
sal_True);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImpExportDescription( xShape ); // #i68101#
|
ImpExportDescription( xShape ); // #i68101#
|
||||||
ImpExportEvents( xShape );
|
ImpExportEvents( xShape );
|
||||||
|
Reference in New Issue
Block a user