diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-06-10 18:15:55 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-06-10 19:33:12 +0200 |
commit | 2a649539b723a01649102ff7be3cab2bbdff834d (patch) | |
tree | 1876b69bd6d9ccf92f46fa41b4412ecbae0d5b5c /include/test | |
parent | 0048709ce4d86ce5aca116474b43d9f1c5c50de5 (diff) |
MetafileXmlDump: No need to specify the stream, simplify the API.
Change-Id: Ia08f67e359bbd26cefdba8661f0b0c4ae2147382
Diffstat (limited to 'include/test')
-rw-r--r-- | include/test/mtfxmldump.hxx | 13 | ||||
-rw-r--r-- | include/test/xmltesttools.hxx | 5 |
2 files changed, 14 insertions, 4 deletions
diff --git a/include/test/mtfxmldump.hxx b/include/test/mtfxmldump.hxx index 9da10c207ca2..86ffe9dcd3bb 100644 --- a/include/test/mtfxmldump.hxx +++ b/include/test/mtfxmldump.hxx @@ -13,23 +13,30 @@ #include <sal/config.h> #include <test/testdllapi.hxx> +#include <libxml/tree.h> #include <vcl/gdimtf.hxx> #include <vector> class OOO_DLLPUBLIC_TEST MetafileXmlDump { std::vector<bool> maFilter; - SvStream& mrStream; public: - MetafileXmlDump(SvStream& rStream); + MetafileXmlDump(); virtual ~MetafileXmlDump(); void filterActionType(const sal_uInt16 nActionType, bool bShouldFilter); void filterAllActionTypes(); void filterNoneActionTypes(); - void dump(GDIMetaFile& rMetaFile); + /** The actual result that will be used for testing. + + This function normally uses a SvMemoryStream for its operation; but + can use a physical file when a filename is specified in + pTempStreamName - this is useful when creating the test, to dump the + file for examination. + */ + xmlDocPtr dumpAndParse(GDIMetaFile& rMetaFile, const OUString& rTempStreamName = OUString()); }; #endif diff --git a/include/test/xmltesttools.hxx b/include/test/xmltesttools.hxx index 4849ed9afb5b..058bbc251743 100644 --- a/include/test/xmltesttools.hxx +++ b/include/test/xmltesttools.hxx @@ -27,12 +27,15 @@ class OOO_DLLPUBLIC_TEST XmlTestTools { +public: + /// Return xmlDocPtr representation of the XML stream read from pStream. + static xmlDocPtr parseXmlStream(SvStream* pStream); + protected: XmlTestTools(); virtual ~XmlTestTools(); htmlDocPtr parseXml(utl::TempFile& aTempFile); - htmlDocPtr parseXmlStream(SvStream* pStream); virtual void registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx); |