Kaydet (Commit) fb1e8105 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

test: don't create root element in startDocument() in xmlwriter

Change-Id: Ia08e9f8caf2a2fb42855dcb2245e013e1a181216
üst b7cb2ae5
...@@ -25,7 +25,7 @@ public: ...@@ -25,7 +25,7 @@ public:
XmlWriter(xmlTextWriterPtr pWriter); XmlWriter(xmlTextWriterPtr pWriter);
virtual ~XmlWriter(); virtual ~XmlWriter();
void startDocument(const OString& sTagName); void startDocument();
void endDocument(); void endDocument();
void element(const OString& sTagName); void element(const OString& sTagName);
......
...@@ -168,7 +168,8 @@ void MetafileXmlDump::dump(GDIMetaFile& rMetaFile) ...@@ -168,7 +168,8 @@ void MetafileXmlDump::dump(GDIMetaFile& rMetaFile)
xmlTextWriterSetIndent( xmlWriter, 1 ); xmlTextWriterSetIndent( xmlWriter, 1 );
XmlWriter aWriter(xmlWriter); XmlWriter aWriter(xmlWriter);
aWriter.startDocument("metafile"); aWriter.startDocument();
aWriter.startElement("metafile");
for(MetaAction* pAction = rMetaFile.FirstAction(); pAction != NULL; pAction = rMetaFile.NextAction()) for(MetaAction* pAction = rMetaFile.FirstAction(); pAction != NULL; pAction = rMetaFile.NextAction())
{ {
...@@ -391,12 +392,9 @@ void MetafileXmlDump::dump(GDIMetaFile& rMetaFile) ...@@ -391,12 +392,9 @@ void MetafileXmlDump::dump(GDIMetaFile& rMetaFile)
} }
} }
aWriter.endDocument();
for(size_t i=0; i<usedIds.size(); ++i) aWriter.endElement();
if(usedIds[i]) aWriter.endDocument();
printf("%ld ", i);
printf("\n");
mrStream.WriteOString(aString.makeStringAndClear()); mrStream.WriteOString(aString.makeStringAndClear());
} }
......
...@@ -27,10 +27,9 @@ XmlWriter::XmlWriter(xmlTextWriterPtr pWriter) : ...@@ -27,10 +27,9 @@ XmlWriter::XmlWriter(xmlTextWriterPtr pWriter) :
XmlWriter::~XmlWriter() XmlWriter::~XmlWriter()
{} {}
void XmlWriter::startDocument(const OString& name) void XmlWriter::startDocument()
{ {
xmlTextWriterStartDocument(mpWriter, NULL, NULL, NULL); xmlTextWriterStartDocument(mpWriter, NULL, NULL, NULL);
startElement(name);
} }
void XmlWriter::endDocument() void XmlWriter::endDocument()
......
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