WP6CharacterGroup.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
00002 /* libwpd
00003  * Version: MPL 2.0 / LGPLv2.1+
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  *
00009  * Major Contributor(s):
00010  * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
00011  * Copyright (C) 2002 Marc Maurer (uwog@uwog.net)
00012  *
00013  * For minor contributions see the git repository.
00014  *
00015  * Alternatively, the contents of this file may be used under the terms
00016  * of the GNU Lesser General Public License Version 2.1 or later
00017  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
00018  * applicable instead of those above.
00019  *
00020  * For further information visit http://libwpd.sourceforge.net
00021  */
00022 
00023 /* "This product is not manufactured, approved, or supported by
00024  * Corel Corporation or Corel Corporation Limited."
00025  */
00026 
00027 #ifndef WP6CHARACTERGROUP_H
00028 #define WP6CHARACTERGROUP_H
00029 
00030 #include "WP6VariableLengthGroup.h"
00031 #include "WP6FontDescriptorPacket.h"
00032 
00033 class WP6CharacterGroup_SetAlignmentCharacterSubGroup: public WP6VariableLengthGroup_SubGroup
00034 {
00035 public:
00036         WP6CharacterGroup_SetAlignmentCharacterSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
00037         void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const;
00038 
00039 private:
00040         unsigned char m_character;
00041         unsigned char m_characterSet;
00042 };
00043 
00044 class WP6CharacterGroup_ColorSubGroup: public WP6VariableLengthGroup_SubGroup
00045 {
00046 public:
00047         WP6CharacterGroup_ColorSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
00048         void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const;
00049 
00050 private:
00051         unsigned char m_red;
00052         unsigned char m_green;
00053         unsigned char m_blue;
00054 };
00055 
00056 class WP6CharacterGroup_CharacterShadingChangeSubGroup: public WP6VariableLengthGroup_SubGroup
00057 {
00058 public:
00059         WP6CharacterGroup_CharacterShadingChangeSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
00060         void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const;
00061 
00062 private:
00063         unsigned char m_shading;
00064 };
00065 
00066 class WP6CharacterGroup_FontFaceChangeSubGroup : public WP6VariableLengthGroup_SubGroup
00067 {
00068 public:
00069         WP6CharacterGroup_FontFaceChangeSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption, unsigned short sizeDeletable);
00070         ~WP6CharacterGroup_FontFaceChangeSubGroup();
00071         void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const;
00072 
00073 private:
00074         unsigned short m_oldMatchedPointSize;
00075         unsigned short m_hash;
00076         unsigned short m_matchedFontIndex;
00077         unsigned short m_matchedFontPointSize;
00078         WP6FontDescriptorPacket *m_packet;
00079         // Unimplemented to prevent compiler from creating crasher ones
00080         WP6CharacterGroup_FontFaceChangeSubGroup(const WP6CharacterGroup_FontFaceChangeSubGroup &);
00081         WP6CharacterGroup_FontFaceChangeSubGroup &operator=(const WP6CharacterGroup_FontFaceChangeSubGroup &);
00082 
00083 };
00084 
00085 class WP6CharacterGroup_FontSizeChangeSubGroup : public WP6VariableLengthGroup_SubGroup
00086 {
00087 public:
00088         WP6CharacterGroup_FontSizeChangeSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
00089         void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const;
00090 
00091 private:
00092         unsigned short m_desiredFontPointSize;
00093 };
00094 
00095 class WP6CharacterGroup_SetDotLeaderCharactersSubGroup: public WP6VariableLengthGroup_SubGroup
00096 {
00097 public:
00098         WP6CharacterGroup_SetDotLeaderCharactersSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
00099         void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const;
00100 
00101 private:
00102         unsigned char m_character;
00103         unsigned char m_characterSet;
00104         unsigned char m_numberOfSpaces;
00105 };
00106 
00107 class WP6CharacterGroup_ParagraphNumberOnSubGroup : public WP6VariableLengthGroup_SubGroup
00108 {
00109 public:
00110         WP6CharacterGroup_ParagraphNumberOnSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
00111         void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const;
00112 
00113 private:
00114         unsigned short m_outlineHash;
00115         unsigned char m_level;
00116         unsigned char m_flag;
00117 };
00118 
00119 class WP6CharacterGroup_TableDefinitionOnSubGroup : public WP6VariableLengthGroup_SubGroup
00120 {
00121 public:
00122         WP6CharacterGroup_TableDefinitionOnSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
00123         void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const;
00124 
00125 private:
00126         unsigned char m_flags;
00127         unsigned char m_position;
00128         unsigned short m_leftOffset;
00129 };
00130 
00131 class WP6CharacterGroup_TableDefinitionOffSubGroup : public WP6VariableLengthGroup_SubGroup
00132 {
00133 public:
00134         WP6CharacterGroup_TableDefinitionOffSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
00135         void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const;
00136 
00137 private:
00138 
00139 };
00140 
00141 class WP6CharacterGroup_TableColumnSubGroup : public WP6VariableLengthGroup_SubGroup
00142 {
00143 public:
00144         WP6CharacterGroup_TableColumnSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
00145         void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const;
00146 
00147 private:
00148         unsigned char m_flags;
00149         unsigned short m_width;
00150         unsigned short m_leftGutter;
00151         unsigned short m_rightGutter;
00152         unsigned m_attributes;
00153         unsigned char m_alignment;
00154         unsigned short m_absPosFromRight;
00155         unsigned short m_numberType;
00156         unsigned char m_currencyIndex;
00157 };
00158 
00159 class WP6CharacterGroup_CommentSubGroup : public WP6VariableLengthGroup_SubGroup
00160 {
00161 public:
00162         WP6CharacterGroup_CommentSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
00163         void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const;
00164 
00165 private:
00166 
00167 };
00168 
00169 class WP6CharacterGroup : public WP6VariableLengthGroup
00170 {
00171 public:
00172         WP6CharacterGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
00173         ~WP6CharacterGroup();
00174         void _readContents(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
00175         void parse(WP6Listener *listener);
00176 
00177 private:
00178         WP6CharacterGroup(const WP6CharacterGroup &);
00179         WP6CharacterGroup &operator=(const WP6CharacterGroup &);
00180         WP6VariableLengthGroup_SubGroup *m_subGroupData;
00181 
00182 };
00183 
00184 #endif /* WP6CHARACTERGROUP_H */
00185 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */