WP6ParagraphGroup.h
Go to the documentation of this file.
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* libwpd
* Version: MPL 2.0 / LGPLv2.1+
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Major Contributor(s):
* Copyright (C) 2002 William Lachance (wrlach@gmail.com)
* Copyright (C) 2002 Marc Maurer (uwog@uwog.net)
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms
* of the GNU Lesser General Public License Version 2.1 or later
* (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
* applicable instead of those above.
*
* For further information visit http://libwpd.sourceforge.net
*/
/* "This product is not manufactured, approved, or supported by
* Corel Corporation or Corel Corporation Limited."
*/
#ifndef WP6PARAGRAPHGROUP_H
#define WP6PARAGRAPHGROUP_H
#include <memory>
#include "WP6VariableLengthGroup.h"
#include "WP6FileStructure.h"
#include <vector>
class WP6ParagraphGroup_LineSpacingSubGroup : public WP6VariableLengthGroup_SubGroup
{
public:
WP6ParagraphGroup_LineSpacingSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
private:
double m_lineSpacing;
};
class WP6ParagraphGroup_JustificationModeSubGroup : public WP6VariableLengthGroup_SubGroup
{
public:
WP6ParagraphGroup_JustificationModeSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
private:
unsigned char m_justification;
};
class WP6ParagraphGroup_SpacingAfterParagraphSubGroup : public WP6VariableLengthGroup_SubGroup
{
public:
WP6ParagraphGroup_SpacingAfterParagraphSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption, const unsigned short sizeNonDeletable);
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
private:
double m_spacingAfterParagraphAbsolute;
double m_spacingAfterParagraphRelative;
unsigned short m_sizeNonDeletable;
};
class WP6ParagraphGroup_TabSetSubGroup : public WP6VariableLengthGroup_SubGroup
{
public:
WP6ParagraphGroup_TabSetSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
~WP6ParagraphGroup_TabSetSubGroup() override;
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
private:
bool m_isRelative;
double m_tabAdjustValue;
std::vector<bool> m_usePreWP9LeaderMethods;
std::vector<WPXTabStop> m_tabStops;
};
class WP6ParagraphGroup_IndentFirstLineSubGroup : public WP6VariableLengthGroup_SubGroup
{
public:
WP6ParagraphGroup_IndentFirstLineSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
private:
signed short m_firstLineOffset;
};
class WP6ParagraphGroup_LeftMarginAdjustmentSubGroup : public WP6VariableLengthGroup_SubGroup
{
public:
WP6ParagraphGroup_LeftMarginAdjustmentSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
private:
signed short m_leftMargin;
};
class WP6ParagraphGroup_RightMarginAdjustmentSubGroup : public WP6VariableLengthGroup_SubGroup
{
public:
WP6ParagraphGroup_RightMarginAdjustmentSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
private:
signed short m_rightMargin;
};
class WP6ParagraphGroup_OutlineDefineSubGroup : public WP6VariableLengthGroup_SubGroup
{
public:
WP6ParagraphGroup_OutlineDefineSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override;
private:
unsigned short m_outlineHash;
unsigned char m_numberingMethods[WP6_NUM_LIST_LEVELS];
unsigned char m_tabBehaviourFlag;
};
class WP6ParagraphGroup : public WP6VariableLengthGroup
{
public:
WP6ParagraphGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
~WP6ParagraphGroup() override;
void _readContents(librevenge::RVNGInputStream *input, WPXEncryption *encryption) override;
void parse(WP6Listener *listener) override;
private:
WP6ParagraphGroup(const WP6ParagraphGroup &);
WP6ParagraphGroup &operator=(const WP6ParagraphGroup &);
std::unique_ptr<WP6VariableLengthGroup_SubGroup> m_subGroupData;
};
#endif /* WP6PARAGRAPHGROUP_H */
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WP6FileStructure.h
WP6_NUM_LIST_LEVELS
#define WP6_NUM_LIST_LEVELS
Definition WP6FileStructure.h:36
WP6VariableLengthGroup.h
WP6Listener
Definition WP6Listener.h:41
WP6ParagraphGroup_IndentFirstLineSubGroup::WP6ParagraphGroup_IndentFirstLineSubGroup
WP6ParagraphGroup_IndentFirstLineSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition WP6ParagraphGroup.cpp:236
WP6ParagraphGroup_IndentFirstLineSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition WP6ParagraphGroup.cpp:243
WP6ParagraphGroup_IndentFirstLineSubGroup::m_firstLineOffset
signed short m_firstLineOffset
Definition WP6ParagraphGroup.h:89
WP6ParagraphGroup_JustificationModeSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition WP6ParagraphGroup.cpp:284
WP6ParagraphGroup_JustificationModeSubGroup::WP6ParagraphGroup_JustificationModeSubGroup
WP6ParagraphGroup_JustificationModeSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition WP6ParagraphGroup.cpp:278
WP6ParagraphGroup_JustificationModeSubGroup::m_justification
unsigned char m_justification
Definition WP6ParagraphGroup.h:53
WP6ParagraphGroup_LeftMarginAdjustmentSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition WP6ParagraphGroup.cpp:257
WP6ParagraphGroup_LeftMarginAdjustmentSubGroup::WP6ParagraphGroup_LeftMarginAdjustmentSubGroup
WP6ParagraphGroup_LeftMarginAdjustmentSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition WP6ParagraphGroup.cpp:250
WP6ParagraphGroup_LeftMarginAdjustmentSubGroup::m_leftMargin
signed short m_leftMargin
Definition WP6ParagraphGroup.h:99
WP6ParagraphGroup_LineSpacingSubGroup::WP6ParagraphGroup_LineSpacingSubGroup
WP6ParagraphGroup_LineSpacingSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition WP6ParagraphGroup.cpp:86
WP6ParagraphGroup_LineSpacingSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition WP6ParagraphGroup.cpp:97
WP6ParagraphGroup_LineSpacingSubGroup::m_lineSpacing
double m_lineSpacing
Definition WP6ParagraphGroup.h:43
WP6ParagraphGroup_OutlineDefineSubGroup::m_numberingMethods
unsigned char m_numberingMethods[WP6_NUM_LIST_LEVELS]
Definition WP6ParagraphGroup.h:120
WP6ParagraphGroup_OutlineDefineSubGroup::m_outlineHash
unsigned short m_outlineHash
Definition WP6ParagraphGroup.h:119
WP6ParagraphGroup_OutlineDefineSubGroup::WP6ParagraphGroup_OutlineDefineSubGroup
WP6ParagraphGroup_OutlineDefineSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition WP6ParagraphGroup.cpp:318
WP6ParagraphGroup_OutlineDefineSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition WP6ParagraphGroup.cpp:334
WP6ParagraphGroup_OutlineDefineSubGroup::m_tabBehaviourFlag
unsigned char m_tabBehaviourFlag
Definition WP6ParagraphGroup.h:121
WP6ParagraphGroup_RightMarginAdjustmentSubGroup::WP6ParagraphGroup_RightMarginAdjustmentSubGroup
WP6ParagraphGroup_RightMarginAdjustmentSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition WP6ParagraphGroup.cpp:264
WP6ParagraphGroup_RightMarginAdjustmentSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition WP6ParagraphGroup.cpp:271
WP6ParagraphGroup_RightMarginAdjustmentSubGroup::m_rightMargin
signed short m_rightMargin
Definition WP6ParagraphGroup.h:109
WP6ParagraphGroup_SpacingAfterParagraphSubGroup::WP6ParagraphGroup_SpacingAfterParagraphSubGroup
WP6ParagraphGroup_SpacingAfterParagraphSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption, const unsigned short sizeNonDeletable)
Definition WP6ParagraphGroup.cpp:290
WP6ParagraphGroup_SpacingAfterParagraphSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition WP6ParagraphGroup.cpp:310
WP6ParagraphGroup_SpacingAfterParagraphSubGroup::m_spacingAfterParagraphRelative
double m_spacingAfterParagraphRelative
Definition WP6ParagraphGroup.h:64
WP6ParagraphGroup_SpacingAfterParagraphSubGroup::m_spacingAfterParagraphAbsolute
double m_spacingAfterParagraphAbsolute
Definition WP6ParagraphGroup.h:63
WP6ParagraphGroup_SpacingAfterParagraphSubGroup::m_sizeNonDeletable
unsigned short m_sizeNonDeletable
Definition WP6ParagraphGroup.h:65
WP6ParagraphGroup_TabSetSubGroup::parse
void parse(WP6Listener *listener, const unsigned char numPrefixIDs, unsigned short const *prefixIDs) const override
Definition WP6ParagraphGroup.cpp:222
WP6ParagraphGroup_TabSetSubGroup::m_tabStops
std::vector< WPXTabStop > m_tabStops
Definition WP6ParagraphGroup.h:79
WP6ParagraphGroup_TabSetSubGroup::m_tabAdjustValue
double m_tabAdjustValue
Definition WP6ParagraphGroup.h:77
WP6ParagraphGroup_TabSetSubGroup::m_usePreWP9LeaderMethods
std::vector< bool > m_usePreWP9LeaderMethods
Definition WP6ParagraphGroup.h:78
WP6ParagraphGroup_TabSetSubGroup::WP6ParagraphGroup_TabSetSubGroup
WP6ParagraphGroup_TabSetSubGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition WP6ParagraphGroup.cpp:104
WP6ParagraphGroup_TabSetSubGroup::~WP6ParagraphGroup_TabSetSubGroup
~WP6ParagraphGroup_TabSetSubGroup() override
Definition WP6ParagraphGroup.cpp:218
WP6ParagraphGroup_TabSetSubGroup::m_isRelative
bool m_isRelative
Definition WP6ParagraphGroup.h:76
WP6ParagraphGroup::~WP6ParagraphGroup
~WP6ParagraphGroup() override
Definition WP6ParagraphGroup.cpp:41
WP6ParagraphGroup::WP6ParagraphGroup
WP6ParagraphGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
Definition WP6ParagraphGroup.cpp:34
WP6ParagraphGroup::WP6ParagraphGroup
WP6ParagraphGroup(const WP6ParagraphGroup &)
WP6ParagraphGroup::m_subGroupData
std::unique_ptr< WP6VariableLengthGroup_SubGroup > m_subGroupData
Definition WP6ParagraphGroup.h:134
WP6ParagraphGroup::parse
void parse(WP6Listener *listener) override
Definition WP6ParagraphGroup.cpp:78
WP6ParagraphGroup::_readContents
void _readContents(librevenge::RVNGInputStream *input, WPXEncryption *encryption) override
Definition WP6ParagraphGroup.cpp:45
WP6ParagraphGroup::operator=
WP6ParagraphGroup & operator=(const WP6ParagraphGroup &)
WP6VariableLengthGroup_SubGroup
Definition WP6VariableLengthGroup.h:36
WP6VariableLengthGroup::WP6VariableLengthGroup
WP6VariableLengthGroup()
Definition WP6VariableLengthGroup.cpp:47
WPXEncryption
Definition WPXEncryption.h:36