VSDStencils.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libvisio project.
4 *
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 */
9
10 #ifndef __VSDSTENCILS_H__
11 #define __VSDSTENCILS_H__
12
13 #include <map>
14 #include <memory>
15 #include <vector>
16 #include "VSDStyles.h"
17 #include "VSDGeometryList.h"
18 #include "VSDFieldList.h"
19 #include "VSDTypes.h"
20 #include "VSDParagraphList.h"
21 #include "VSDCharacterList.h"
22 #include "VSDShapeList.h"
23
24 namespace libvisio
25 {
26
27 class VSDShape
28 {
29 public:
30 VSDShape();
31 VSDShape(const VSDShape &shape);
32 ~VSDShape();
33 VSDShape &operator=(const VSDShape &shape);
34 void clear();
35
36 std::map<unsigned, VSDGeometryList> m_geometries;
37 VSDShapeList m_shapeList;
38 VSDFieldList m_fields;
39 std::unique_ptr<ForeignData> m_foreign;
40 unsigned m_parent, m_masterPage, m_masterShape, m_shapeId;
41 unsigned m_lineStyleId, m_fillStyleId, m_textStyleId;
42 VSDOptionalLineStyle m_lineStyle;
43 VSDOptionalFillStyle m_fillStyle;
44 VSDOptionalTextBlockStyle m_textBlockStyle;
45 VSDOptionalCharStyle m_charStyle;
46 VSDCharacterList m_charList;
47 VSDOptionalParaStyle m_paraStyle;
48 VSDParagraphList m_paraList;
49 std::map<unsigned, VSDTabSet> m_tabSets;
50 librevenge::RVNGBinaryData m_text;
51 std::map<unsigned, VSDName> m_names;
52 TextFormat m_textFormat;
53 std::map<unsigned, NURBSData> m_nurbsData;
54 std::map<unsigned, PolylineData> m_polylineData;
55 XForm m_xform;
56 std::unique_ptr<XForm> m_txtxform;
57 std::unique_ptr<XForm1D> m_xform1d;
58 VSDMisc m_misc;
59 VSDName m_layerMem;
60 };
61
62 class VSDStencil
63 {
64 public:
65 VSDStencil();
66 VSDStencil(const VSDStencil &stencil) = default;
67 ~VSDStencil();
68 VSDStencil &operator=(const VSDStencil &stencil) = default;
69 void addStencilShape(unsigned id, const VSDShape &shape);
70 void setFirstShape(unsigned id);
71 const VSDShape *getStencilShape(unsigned id) const;
72 std::map<unsigned, VSDShape> m_shapes;
73 double m_shadowOffsetX;
74 double m_shadowOffsetY;
75 unsigned m_firstShapeId;
76 };
77
78 class VSDStencils
79 {
80 public:
81 VSDStencils();
82 ~VSDStencils();
83 void addStencil(unsigned idx, const VSDStencil &stencil);
84 const VSDStencil *getStencil(unsigned idx) const;
85 const VSDShape *getStencilShape(unsigned pageId, unsigned shapeId) const;
86 unsigned count() const
87 {
88 return m_stencils.size();
89 }
90 private:
91 std::map<unsigned, VSDStencil> m_stencils;
92 };
93
94
95 } // namespace libvisio
96
97 #endif // __VSDSTENCILS_H__
98 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libvisio::VSDStencil::getStencilShape
const VSDShape * getStencilShape(unsigned id) const
Definition: VSDStencils.cpp:135
libvisio::VSDShape::m_lineStyleId
unsigned m_lineStyleId
Definition: VSDStencils.h:41
VSDGeometryList.h
VSDCharacterList.h
libvisio::VSDStencils::~VSDStencils
~VSDStencils()
Definition: VSDStencils.cpp:151
libvisio::VSDShape::m_xform
XForm m_xform
Definition: VSDStencils.h:55
libvisio::VSDShape::m_foreign
std::unique_ptr< ForeignData > m_foreign
Definition: VSDStencils.h:39
libvisio::VSDStencils::m_stencils
std::map< unsigned, VSDStencil > m_stencils
Definition: VSDStencils.h:91
VSDFieldList.h
VSDShapeList.h
libvisio::VSDStencil::~VSDStencil
~VSDStencil()
Definition: VSDStencils.cpp:120
libvisio::VSDShape::m_geometries
std::map< unsigned, VSDGeometryList > m_geometries
Definition: VSDStencils.h:36
libvisio::VSDShape::m_shapeList
VSDShapeList m_shapeList
Definition: VSDStencils.h:37
libvisio::VSDShape::m_textFormat
TextFormat m_textFormat
Definition: VSDStencils.h:52
libvisio::XForm
Definition: VSDTypes.h:22
libvisio::VSDStencils::VSDStencils
VSDStencils()
Definition: VSDStencils.cpp:146
libvisio::VSDStencil::addStencilShape
void addStencilShape(unsigned id, const VSDShape &shape)
Definition: VSDStencils.cpp:124
libvisio::VSDShape::m_fillStyleId
unsigned m_fillStyleId
Definition: VSDStencils.h:41
libvisio::VSDShape::m_masterShape
unsigned m_masterShape
Definition: VSDStencils.h:40
libvisio::VSDShape::m_fillStyle
VSDOptionalFillStyle m_fillStyle
Definition: VSDStencils.h:43
libvisio::VSDShape::m_lineStyle
VSDOptionalLineStyle m_lineStyle
Definition: VSDStencils.h:42
libvisio::VSDStencils::count
unsigned count() const
Definition: VSDStencils.h:86
libvisio::VSDShape::m_shapeId
unsigned m_shapeId
Definition: VSDStencils.h:40
libvisio::VSDStencils
Definition: VSDStencils.h:78
libvisio::VSDShape::m_misc
VSDMisc m_misc
Definition: VSDStencils.h:58
libvisio::VSDShape::m_textStyleId
unsigned m_textStyleId
Definition: VSDStencils.h:41
libvisio::VSDStencil::m_shadowOffsetX
double m_shadowOffsetX
Definition: VSDStencils.h:73
libvisio::VSDStencil
Definition: VSDStencils.h:62
libvisio::VSDCharacterList
Definition: VSDCharacterList.h:25
libvisio::VSDShape::m_names
std::map< unsigned, VSDName > m_names
Definition: VSDStencils.h:51
VSDStyles.h
libvisio::VSDShape::m_layerMem
VSDName m_layerMem
Definition: VSDStencils.h:59
libvisio::VSDOptionalParaStyle
Definition: VSDStyles.h:322
libvisio::VSDStencil::m_firstShapeId
unsigned m_firstShapeId
Definition: VSDStencils.h:75
VSDTypes.h
libvisio::VSDFieldList
Definition: VSDFieldList.h:87
libvisio::VSDShape::m_nurbsData
std::map< unsigned, NURBSData > m_nurbsData
Definition: VSDStencils.h:53
libvisio::VSDStencil::m_shadowOffsetY
double m_shadowOffsetY
Definition: VSDStencils.h:74
libvisio::VSDShape::m_paraStyle
VSDOptionalParaStyle m_paraStyle
Definition: VSDStencils.h:47
libvisio::VSDShape::VSDShape
VSDShape()
Definition: VSDStencils.cpp:14
libvisio::VSDOptionalCharStyle
Definition: VSDStyles.h:208
libvisio::VSDShape::m_polylineData
std::map< unsigned, PolylineData > m_polylineData
Definition: VSDStencils.h:54
libvisio::VSDShape::clear
void clear()
Definition: VSDStencils.cpp:81
libvisio::VSDShape::m_charStyle
VSDOptionalCharStyle m_charStyle
Definition: VSDStencils.h:45
libvisio::VSDShape::~VSDShape
~VSDShape()
Definition: VSDStencils.cpp:39
libvisio::XForm1D
Definition: VSDTypes.h:42
libvisio::VSDShape::m_xform1d
std::unique_ptr< XForm1D > m_xform1d
Definition: VSDStencils.h:57
libvisio::VSDStencils::getStencilShape
const VSDShape * getStencilShape(unsigned pageId, unsigned shapeId) const
Definition: VSDStencils.cpp:169
libvisio::VSD_TEXT_UTF16
Definition: VSDTypes.h:167
libvisio::VSDOptionalLineStyle
Definition: VSDStyles.h:23
libvisio::VSDShape::m_tabSets
std::map< unsigned, VSDTabSet > m_tabSets
Definition: VSDStencils.h:49
libvisio::VSDShapeList
Definition: VSDShapeList.h:19
libvisio::VSDMisc
Definition: VSDTypes.h:203
libvisio::VSDShape::m_txtxform
std::unique_ptr< XForm > m_txtxform
Definition: VSDStencils.h:56
VSDStencils.h
libvisio::VSDStencil::VSDStencil
VSDStencil()
Definition: VSDStencils.cpp:115
libvisio::ForeignData
Definition: VSDTypes.h:126
libvisio::TextFormat
TextFormat
Definition: VSDTypes.h:149
libvisio::VSDShape::m_parent
unsigned m_parent
Definition: VSDStencils.h:40
libvisio::VSDShape::m_textBlockStyle
VSDOptionalTextBlockStyle m_textBlockStyle
Definition: VSDStencils.h:44
libvisio::VSDStencils::getStencil
const VSDStencil * getStencil(unsigned idx) const
Definition: VSDStencils.cpp:160
libvisio::VSDShape
Definition: VSDStencils.h:27
libvisio::VSDStencil::operator=
VSDStencil & operator=(const VSDStencil &stencil)=default
VSDParagraphList.h
libvisio::VSDShape::m_text
librevenge::RVNGBinaryData m_text
Definition: VSDStencils.h:50
libvisio::VSDName
Definition: VSDTypes.h:170
libvisio::VSDStencils::addStencil
void addStencil(unsigned idx, const VSDStencil &stencil)
Definition: VSDStencils.cpp:155
MINUS_ONE
#define MINUS_ONE
Definition: VSDTypes.h:18
libvisio::VSDShape::m_fields
VSDFieldList m_fields
Definition: VSDStencils.h:38
libvisio::VSDStencil::setFirstShape
void setFirstShape(unsigned id)
Definition: VSDStencils.cpp:129
libvisio::VSDShape::m_masterPage
unsigned m_masterPage
Definition: VSDStencils.h:40
libvisio::VSDOptionalFillStyle
Definition: VSDStyles.h:103
libvisio_utils.h
libvisio::VSDParagraphList
Definition: VSDParagraphList.h:24
libvisio::VSDShape::m_charList
VSDCharacterList m_charList
Definition: VSDStencils.h:46
libvisio::VSDStencil::m_shapes
std::map< unsigned, VSDShape > m_shapes
Definition: VSDStencils.h:72
libvisio::VSDShape::m_paraList
VSDParagraphList m_paraList
Definition: VSDStencils.h:48
libvisio::VSDShape::operator=
VSDShape & operator=(const VSDShape &shape)
Definition: VSDStencils.cpp:44
libvisio::VSDOptionalTextBlockStyle
Definition: VSDStyles.h:419
libvisio
Definition: libvisio_utils.h:48