WP6CharacterGroup.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libwpd
3 * Version: MPL 2.0 / LGPLv2.1+
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 * Major Contributor(s):
10 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
11 * Copyright (C) 2002 Marc Maurer (uwog@uwog.net)
12 *
13 * For minor contributions see the git repository.
14 *
15 * Alternatively, the contents of this file may be used under the terms
16 * of the GNU Lesser General Public License Version 2.1 or later
17 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
18 * applicable instead of those above.
19 *
20 * For further information visit http://libwpd.sourceforge.net
21 */
22
23 /* "This product is not manufactured, approved, or supported by
24 * Corel Corporation or Corel Corporation Limited."
25 */
26
27 #ifndef WP6CHARACTERGROUP_H
28 #define WP6CHARACTERGROUP_H
29
30 #include <memory>
31
32 #include "WP6VariableLengthGroup.h"
33 #include "WP6FontDescriptorPacket.h"
34
35 class WP6CharacterGroup_SetAlignmentCharacterSubGroup: public WP6VariableLengthGroup_SubGroup
36 {
37 public:
38 WP6CharacterGroup_SetAlignmentCharacterSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
39 void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
40
41 private:
42 unsigned char m_character;
43 unsigned char m_characterSet;
44 };
45
46 class WP6CharacterGroup_ColorSubGroup: public WP6VariableLengthGroup_SubGroup
47 {
48 public:
49 WP6CharacterGroup_ColorSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
50 void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
51
52 private:
53 unsigned char m_red;
54 unsigned char m_green;
55 unsigned char m_blue;
56 };
57
58 class WP6CharacterGroup_CharacterShadingChangeSubGroup: public WP6VariableLengthGroup_SubGroup
59 {
60 public:
61 WP6CharacterGroup_CharacterShadingChangeSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
62 void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
63
64 private:
65 unsigned char m_shading;
66 };
67
68 class WP6CharacterGroup_FontFaceChangeSubGroup : public WP6VariableLengthGroup_SubGroup
69 {
70 public:
71 WP6CharacterGroup_FontFaceChangeSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption, unsigned short sizeDeletable);
72 ~WP6CharacterGroup_FontFaceChangeSubGroup() override;
73 void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
74
75 private:
76 unsigned short m_oldMatchedPointSize;
77 unsigned short m_hash;
78 unsigned short m_matchedFontIndex;
79 unsigned short m_matchedFontPointSize;
80 std::unique_ptr<WP6FontDescriptorPacket> m_packet;
81 // Unimplemented to prevent compiler from creating crasher ones
82 WP6CharacterGroup_FontFaceChangeSubGroup(const WP6CharacterGroup_FontFaceChangeSubGroup &);
83 WP6CharacterGroup_FontFaceChangeSubGroup &operator=(const WP6CharacterGroup_FontFaceChangeSubGroup &);
84
85 };
86
87 class WP6CharacterGroup_FontSizeChangeSubGroup : public WP6VariableLengthGroup_SubGroup
88 {
89 public:
90 WP6CharacterGroup_FontSizeChangeSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
91 void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
92
93 private:
94 unsigned short m_desiredFontPointSize;
95 };
96
97 class WP6CharacterGroup_SetDotLeaderCharactersSubGroup: public WP6VariableLengthGroup_SubGroup
98 {
99 public:
100 WP6CharacterGroup_SetDotLeaderCharactersSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
101 void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
102
103 private:
104 unsigned char m_character;
105 unsigned char m_characterSet;
106 unsigned char m_numberOfSpaces;
107 };
108
109 class WP6CharacterGroup_ParagraphNumberOnSubGroup : public WP6VariableLengthGroup_SubGroup
110 {
111 public:
112 WP6CharacterGroup_ParagraphNumberOnSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
113 void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
114
115 private:
116 unsigned short m_outlineHash;
117 unsigned char m_level;
118 unsigned char m_flag;
119 };
120
121 class WP6CharacterGroup_TableDefinitionOnSubGroup : public WP6VariableLengthGroup_SubGroup
122 {
123 public:
124 WP6CharacterGroup_TableDefinitionOnSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
125 void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
126
127 private:
128 unsigned char m_flags;
129 unsigned char m_position;
130 unsigned short m_leftOffset;
131 };
132
133 class WP6CharacterGroup_TableDefinitionOffSubGroup : public WP6VariableLengthGroup_SubGroup
134 {
135 public:
136 WP6CharacterGroup_TableDefinitionOffSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
137 void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
138
139 private:
140
141 };
142
143 class WP6CharacterGroup_TableColumnSubGroup : public WP6VariableLengthGroup_SubGroup
144 {
145 public:
146 WP6CharacterGroup_TableColumnSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
147 void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
148
149 private:
150 unsigned char m_flags;
151 unsigned short m_width;
152 unsigned short m_leftGutter;
153 unsigned short m_rightGutter;
154 unsigned m_attributes;
155 unsigned char m_alignment;
156 unsigned short m_absPosFromRight;
157 unsigned short m_numberType;
158 unsigned char m_currencyIndex;
159 };
160
161 class WP6CharacterGroup_CommentSubGroup : public WP6VariableLengthGroup_SubGroup
162 {
163 public:
164 WP6CharacterGroup_CommentSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
165 void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
166
167 private:
168
169 };
170
171 class WP6CharacterGroup : public WP6VariableLengthGroup
172 {
173 public:
174 WP6CharacterGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
175 ~WP6CharacterGroup() override;
176 void _readContents(librevenge::RVNGInputStream *input, WPXEncryption *encryption) override;
177 void parse(WP6Listener *listener) override;
178
179 private:
180 WP6CharacterGroup(const WP6CharacterGroup &);
181 WP6CharacterGroup &operator=(const WP6CharacterGroup &);
182 std::unique_ptr<WP6VariableLengthGroup_SubGroup> m_subGroupData;
183
184 };
185
186 #endif /* WP6CHARACTERGROUP_H */
187 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WP6FontDescriptorPacket.h
WP6VariableLengthGroup.h
WP6CharacterGroup_CharacterShadingChangeSubGroup
Definition: WP6CharacterGroup.h:59
WP6CharacterGroup_CharacterShadingChangeSubGroup::m_shading
unsigned char m_shading
Definition: WP6CharacterGroup.h:65
WP6CharacterGroup_CharacterShadingChangeSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition: WP6CharacterGroup.cpp:86
WP6CharacterGroup_CharacterShadingChangeSubGroup::WP6CharacterGroup_CharacterShadingChangeSubGroup
WP6CharacterGroup_CharacterShadingChangeSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition: WP6CharacterGroup.cpp:79
WP6CharacterGroup_ColorSubGroup
Definition: WP6CharacterGroup.h:47
WP6CharacterGroup_ColorSubGroup::WP6CharacterGroup_ColorSubGroup
WP6CharacterGroup_ColorSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition: WP6CharacterGroup.cpp:61
WP6CharacterGroup_ColorSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition: WP6CharacterGroup.cpp:70
WP6CharacterGroup_ColorSubGroup::m_red
unsigned char m_red
Definition: WP6CharacterGroup.h:53
WP6CharacterGroup_ColorSubGroup::m_blue
unsigned char m_blue
Definition: WP6CharacterGroup.h:55
WP6CharacterGroup_ColorSubGroup::m_green
unsigned char m_green
Definition: WP6CharacterGroup.h:54
WP6CharacterGroup_CommentSubGroup
Definition: WP6CharacterGroup.h:162
WP6CharacterGroup_CommentSubGroup::WP6CharacterGroup_CommentSubGroup
WP6CharacterGroup_CommentSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition: WP6CharacterGroup.cpp:253
WP6CharacterGroup_CommentSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition: WP6CharacterGroup.cpp:257
WP6CharacterGroup_FontFaceChangeSubGroup
Definition: WP6CharacterGroup.h:69
WP6CharacterGroup_FontFaceChangeSubGroup::operator=
WP6CharacterGroup_FontFaceChangeSubGroup & operator=(const WP6CharacterGroup_FontFaceChangeSubGroup &)
WP6CharacterGroup_FontFaceChangeSubGroup::m_matchedFontIndex
unsigned short m_matchedFontIndex
Definition: WP6CharacterGroup.h:78
WP6CharacterGroup_FontFaceChangeSubGroup::m_matchedFontPointSize
unsigned short m_matchedFontPointSize
Definition: WP6CharacterGroup.h:79
WP6CharacterGroup_FontFaceChangeSubGroup::WP6CharacterGroup_FontFaceChangeSubGroup
WP6CharacterGroup_FontFaceChangeSubGroup(const WP6CharacterGroup_FontFaceChangeSubGroup &)
WP6CharacterGroup_FontFaceChangeSubGroup::m_oldMatchedPointSize
unsigned short m_oldMatchedPointSize
Definition: WP6CharacterGroup.h:76
WP6CharacterGroup_FontFaceChangeSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition: WP6CharacterGroup.cpp:117
WP6CharacterGroup_FontFaceChangeSubGroup::m_packet
std::unique_ptr< WP6FontDescriptorPacket > m_packet
Definition: WP6CharacterGroup.h:80
WP6CharacterGroup_FontFaceChangeSubGroup::WP6CharacterGroup_FontFaceChangeSubGroup
WP6CharacterGroup_FontFaceChangeSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption, unsigned short sizeDeletable)
Definition: WP6CharacterGroup.cpp:96
WP6CharacterGroup_FontFaceChangeSubGroup::m_hash
unsigned short m_hash
Definition: WP6CharacterGroup.h:77
WP6CharacterGroup_FontFaceChangeSubGroup::~WP6CharacterGroup_FontFaceChangeSubGroup
~WP6CharacterGroup_FontFaceChangeSubGroup() override
Definition: WP6CharacterGroup.cpp:113
WP6CharacterGroup_FontSizeChangeSubGroup
Definition: WP6CharacterGroup.h:88
WP6CharacterGroup_FontSizeChangeSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition: WP6CharacterGroup.cpp:136
WP6CharacterGroup_FontSizeChangeSubGroup::m_desiredFontPointSize
unsigned short m_desiredFontPointSize
Definition: WP6CharacterGroup.h:94
WP6CharacterGroup_FontSizeChangeSubGroup::WP6CharacterGroup_FontSizeChangeSubGroup
WP6CharacterGroup_FontSizeChangeSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition: WP6CharacterGroup.cpp:129
WP6CharacterGroup_ParagraphNumberOnSubGroup
Definition: WP6CharacterGroup.h:110
WP6CharacterGroup_ParagraphNumberOnSubGroup::m_flag
unsigned char m_flag
Definition: WP6CharacterGroup.h:118
WP6CharacterGroup_ParagraphNumberOnSubGroup::WP6CharacterGroup_ParagraphNumberOnSubGroup
WP6CharacterGroup_ParagraphNumberOnSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition: WP6CharacterGroup.cpp:173
WP6CharacterGroup_ParagraphNumberOnSubGroup::m_level
unsigned char m_level
Definition: WP6CharacterGroup.h:117
WP6CharacterGroup_ParagraphNumberOnSubGroup::m_outlineHash
unsigned short m_outlineHash
Definition: WP6CharacterGroup.h:116
WP6CharacterGroup_ParagraphNumberOnSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition: WP6CharacterGroup.cpp:183
WP6CharacterGroup_SetAlignmentCharacterSubGroup
Definition: WP6CharacterGroup.h:36
WP6CharacterGroup_SetAlignmentCharacterSubGroup::m_characterSet
unsigned char m_characterSet
Definition: WP6CharacterGroup.h:43
WP6CharacterGroup_SetAlignmentCharacterSubGroup::m_character
unsigned char m_character
Definition: WP6CharacterGroup.h:42
WP6CharacterGroup_SetAlignmentCharacterSubGroup::WP6CharacterGroup_SetAlignmentCharacterSubGroup
WP6CharacterGroup_SetAlignmentCharacterSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition: WP6CharacterGroup.cpp:39
WP6CharacterGroup_SetAlignmentCharacterSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition: WP6CharacterGroup.cpp:48
WP6CharacterGroup_SetDotLeaderCharactersSubGroup
Definition: WP6CharacterGroup.h:98
WP6CharacterGroup_SetDotLeaderCharactersSubGroup::m_character
unsigned char m_character
Definition: WP6CharacterGroup.h:104
WP6CharacterGroup_SetDotLeaderCharactersSubGroup::WP6CharacterGroup_SetDotLeaderCharactersSubGroup
WP6CharacterGroup_SetDotLeaderCharactersSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition: WP6CharacterGroup.cpp:148
WP6CharacterGroup_SetDotLeaderCharactersSubGroup::m_numberOfSpaces
unsigned char m_numberOfSpaces
Definition: WP6CharacterGroup.h:106
WP6CharacterGroup_SetDotLeaderCharactersSubGroup::m_characterSet
unsigned char m_characterSet
Definition: WP6CharacterGroup.h:105
WP6CharacterGroup_SetDotLeaderCharactersSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition: WP6CharacterGroup.cpp:159
WP6CharacterGroup_TableColumnSubGroup
Definition: WP6CharacterGroup.h:144
WP6CharacterGroup_TableColumnSubGroup::m_flags
unsigned char m_flags
Definition: WP6CharacterGroup.h:150
WP6CharacterGroup_TableColumnSubGroup::m_currencyIndex
unsigned char m_currencyIndex
Definition: WP6CharacterGroup.h:158
WP6CharacterGroup_TableColumnSubGroup::m_leftGutter
unsigned short m_leftGutter
Definition: WP6CharacterGroup.h:152
WP6CharacterGroup_TableColumnSubGroup::m_rightGutter
unsigned short m_rightGutter
Definition: WP6CharacterGroup.h:153
WP6CharacterGroup_TableColumnSubGroup::m_attributes
unsigned m_attributes
Definition: WP6CharacterGroup.h:154
WP6CharacterGroup_TableColumnSubGroup::m_absPosFromRight
unsigned short m_absPosFromRight
Definition: WP6CharacterGroup.h:156
WP6CharacterGroup_TableColumnSubGroup::m_numberType
unsigned short m_numberType
Definition: WP6CharacterGroup.h:157
WP6CharacterGroup_TableColumnSubGroup::WP6CharacterGroup_TableColumnSubGroup
WP6CharacterGroup_TableColumnSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition: WP6CharacterGroup.cpp:227
WP6CharacterGroup_TableColumnSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition: WP6CharacterGroup.cpp:244
WP6CharacterGroup_TableColumnSubGroup::m_width
unsigned short m_width
Definition: WP6CharacterGroup.h:151
WP6CharacterGroup_TableColumnSubGroup::m_alignment
unsigned char m_alignment
Definition: WP6CharacterGroup.h:155
WP6CharacterGroup_TableDefinitionOffSubGroup
Definition: WP6CharacterGroup.h:134
WP6CharacterGroup_TableDefinitionOffSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition: WP6CharacterGroup.cpp:216
WP6CharacterGroup_TableDefinitionOffSubGroup::WP6CharacterGroup_TableDefinitionOffSubGroup
WP6CharacterGroup_TableDefinitionOffSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition: WP6CharacterGroup.cpp:212
WP6CharacterGroup_TableDefinitionOnSubGroup
Definition: WP6CharacterGroup.h:122
WP6CharacterGroup_TableDefinitionOnSubGroup::WP6CharacterGroup_TableDefinitionOnSubGroup
WP6CharacterGroup_TableDefinitionOnSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition: WP6CharacterGroup.cpp:193
WP6CharacterGroup_TableDefinitionOnSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition: WP6CharacterGroup.cpp:202
WP6CharacterGroup_TableDefinitionOnSubGroup::m_flags
unsigned char m_flags
Definition: WP6CharacterGroup.h:128
WP6CharacterGroup_TableDefinitionOnSubGroup::m_position
unsigned char m_position
Definition: WP6CharacterGroup.h:129
WP6CharacterGroup_TableDefinitionOnSubGroup::m_leftOffset
unsigned short m_leftOffset
Definition: WP6CharacterGroup.h:130
WP6CharacterGroup
Definition: WP6CharacterGroup.h:172
WP6CharacterGroup::~WP6CharacterGroup
~WP6CharacterGroup() override
Definition: WP6CharacterGroup.cpp:284
WP6CharacterGroup::WP6CharacterGroup
WP6CharacterGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition: WP6CharacterGroup.cpp:277
WP6CharacterGroup::operator=
WP6CharacterGroup & operator=(const WP6CharacterGroup &)
WP6CharacterGroup::m_subGroupData
std::unique_ptr< WP6VariableLengthGroup_SubGroup > m_subGroupData
Definition: WP6CharacterGroup.h:182
WP6CharacterGroup::_readContents
void _readContents(librevenge::RVNGInputStream *input, WPXEncryption *encryption) override
Definition: WP6CharacterGroup.cpp:288
WP6CharacterGroup::parse
void parse(WP6Listener *listener) override
Definition: WP6CharacterGroup.cpp:332
WP6CharacterGroup::WP6CharacterGroup
WP6CharacterGroup(const WP6CharacterGroup &)
WP6Listener
Definition: WP6Listener.h:41
WP6VariableLengthGroup_SubGroup
Definition: WP6VariableLengthGroup.h:36
WP6VariableLengthGroup
Definition: WP6VariableLengthGroup.h:43
WPXEncryption
Definition: WPXEncryption.h:36