diff options
author | Korrawit Pruegsanusak <detective.conan.1412@gmail.com> | 2013-12-08 14:15:39 +0700 |
---|---|---|
committer | Korrawit Pruegsanusak <detective.conan.1412@gmail.com> | 2013-12-08 14:18:56 +0700 |
commit | a9562d5e3c91b04214013bf296de3156f891e167 (patch) | |
tree | 733351c0a2c2d03fc48b6745b6a559a4be416a38 | |
parent | 4db9ae4479dc6470d0f5c0c5b9b0be6d6dd59de9 (diff) |
XShapeDumper: empty name should not be dumped
Change-Id: Ic1ab8840c9e543cebf322de922b01739684789ad
-rw-r--r-- | drawinglayer/source/dumper/XShapeDumper.cxx | 4 | ||||
-rw-r--r-- | sd/qa/unit/data/xml/shapes-test_page7.xml | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx index 75b7bd3e5916..089640bae35d 100644 --- a/drawinglayer/source/dumper/XShapeDumper.cxx +++ b/drawinglayer/source/dumper/XShapeDumper.cxx @@ -1007,8 +1007,8 @@ void dumpMoveProtectAsAttribute(sal_Bool bMoveProtect, xmlTextWriterPtr xmlWrite void dumpNameAsAttribute(OUString sName, xmlTextWriterPtr xmlWriter) { - xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("name"), "%s", - OUStringToOString(sName, RTL_TEXTENCODING_UTF8).getStr()); + if(!sName.isEmpty()) + xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("name"), "%s", OUStringToOString(sName, RTL_TEXTENCODING_UTF8).getStr()); } void dumpSizeProtectAsAttribute(sal_Bool bSizeProtect, xmlTextWriterPtr xmlWriter) diff --git a/sd/qa/unit/data/xml/shapes-test_page7.xml b/sd/qa/unit/data/xml/shapes-test_page7.xml index 0a31e997b4a7..367b0549b5f1 100644 --- a/sd/qa/unit/data/xml/shapes-test_page7.xml +++ b/sd/qa/unit/data/xml/shapes-test_page7.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <XShapes> - <XShape positionX="1361" positionY="9000" sizeX="24639" sizeY="7858" type="com.sun.star.presentation.GraphicObjectShape" fontHeight="18.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="250" textRightDistance="250" textUpperDistance="125" textLowerDistance="125" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" shadow="false" shadowColor="808080" shadowTransparence="0" shadowXDistance="200" shadowYDistance="200" zOrder="0" layerID="0" layerName="layout" visible="true" printable="true" moveProtect="false" name="" sizeProtect="false"> + <XShape positionX="1361" positionY="9000" sizeX="24639" sizeY="7858" type="com.sun.star.presentation.GraphicObjectShape" fontHeight="18.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="CENTER" textVerticalAdjust="CENTER" textLeftDistance="250" textRightDistance="250" textUpperDistance="125" textLowerDistance="125" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" shadow="false" shadowColor="808080" shadowTransparence="0" shadowXDistance="200" shadowYDistance="200" zOrder="0" layerID="0" layerName="layout" visible="true" printable="true" moveProtect="false" sizeProtect="false"> <Transformation> <Line1 column1="24640.000000" column2="0.000000" column3="1361.000000"/> <Line2 column1="0.000000" column2="7859.000000" column3="9000.000000"/> |