Author: alg
Date: Wed Oct 30 14:41:25 2013
New Revision: 1537113
URL: http://svn.apache.org/r1537113
Log:
i123542 corrected ODF XML export of 3D cube and sphere
Modified:
openoffice/trunk/main/xmloff/source/draw/shapeexport2.cxx
openoffice/trunk/main/xmloff/source/draw/shapeexport3.cxx
Modified: openoffice/trunk/main/xmloff/source/draw/shapeexport2.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/xmloff/source/draw/shapeexport2.cxx?rev=1537113&r1=1537112&r2=1537113&view=diff
==============================================================================
--- openoffice/trunk/main/xmloff/source/draw/shapeexport2.cxx (original)
+++ openoffice/trunk/main/xmloff/source/draw/shapeexport2.cxx Wed Oct 30
14:41:25 2013
@@ -1071,9 +1071,9 @@ void XMLShapeExport::ImpExportPolygonSha
}
}
- // 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
+ // write object, but after attributes are added since this call will
+ // consume all of these added attributes and the destructor will close
the
+ // scope. Also before text is added; this may add sub-scopes as needed
SvXMLElementExport aOBJ(
mrExport,
XML_NAMESPACE_DRAW,
Modified: openoffice/trunk/main/xmloff/source/draw/shapeexport3.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/xmloff/source/draw/shapeexport3.cxx?rev=1537113&r1=1537112&r2=1537113&view=diff
==============================================================================
--- openoffice/trunk/main/xmloff/source/draw/shapeexport3.cxx (original)
+++ openoffice/trunk/main/xmloff/source/draw/shapeexport3.cxx Wed Oct 30
14:41:25 2013
@@ -124,9 +124,6 @@ void XMLShapeExport::ImpExport3DShape(
{
case XmlShapeTypeDraw3DCubeObject:
{
- // write 3DCube shape
- SvXMLElementExport aOBJ(mrExport,
XML_NAMESPACE_DR3D, XML_CUBE, sal_True, sal_True);
-
// minEdge
aAny =
xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DPosition")));
drawing::Position3D aPosition3D;
@@ -158,13 +155,15 @@ void XMLShapeExport::ImpExport3DShape(
mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_MAX_EDGE, aStr);
}
- break;
+ // write 3DCube shape
+ // #123542# Do this *after* the attributes are added, else
these will be lost since opening
+ // the scope will clear the global attribute list at the
exporter
+ SvXMLElementExport aOBJ(mrExport,
XML_NAMESPACE_DR3D, XML_CUBE, sal_True, sal_True);
+
+ break;
}
case XmlShapeTypeDraw3DSphereObject:
{
- // write 3DSphere shape
- SvXMLElementExport aOBJ(mrExport,
XML_NAMESPACE_DR3D, XML_SPHERE, sal_True, sal_True);
-
// Center
aAny =
xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DPosition")));
drawing::Position3D aPosition3D;
@@ -193,6 +192,11 @@ void XMLShapeExport::ImpExport3DShape(
mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_SIZE, aStr);
}
+ // write 3DSphere shape
+ // #123542# Do this *after* the attributes are added, else
these will be lost since opening
+ // the scope will clear the global attribute list at the
exporter
+ SvXMLElementExport aOBJ(mrExport,
XML_NAMESPACE_DR3D, XML_SPHERE, sal_True, sal_True);
+
break;
}
case XmlShapeTypeDraw3DLatheObject: