summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorChristian Lippka <cl@openoffice.org>2000-10-24 10:51:36 +0000
committerChristian Lippka <cl@openoffice.org>2000-10-24 10:51:36 +0000
commit1d46ea1f7477ec3f7b67b6ad733225ed1c457856 (patch)
tree4c123d9c553c4e13274ec627298e2e3923a8d3f7 /xmloff
parentb59dbffe0962b72338758022f761d6f9a7df1e42 (diff)
#79617# style name for shapes is optional
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx17
-rw-r--r--xmloff/source/draw/shapeexport.cxx5
2 files changed, 12 insertions, 10 deletions
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 8eb4ccc1964c..afe7f56f69b4 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sdxmlexp.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: mib $ $Date: 2000-10-19 14:25:15 $
+ * last change: $Author: cl $ $Date: 2000-10-24 11:51:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2596,11 +2596,14 @@ void SdXMLExport::ImpWriteSingleShapeStyleInfo(
const uno::Reference< drawing::XShape >& xShape,
sal_uInt16 nFamily, const OUString& rStyleName, XmlShapeType eShapeType)
{
- // add style-name attribute (REQUIRED) Style-name, evtl. auto-style
- if(XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily)
- rExp.AddAttribute(XML_NAMESPACE_DRAW, sXML_style_name, rStyleName);
- else
- rExp.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_style_name, rStyleName);
+ if( rStyleName.getLength() )
+ {
+ // add style-name attribute (REQUIRED) Style-name, evtl. auto-style
+ if(XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily)
+ rExp.AddAttribute(XML_NAMESPACE_DRAW, sXML_style_name, rStyleName);
+ else
+ rExp.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_style_name, rStyleName);
+ }
switch(eShapeType)
{
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 57c0c62eefcc..66e4a7085df6 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: shapeexport.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:07:03 $
+ * last change: $Author: cl $ $Date: 2000-10-24 11:51:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -194,7 +194,6 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
aNewName = GetExport().GetAutoStylePool()->Find(
XML_STYLE_FAMILY_SD_GRAPHICS_ID, aParentName, xPropStates);
- DBG_ASSERT(aNewName.getLength(), "XMLEXP: xShape without style name(!)");
XmlShapeType eShapeType(XmlShapeTypeNotYetSet);
SdXMLExport::ImpCalcShapeType(xShape, eShapeType);