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