bump product version to 7.6.3.2-android
[LibreOffice.git] / include / vcl / mtfxmldump.hxx
blob9970ea8a0d5aa9a047ac7d0fec6395266bafe510
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 enum class MetaActionType;
27 /**
28 * Class that is used for testing of the decomposition into shapes. Used like
29 * this:
31 * std::shared_ptr<GDIMetaFile> xMetaFile = xDocShRef->GetPreviewMetaFile();
32 * MetafileXmlDump dumper;
33 * xmlDocUniquePtr pXmlDoc = XmlTestTools::dumpAndParse(dumper, *xMetaFile);
34 * CPPUNIT_ASSERT(pXmlDoc);
36 * assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray[1]", "x", "2093");
38 * To see the dump to be able to create the assertXPath() call, use:
40 * xMetaFile->dumpAsXml();
42 * and check the output in /tmp/metafile.xml
44 class VCL_DLLPUBLIC MetafileXmlDump final
46 o3tl::enumarray<MetaActionType, bool> maFilter;
48 void writeXml(const GDIMetaFile& rMetaFile, tools::XmlWriter& rWriter);
50 public:
51 MetafileXmlDump();
53 void filterActionType(const MetaActionType nActionType, bool bShouldFilter);
54 void filterAllActionTypes();
56 /** The actual result that will be used for testing.
58 void dump(const GDIMetaFile& rMetaFile, SvStream& rStream);
61 #endif
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */