diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-05-15 23:49:17 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-05-15 23:50:58 +0200 |
commit | fb1e8105536a5c3a2cbe291e012294da562cd9f4 (patch) | |
tree | 88961261f41639e4e8b3f2b3a191cc4295b4a6bc /test | |
parent | b7cb2ae5026cfd3bb30f148ed40f244b5c128876 (diff) |
test: don't create root element in startDocument() in xmlwriter
Change-Id: Ia08e9f8caf2a2fb42855dcb2245e013e1a181216
Diffstat (limited to 'test')
-rw-r--r-- | test/source/mtfxmldump.cxx | 10 | ||||
-rw-r--r-- | test/source/xmlwriter.cxx | 3 |
2 files changed, 5 insertions, 8 deletions
diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx index ef127e355867..31f9aba37978 100644 --- a/test/source/mtfxmldump.cxx +++ b/test/source/mtfxmldump.cxx @@ -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()); } diff --git a/test/source/xmlwriter.cxx b/test/source/xmlwriter.cxx index 3485f1030537..b1166be647f0 100644 --- a/test/source/xmlwriter.cxx +++ b/test/source/xmlwriter.cxx @@ -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() |