remove assert looking for new compatibilityMode DOCX
[LibreOffice.git] / include / vcl / mtfxmldump.hxx
blob6c0723bdcf7149417bc3d9c693ceaa729067c764
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #ifndef INCLUDED_VCL_MTFXMLDUMP_HXX
11 #define INCLUDED_VCL_MTFXMLDUMP_HXX
13 #include <sal/config.h>
14 #include <vcl/dllapi.h>
15 #include <vcl/metaactiontypes.hxx>
16 #include <o3tl/enumarray.hxx>
18 namespace tools
20 class XmlWriter;
22 class GDIMetaFile;
23 class SvStream;
25 /**
26 * Class that is used for testing of the decomposition into shapes. Used like
27 * this:
29 * std::shared_ptr<GDIMetaFile> xMetaFile = xDocShRef->GetPreviewMetaFile();
30 * MetafileXmlDump dumper;
31 * xmlDocUniquePtr pXmlDoc = XmlTestTools::dumpAndParse(dumper, *xMetaFile);
32 * CPPUNIT_ASSERT(pXmlDoc);
34 * assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray[1]", "x", "2093");
36 * To see the dump to be able to create the assertXPath() call, use:
38 * xMetaFile->dumpAsXml();
40 * and check the output in /tmp/metafile.xml
42 class VCL_DLLPUBLIC MetafileXmlDump final
44 o3tl::enumarray<MetaActionType, bool> maFilter;
46 void writeXml(const GDIMetaFile& rMetaFile, tools::XmlWriter& rWriter);
48 public:
49 MetafileXmlDump();
51 void filterActionType(const MetaActionType nActionType, bool bShouldFilter);
52 void filterAllActionTypes();
54 /** The actual result that will be used for testing.
56 void dump(const GDIMetaFile& rMetaFile, SvStream& rStream);
59 #endif
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */