Go to the documentation of this file.
22 #ifndef WPS8_TEXTSTYLE_H
23 #define WPS8_TEXTSTYLE_H
62 bool readFont(
long endPos,
int &
id, std::string &mess);
64 void sendFont(
int fId, FontData &data);
110 mutable std::shared_ptr<WPS8TextStyleInternal::State>
m_state;
123 std::string
format()
const;
static WPSColor white()
return the white color
Definition: libwps_internal.h:311
#define WPS_N_ELEMENTS(m)
Definition: libwps_internal.h:124
std::map< int, int > m_paragraphTypes
the paragraph type
Definition: WPS8TextStyle.cpp:127
bool hasName(std::string const &nam) const
checks if the entry name is equal to name
Definition: WPSEntry.h:150
WPS8TextStyle(WPS8Text &parser)
Definition: WPS8TextStyle.cpp:161
libwps::Justification m_justify
the justification
Definition: WPSParagraph.h:116
#define WPS_STRIKEOUT_BIT
Definition: libwps_internal.h:507
WPS8Text & m_mainParser
the main parser
Definition: WPS8TextStyle.h:104
@ UPPERCASE_ROMAN
Definition: libwps_internal.h:246
WPS8TextStyle(WPS8TextStyle const &orig)=delete
private copy constructor: forbidden
int m_listLevelIndex
the actual level index
Definition: WPSParagraph.h:121
static std::string str()
Definition: WPSDebug.h:200
WPSContentListenerPtr m_listener
the listener
Definition: WPS8TextStyle.h:108
std::vector< Font > m_fontList
a list of all font properties
Definition: WPS8TextStyle.cpp:118
#define WPS_BOLD_BIT
Definition: libwps_internal.h:506
static void addPos(long)
Definition: WPSDebug.h:220
@ T_Field
Definition: WPS8TextStyle.h:125
~Font() final
destructor
Definition: WPS8TextStyle.cpp:81
long end() const
returns the end offset
Definition: WPSEntry.h:76
WPS8TextStyle::FontData const & special() const
return the auxilliary data
Definition: WPS8TextStyle.cpp:71
bool readSGP(WPSEntry const &entry)
parses a SGP zone: style general property ?
Definition: WPS8TextStyle.cpp:305
double m_margins[3]
the margins
Definition: WPSParagraph.h:101
@ F_None
Definition: WPS8TextStyle.h:128
@ T_Comment
Definition: WPS8TextStyle.h:125
bool readFontNames(WPSEntry const &entry)
reads the font names
Definition: WPS8TextStyle.cpp:222
#define WPS_SUBSCRIPT_BIT
Definition: libwps_internal.h:500
friend std::ostream & operator<<(std::ostream &o, FontData const &fData)
operator <<
Definition: WPS8TextStyle.cpp:1307
std::vector< librevenge::RVNGString > m_fontNames
the font names
Definition: WPS8TextStyle.cpp:113
bool isNumeric() const
returns true if the list is decimal, alpha or roman
Definition: WPSList.h:60
std::string format() const
returns a format to used with strftime
Definition: WPS8TextStyle.cpp:1353
#define WPS_UNDERLINE_BIT
Definition: libwps_internal.h:508
std::vector< FileData > m_recursData
the list of children
Definition: WPS8Struct.h:145
void initTypeMaps()
initializes the type map
Definition: WPS8TextStyle.cpp:130
FontData()
Definition: WPS8TextStyle.h:116
@ CENTER
Definition: WPSParagraph.h:39
std::shared_ptr< WPSContentListener > WPSContentListenerPtr
shared pointer to WPSContentListener
Definition: libwps_internal.h:107
bool readBlockData(RVNGInputStreamPtr input, long endPos, FileData &dt, std::string &error)
tries to read a block zone as a list of Data
Definition: WPS8Struct.cpp:168
@ BULLET
Definition: libwps_internal.h:246
@ BottomBit
Definition: libwps_internal.h:401
#define WPS_SUPERSCRIPT_BIT
Definition: libwps_internal.h:499
#define WPS_ALL_CAPS_BIT
Definition: libwps_internal.h:512
bool readString(RVNGInputStreamPtr input, long page_size, librevenge::RVNGString &res)
reads a string
Definition: WPS8Text.cpp:1127
std::map< int, int > m_fontTypes
the character type
Definition: WPS8TextStyle.cpp:125
libwps::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: WPS8TextStyle.h:91
int m_width
the border width
Definition: libwps_internal.h:450
@ ARABIC
Definition: libwps_internal.h:246
#define WPS_OUTLINE_BIT
Definition: libwps_internal.h:501
std::multimap< std::string, WPSEntry > & getNameEntryMap()
returns the map type->entry
Definition: WPSTextParser.cpp:58
long m_value
an int value, filled if the data store an val
Definition: WPS8Struct.h:141
#define WPS_DOUBLE_UNDERLINE_BIT
Definition: libwps_internal.h:505
~WPS8TextStyle()
Definition: WPS8TextStyle.cpp:171
define the font properties
Definition: WPSFont.h:37
static WPSColor barycenter(float alpha, WPSColor const &colA, float beta, WPSColor const &colB)
return alpha*colA+beta*colB
Definition: libwps_internal.cpp:386
@ T_None
Definition: WPS8TextStyle.h:125
std::vector< WPSParagraph > m_paragraphList
a list of all paragraph properties
Definition: WPS8TextStyle.cpp:122
std::ostream & operator<<(std::ostream &o, Font const &ft)
operator<< for a font
Definition: WPS8TextStyle.cpp:86
#define WPS_ITALICS_BIT
Definition: libwps_internal.h:502
WPS8TextStyle::FontData m_special
the auxialliary data
Definition: WPS8TextStyle.cpp:78
bool readSTSH(WPSEntry const &entry)
reads a style sheet zone
Definition: WPS8TextStyle.cpp:1068
@ RIGHT
Definition: WPSParagraph.h:39
ListLevel m_listLevel
the actual level
Definition: WPSParagraph.h:123
basic class to store an entry in a file This contained :
Definition: WPSEntry.h:39
#define WPS_SMALL_CAPS_BIT
Definition: libwps_internal.h:509
std::string const & name() const
name of the entry
Definition: WPSEntry.h:145
int m_fieldFormat
the field format
Definition: WPS8TextStyle.h:132
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: WPSParagraph.h:87
WPSColor m_color
the border color
Definition: libwps_internal.h:456
@ F_Time
Definition: WPS8TextStyle.h:128
int id() const
returns the identificator
Definition: WPS8Struct.h:132
libwps::NumberingType m_type
the type of the level
Definition: WPSList.h:98
WPSBorder m_borderStyle
the border style
Definition: WPSParagraph.h:131
@ LEFT
Definition: WPSParagraph.h:39
Internal: class to store font properties.
Definition: WPS8TextStyle.cpp:46
int m_type
the main type: footnote, ...
Definition: WPS8TextStyle.h:127
@ T_Endnote
Definition: WPS8TextStyle.h:125
@ TopBit
Definition: libwps_internal.h:401
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
uint32_t readU32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:76
std::vector< DataFOD > mergeSortedFODLists(std::vector< DataFOD > const &lst1, std::vector< DataFOD > const &lst2) const
function which takes two sorted list of attribute (by text position).
Definition: WPSTextParser.cpp:253
@ LOWERCASE_ROMAN
Definition: libwps_internal.h:246
#define WPS_FALLTHROUGH
fall through attributes
Definition: libwps_internal.h:82
class to store the paragraph properties
Definition: WPSParagraph.h:58
bool readArrayBlock() const
forces reading the data as a list of block
Definition: WPS8Struct.cpp:33
State()
constructor
Definition: WPS8TextStyle.cpp:97
bool readParagraph(long endPos, int &id, std::string &mess)
the paragraph
Definition: WPS8TextStyle.cpp:636
WPS8TextStyle & operator=(WPS8TextStyle const &orig)=delete
private copy operator: forbidden
@ DECIMAL
Definition: WPSParagraph.h:39
Font m_defaultFont
the default font
Definition: WPS8TextStyle.cpp:116
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string ( with correct encoding ).
Definition: libwps_internal.cpp:836
int32_t read32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:85
@ UPPERCASE
Definition: libwps_internal.h:246
WPSParagraph m_defaultParagraph
the default paragraph
Definition: WPS8TextStyle.cpp:120
std::vector< DataFOD > m_FODList
the list of a FOD
Definition: WPSTextParser.h:134
@ RightBit
Definition: libwps_internal.h:401
@ F_Date
Definition: WPS8TextStyle.h:128
static void addNote(char const *)
Definition: WPSDebug.h:221
long begin() const
returns the begin offset
Definition: WPSEntry.h:71
A recursif structure which seems generally used to store complex memory structures in a file.
Definition: WPS8Struct.h:64
std::string const & type() const
returns the type of the entry
Definition: WPSEntry.h:129
std::string m_extra
a string to store some errors
Definition: WPSParagraph.h:134
int8_t read8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:59
double m_size
font size
Definition: WPSFont.h:83
void sendParagraph(int pId)
Definition: WPS8TextStyle.cpp:1053
std::shared_ptr< WPS8TextStyleInternal::State > m_state
the internal state
Definition: WPS8TextStyle.h:110
Style m_style
the border style
Definition: libwps_internal.h:446
Definition: WPS8Text.h:48
bool readFont(long endPos, int &id, std::string &mess)
reads a font properties
Definition: WPS8TextStyle.cpp:357
int m_border
list of bits to indicated a border 1: LeftBorderBit, 2: RightBorderBit, ...
Definition: WPSParagraph.h:129
long length() const
returns the length of the zone
Definition: WPSEntry.h:81
Definition: WPSDebug.h:192
bool readFDP(WPSEntry const &entry, std::vector< DataFOD > &fods, FDPParser parser)
parses a FDPP or a FDPC entry (which contains a list of ATTR_TEXT/ATTR_PARAG with their definition ) ...
Definition: WPSTextParser.cpp:71
bool readStructures()
finds all entries which correspond to the styles, parses them and stores data
Definition: WPS8TextStyle.cpp:178
bool findFDPStructures(int which, std::vector< WPSEntry > &result)
finds the FDPC/FDPP structure using the BTEC/BTEP entries which == 0 means FDPP, 1 means FDPC
Definition: WPS8TextStyle.cpp:1209
Definition: WPS8TextStyle.cpp:43
@ F_PageNumber
Definition: WPS8TextStyle.h:128
bool readPLC(WPSEntry const &entry, std::vector< long > &textPtrs, std::vector< long > &listValues, DataParser parser=&WPS8Text::defDataParser, EndDataParser endParser=nullptr)
reads a PLC (Pointer List Composant ?) in zone entry
Definition: WPS8Text.cpp:1990
libwps::DebugFile & m_asciiFile
the ascii file
Definition: WPS8TextStyle.h:112
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
librevenge::RVNGString m_bullet
the bullet if we have an bullet level
Definition: WPSList.h:101
bool hasType(std::string const &tp) const
returns true if the type entry == type
Definition: WPSEntry.h:134
bool findFDPStructuresByHand(int which, std::vector< WPSEntry > &result)
finds the FDPC/FDPP structure by searching after the text zone which == 0 means FDPP,...
Definition: WPS8TextStyle.cpp:1286
#define WPS_EMBOSS_BIT
Definition: libwps_internal.h:513
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
double m_spacings[3]
the line spacing
Definition: WPSParagraph.h:107
@ LeftBit
Definition: libwps_internal.h:401
Type m_type
the border repetition
Definition: libwps_internal.h:448
bool readFont(long endPos, int &id, std::string &mess)
reads a font properties
Definition: WPS8Text.cpp:580
Font(Font const &)=default
int m_startValue
the actual value (if this is an ordered level )
Definition: WPSList.h:96
@ LOWERCASE
Definition: libwps_internal.h:246
int m_fieldType
the field type: pagenumber, data, time, ...
Definition: WPS8TextStyle.h:130
int16_t read16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:71
std::ostream & operator<<(std::ostream &o, WPS8TextStyle::FontData const &fData)
Definition: WPS8TextStyle.cpp:1307
@ JustificationFull
Definition: libwps_internal.h:249
@ JustificationLeft
Definition: libwps_internal.h:249
the class to store a color
Definition: libwps_internal.h:281
Internal: the state of a WPS4Text.
Definition: WPS8TextStyle.cpp:95
friend std::ostream & operator<<(std::ostream &o, Font const &ft)
operator<<
Definition: WPS8TextStyle.cpp:86
#define WPS_SHADOW_BIT
Definition: libwps_internal.h:503
double m_labelIndent
the list indent
Definition: WPSList.h:93
RVNGInputStreamPtr m_input
the main input
Definition: WPS8TextStyle.h:106
Font()
constructor
Definition: WPS8TextStyle.cpp:48
@ T_Footnote
Definition: WPS8TextStyle.h:125
@ NONE
Definition: libwps_internal.h:246
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: WPSEntry.h:118
#define WPS_ENGRAVE_BIT
Definition: libwps_internal.h:514
bool readParagraph(long endPos, int &id, std::string &mess)
the paragraph
Definition: WPS8Text.cpp:585
@ JustificationCenter
Definition: libwps_internal.h:249
Definition: WPSDebug.h:208
WPSColor m_backgroundColor
the background color
Definition: WPSParagraph.h:126
@ JustificationRight
Definition: libwps_internal.h:250
bool isArray() const
returns true if this is a list of block or an unstructured list
Definition: WPS8Struct.h:115
static Font def()
Definition: WPS8TextStyle.cpp:54
bool(WPSTextParser::* FDPParser)(long endPos, int &id, std::string &mess)
callback when a new attribute is found in an FDPP/FDPC entry
Definition: WPSTextParser.h:103
bool isRead() const
returns true if the data are read
Definition: WPS8Struct.h:120
void setListener(WPSContentListenerPtr &listen)
sets the listener
Definition: WPS8TextStyle.h:50
@ BAR
Definition: WPSParagraph.h:39
static WPSColor black()
return the back color
Definition: libwps_internal.h:306
std::vector< WPSTabStop > m_tabs
the tabulations
Definition: WPSParagraph.h:113
librevenge::RVNGString m_name
font name
Definition: WPSFont.h:81
Definition: WPS8TextStyle.h:41
librevenge::RVNGString m_suffix
string which follows the number if we have an ordered level
Definition: WPSList.h:100
Definition: WPS8TextStyle.h:115
@ T_Object
Definition: WPS8TextStyle.h:125
void sendFont(int fId, FontData &data)
Definition: WPS8TextStyle.cpp:619
WPS8TextStyle::FontData & special()
return the auxilliary data
Definition: WPS8TextStyle.cpp:66
Generated on Sun Nov 12 2023 19:25:27 for libwps by
doxygen 1.8.20