[Libreoffice-commits] core.git: 2 commits - include/test test/source vcl/qa
Tomaž Vajngerl
tomaz.vajngerl at collabora.com
Thu May 15 14:50:12 PDT 2014
include/test/xmlwriter.hxx | 2 +-
test/source/mtfxmldump.cxx | 10 ++++------
test/source/xmlwriter.cxx | 3 +--
vcl/qa/cppunit/wmf/wmfimporttest.cxx | 1 +
4 files changed, 7 insertions(+), 9 deletions(-)
New commits:
commit fd70beaccb8655ed962bb306ed34c6c134e3922e
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date: Thu May 15 23:50:23 2014 +0200
vcl wmf test: null terminate stream
Change-Id: I10342262cacbe3e3d978fee652cdbc4692f46dc4
diff --git a/vcl/qa/cppunit/wmf/wmfimporttest.cxx b/vcl/qa/cppunit/wmf/wmfimporttest.cxx
index d4db955..12d1942 100644
--- a/vcl/qa/cppunit/wmf/wmfimporttest.cxx
+++ b/vcl/qa/cppunit/wmf/wmfimporttest.cxx
@@ -54,6 +54,7 @@ void WmfTest::testNonPlaceableWmf()
dumper.filterActionType(META_POLYLINE_ACTION, false);
dumper.dump(aGDIMetaFile);
+ aStream->WriteChar(0);
aStream->Seek(STREAM_SEEK_TO_BEGIN);
xmlDocPtr pDoc = parseXmlStream(aStream.get());
commit fb1e8105536a5c3a2cbe291e012294da562cd9f4
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date: Thu May 15 23:49:17 2014 +0200
test: don't create root element in startDocument() in xmlwriter
Change-Id: Ia08e9f8caf2a2fb42855dcb2245e013e1a181216
diff --git a/include/test/xmlwriter.hxx b/include/test/xmlwriter.hxx
index e4df527..1f5bfc7 100644
--- a/include/test/xmlwriter.hxx
+++ b/include/test/xmlwriter.hxx
@@ -25,7 +25,7 @@ public:
XmlWriter(xmlTextWriterPtr pWriter);
virtual ~XmlWriter();
- void startDocument(const OString& sTagName);
+ void startDocument();
void endDocument();
void element(const OString& sTagName);
diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx
index ef127e3..31f9aba 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 3485f10..b1166be 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()
More information about the Libreoffice-commits
mailing list