Bump version to 21.06.18.1
[LibreOffice.git] / include / drawinglayer / tools / primitive2dxmldump.hxx
blob9dc06e7b674dcddea23680d8f9b704b16058d15f
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_DRAWINGLAYER_TOOLS_PRIMITIVE2DXMLDUMP_HXX
11 #define INCLUDED_DRAWINGLAYER_TOOLS_PRIMITIVE2DXMLDUMP_HXX
13 #include <sal/config.h>
14 #include <drawinglayer/drawinglayerdllapi.h>
15 #include <libxml/tree.h>
16 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
17 #include <test/xmldocptr.hxx>
18 #include <vector>
20 namespace tools { class XmlWriter; }
22 namespace drawinglayer
25 class DRAWINGLAYER_DLLPUBLIC Primitive2dXmlDump final
27 private:
28 std::vector<bool> maFilter;
29 void decomposeAndWrite(const drawinglayer::primitive2d::Primitive2DContainer& rPrimitive2DSequence, tools::XmlWriter& rWriter);
31 public:
32 Primitive2dXmlDump();
33 ~Primitive2dXmlDump();
35 /** Dumps the input primitive sequence to xml into a file or memory stream and parses the xml for testing.
37 * if rStreamName is set, then the xml content will be dumped into a file,
38 * otherwise if the rStreamName is empty, then the content will be dumped
39 * into a memory stream.
42 xmlDocUniquePtr dumpAndParse(const drawinglayer::primitive2d::Primitive2DContainer& aPrimitive2DSequence, const OUString& rStreamName = OUString());
44 /** Dumps the input primitive sequence to xml into a file. */
45 void dump(const drawinglayer::primitive2d::Primitive2DContainer& rPrimitive2DSequence, const OUString& rStreamName);
51 #endif // INCLUDED_DRAWINGLAYER_TOOLS_PRIMITIVE2DXMLDUMP_HXX
53 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */