WP6CharacterGroup.h
Go to the documentation of this file.
00001 /* libwpd
00002  * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
00003  * Copyright (C) 2002 Marc Maurer (uwog@uwog.net)
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
00018  *
00019  * For further information visit http://libwpd.sourceforge.net
00020  */
00021 
00022 /* "This product is not manufactured, approved, or supported by
00023  * Corel Corporation or Corel Corporation Limited."
00024  */
00025 
00026 #ifndef WP6CHARACTERGROUP_H
00027 #define WP6CHARACTERGROUP_H
00028 
00029 #include "WP6VariableLengthGroup.h"
00030 #include "WP6FontDescriptorPacket.h"
00031 
00032 class WP6CharacterGroup_SetAlignmentCharacterSubGroup: public WP6VariableLengthGroup_SubGroup
00033 {
00034 public:
00035         WP6CharacterGroup_SetAlignmentCharacterSubGroup(WPXInputStream *input, WPXEncryption *encryption);
00036         void parse(WP6Listener *listener, const uint8_t numPrefixIDs, uint16_t const *prefixIDs) const;
00037 
00038 private:
00039         uint8_t m_character;
00040         uint8_t m_characterSet;
00041 };
00042 
00043 class WP6CharacterGroup_ColorSubGroup: public WP6VariableLengthGroup_SubGroup
00044 {
00045 public:
00046         WP6CharacterGroup_ColorSubGroup(WPXInputStream *input, WPXEncryption *encryption);
00047         void parse(WP6Listener *listener, const uint8_t numPrefixIDs, uint16_t const *prefixIDs) const;
00048 
00049 private:
00050         uint8_t m_red;
00051         uint8_t m_green;
00052         uint8_t m_blue;
00053 };
00054 
00055 class WP6CharacterGroup_CharacterShadingChangeSubGroup: public WP6VariableLengthGroup_SubGroup
00056 {
00057 public:
00058         WP6CharacterGroup_CharacterShadingChangeSubGroup(WPXInputStream *input, WPXEncryption *encryption);
00059         void parse(WP6Listener *listener, const uint8_t numPrefixIDs, uint16_t const *prefixIDs) const;
00060 
00061 private:
00062         uint8_t m_shading;
00063 };
00064 
00065 class WP6CharacterGroup_FontFaceChangeSubGroup : public WP6VariableLengthGroup_SubGroup
00066 {
00067 public:
00068         WP6CharacterGroup_FontFaceChangeSubGroup(WPXInputStream *input, WPXEncryption *encryption, uint16_t sizeDeletable);
00069         ~WP6CharacterGroup_FontFaceChangeSubGroup();
00070         void parse(WP6Listener *listener, const uint8_t numPrefixIDs, uint16_t const *prefixIDs) const;
00071 
00072 private:
00073         uint16_t m_oldMatchedPointSize;
00074         uint16_t m_hash;
00075         uint16_t m_matchedFontIndex;
00076         uint16_t m_matchedFontPointSize;
00077         WP6FontDescriptorPacket *m_packet;
00078 };
00079 
00080 class WP6CharacterGroup_FontSizeChangeSubGroup : public WP6VariableLengthGroup_SubGroup
00081 {
00082 public:
00083         WP6CharacterGroup_FontSizeChangeSubGroup(WPXInputStream *input, WPXEncryption *encryption);
00084         void parse(WP6Listener *listener, const uint8_t numPrefixIDs, uint16_t const *prefixIDs) const;
00085 
00086 private:
00087         uint16_t m_desiredFontPointSize;
00088 };
00089 
00090 class WP6CharacterGroup_SetDotLeaderCharactersSubGroup: public WP6VariableLengthGroup_SubGroup
00091 {
00092 public:
00093         WP6CharacterGroup_SetDotLeaderCharactersSubGroup(WPXInputStream *input, WPXEncryption *encryption);
00094         void parse(WP6Listener *listener, const uint8_t numPrefixIDs, uint16_t const *prefixIDs) const;
00095 
00096 private:
00097         uint8_t m_character;
00098         uint8_t m_characterSet;
00099         uint8_t m_numberOfSpaces;
00100 };
00101 
00102 class WP6CharacterGroup_ParagraphNumberOnSubGroup : public WP6VariableLengthGroup_SubGroup
00103 {
00104 public:
00105         WP6CharacterGroup_ParagraphNumberOnSubGroup(WPXInputStream *input, WPXEncryption *encryption);
00106         void parse(WP6Listener *listener, const uint8_t numPrefixIDs, uint16_t const *prefixIDs) const;
00107 
00108 private:
00109         uint16_t m_outlineHash;
00110         uint8_t m_level;
00111         uint8_t m_flag;
00112 };
00113 
00114 class WP6CharacterGroup_TableDefinitionOnSubGroup : public WP6VariableLengthGroup_SubGroup
00115 {
00116 public:
00117         WP6CharacterGroup_TableDefinitionOnSubGroup(WPXInputStream *input, WPXEncryption *encryption);
00118         void parse(WP6Listener *listener, const uint8_t numPrefixIDs, uint16_t const *prefixIDs) const;
00119 
00120 private:
00121         uint8_t m_flags;
00122         uint8_t m_position;
00123         uint16_t m_leftOffset;
00124 };
00125 
00126 class WP6CharacterGroup_TableDefinitionOffSubGroup : public WP6VariableLengthGroup_SubGroup
00127 {
00128 public:
00129         WP6CharacterGroup_TableDefinitionOffSubGroup(WPXInputStream *input, WPXEncryption *encryption);
00130         void parse(WP6Listener *listener, const uint8_t numPrefixIDs, uint16_t const *prefixIDs) const;
00131 
00132 private:
00133 
00134 };
00135 
00136 class WP6CharacterGroup_TableColumnSubGroup : public WP6VariableLengthGroup_SubGroup
00137 {
00138 public:
00139         WP6CharacterGroup_TableColumnSubGroup(WPXInputStream *input, WPXEncryption *encryption);
00140         void parse(WP6Listener *listener, const uint8_t numPrefixIDs, uint16_t const *prefixIDs) const;
00141 
00142 private:
00143         uint8_t m_flags;
00144         uint16_t m_width;
00145         uint16_t m_leftGutter;
00146         uint16_t m_rightGutter;
00147         uint32_t m_attributes;
00148         uint8_t m_alignment;
00149         uint16_t m_absPosFromRight;
00150         uint16_t m_numberType;
00151         uint8_t m_currencyIndex;
00152 };
00153 
00154 class WP6CharacterGroup_CommentSubGroup : public WP6VariableLengthGroup_SubGroup
00155 {
00156 public:
00157         WP6CharacterGroup_CommentSubGroup(WPXInputStream *input, WPXEncryption *encryption);
00158         void parse(WP6Listener *listener, const uint8_t numPrefixIDs, uint16_t const *prefixIDs) const;
00159 
00160 private:
00161 
00162 };
00163 
00164 class WP6CharacterGroup : public WP6VariableLengthGroup
00165 {
00166  public:
00167         WP6CharacterGroup(WPXInputStream *input, WPXEncryption *encryption);    
00168         ~WP6CharacterGroup();
00169         void _readContents(WPXInputStream *input, WPXEncryption *encryption);
00170         void parse(WP6Listener *listener);
00171 
00172  private:
00173         WP6CharacterGroup(const WP6CharacterGroup&);
00174         WP6CharacterGroup& operator=(const WP6CharacterGroup&);
00175         WP6VariableLengthGroup_SubGroup *m_subGroupData;
00176 
00177 };
00178 
00179 #endif /* WP6CHARACTERGROUP_H */