Go to the documentation of this file.
38 #ifndef MS_WRD_TEXT_STYLES
39 # define MS_WRD_TEXT_STYLES
137 std::vector<int>
const &order);
140 std::vector<int>
const &order);
144 static std::vector<int>
orderStyles(std::vector<int>
const &previous);
158 std::shared_ptr<MsWrdTextStylesInternal::State>
m_state;
std::shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:567
std::vector< MsWrdStruct::Paragraph > m_paragraphList
the list of paragraph
Definition: MsWrdTextStyles.cxx:76
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
int readPropertyModifier(bool &complex, std::string &extra)
read the property modifier (2 bytes last bytes of text struct ).
Definition: MsWrdTextStyles.cxx:867
@ StyleZone
Definition: MsWrdTextStyles.hxx:70
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
void setUnderlineType(Line::Type type=Line::Single)
sets the underline type
Definition: MWAWFont.hxx:474
@ TextStructZone
Definition: MsWrdTextStyles.hxx:70
MWAWFont const & getDefaultFont() const
returns the default font
Definition: MsWrdTextStyles.cxx:113
MsWrdText * m_textParser
the text parser;
Definition: MsWrdTextStyles.hxx:164
the paragraph structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:312
@ smallCapsBit
Definition: MWAWFont.hxx:192
std::multimap< long, MsWrdText::PLC > & getTextPLCMap()
returns the text correspondance zone ( textpos, plc )
Definition: MsWrdText.cxx:543
@ TextZone
Definition: MsWrdTextStyles.hxx:70
bool getSectionParagraph(ZoneType type, int id, MsWrdStruct::Paragraph ¶)
return a paragraph corresponding to the section
Definition: MsWrdTextStyles.cxx:927
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
std::string m_extra
extra data
Definition: MsWrdStruct.hxx:114
@ ColumnBreak
Definition: MWAWListener.hxx:58
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
State()
constructor
Definition: MsWrdTextStyles.cxx:51
int m_version
the file version
Definition: MsWrdTextStyles.cxx:64
std::vector< MsWrdStruct::Paragraph > m_textstructParagraphList
the list of paragraph in textstruct
Definition: MsWrdTextStyles.cxx:82
bool readStylesNames(MsWrdEntry const &zone, int N, int &Nnamed)
try to read the styles names and fill the number of "named" styles...
Definition: MsWrdTextStyles.cxx:1178
Internal: the structures of a MsWrdTextStyles.
Definition: MsWrdTextStyles.cxx:46
bool readStyles(MsWrdEntry &entry)
try to read the styles zone
Definition: MsWrdTextStyles.cxx:1099
int id() const
returns the font id
Definition: MWAWFont.hxx:259
@ boldBit
Definition: MWAWFont.hxx:190
MWAWVariable< MWAWFont > m_font
the font
Definition: MsWrdStruct.hxx:102
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
bool sendSection(int id, int textStructId)
try to send a section
Definition: MsWrdTextStyles.cxx:1072
bool getSection(ZoneType type, int id, MsWrdStruct::Section §ion)
return a section corresponding to an index
Definition: MsWrdTextStyles.cxx:906
int id() const
returns the id
Definition: MWAWEntry.hxx:164
the class to store a color
Definition: libmwaw_internal.hxx:192
MsWrdParser * m_mainParser
the main parser;
Definition: MsWrdTextStyles.hxx:161
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
@ outlineBit
Definition: MWAWFont.hxx:191
MWAWVariable< Font > m_font
the font
Definition: MsWrdStruct.hxx:371
bool read(MWAWInputStreamPtr &input, long endPos)
try to read a data
Definition: MsWrdStruct.cxx:168
void sendDefaultParagraph()
send a default paragraph
Definition: MsWrdTextStyles.cxx:383
@ Simple
Definition: MWAWFont.hxx:49
std::map< int, int > m_nextStyleMap
a map styleId to next styleId
Definition: MsWrdTextStyles.cxx:70
ZoneType
Definition: MsWrdTextStyles.hxx:70
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
void setDeltaLetterSpacing(float d, librevenge::RVNGUnit unit=librevenge::RVNG_POINT)
sets the letter spacing ( delta value in point )
Definition: MWAWFont.hxx:292
bool readParagraph(MsWrdStruct::Paragraph ¶, int dataSz=-1)
try to read a paragraph
Definition: MsWrdTextStyles.cxx:389
MWAWVariable< int > m_paragraphId
the paragraph id
Definition: MsWrdStruct.hxx:159
bool readV3(MWAWInputStreamPtr &input, long endPos)
try to read a data ( v3 code )
Definition: MsWrdStruct.cxx:234
@ uppercaseBit
Definition: MWAWFont.hxx:192
MWAWVariable< long > m_picturePos
a picture file position (if this corresponds to a picture)
Definition: MsWrdStruct.hxx:110
MWAWFont m_defaultFont
the default font ( NewYork 12pt)
Definition: MsWrdTextStyles.cxx:67
bool readTextStructList(MsWrdEntry &entry)
read the paragraphs at the beginning of the text structure zone
Definition: MsWrdTextStyles.cxx:808
void setStrikeOutStyle(Line::Style style=Line::None, bool doReset=true)
sets the strikeoutline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:427
bool isSet() const
return true if the variable is set
Definition: libmwaw_internal.hxx:635
Line const & getStrikeOut() const
returns the strikeoutline
Definition: MWAWFont.hxx:417
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWParser.hxx:185
bool readPLCList(MsWrdEntry &entry)
read the main char/paragraph plc list
Definition: MsWrdTextStyles.cxx:601
@ None
Definition: MWAWFont.hxx:49
@ shadowBit
Definition: MWAWFont.hxx:191
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:132
@ Section
Definition: MsWrdText.hxx:71
namespace to store the main structure which appears in a Microsoft Word 3.0-5.0 file
Definition: MsWrdStruct.cxx:42
bool readStylesFont(MsWrdEntry &zone, int N, std::vector< int > const &previous, std::vector< int > const &order)
try to read the styles fonts
Definition: MsWrdTextStyles.cxx:1224
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
Internal: the plc.
Definition: MsWrdText.hxx:70
std::map< int, MsWrdStruct::Font > m_styleFontMap
the list of fonts in style
Definition: MsWrdTextStyles.cxx:85
MWAWVariable< int > m_styleId
the style id (if known)
Definition: MsWrdStruct.hxx:363
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
int m_id
the identificator
Definition: MsWrdText.hxx:94
bool read(MWAWInputStreamPtr &input, long endPos)
try to read a data
Definition: MsWrdStruct.cxx:730
void updateFontToFinalState(Font const *styleFont=nullptr)
update the font to obtain the final font
Definition: MsWrdStruct.cxx:99
the font structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:57
@ Font
Definition: MsWrdText.hxx:71
MsWrdTextStyles(MsWrdTextStyles const &orig)=delete
bool readFont(MsWrdStruct::Font &font, ZoneType type)
try to read a font.
Definition: MsWrdTextStyles.cxx:121
MWAWParserStatePtr m_parserState
the parser state
Definition: MsWrdTextStyles.hxx:155
MWAWSection getSection(double pageWidth) const
returns a section
Definition: MsWrdStruct.cxx:151
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
float size() const
returns the font size
Definition: MWAWFont.hxx:270
bool getColor(int id, MWAWColor &col) const
returns the color corresponding to an id
Definition: MsWrdParser.cxx:380
MWAWVariable< Section > m_section
the section
Definition: MsWrdStruct.hxx:373
MWAWVariable< int > m_id
the identificator
Definition: MsWrdStruct.hxx:155
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
void setProperty(MsWrdStruct::Font const &font)
Definition: MsWrdTextStyles.cxx:340
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
long getMainTextLength() const
returns the main text length
Definition: MsWrdText.cxx:492
bool readPLC(MsWrdEntry &entry, int type, MWAWVec2< long > const &fileLimit)
read the char/paragraph plc : type=0: char, type=1: parag
Definition: MsWrdTextStyles.cxx:652
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
the main class to read the text part of Microsoft Word file
Definition: MsWrdText.hxx:65
Style m_style
the style
Definition: MWAWFont.hxx:95
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
MWAWVariable< ParagraphInfo > m_info
the dimension
Definition: MsWrdStruct.hxx:369
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
bool checkPicturePos(long pos, int type)
check if a position corresponds or not to a picture entry
Definition: MsWrdParser.cxx:1760
std::multimap< long, MsWrdText::PLC > & getFilePLCMap()
returns the file correspondance zone ( filepos, plc )
Definition: MsWrdText.cxx:548
MWAWVariable< int > m_type
the type
Definition: MsWrdStruct.hxx:157
std::map< int, int > const & getNextStyleMap() const
returns the style id to next style id map
Definition: MsWrdTextStyles.cxx:1094
MWAWVariable< bool > m_colBreak
only a column break
Definition: MsWrdStruct.hxx:165
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
void print(std::ostream &o, MWAWFontConverterPtr converter) const
operator<<
Definition: MsWrdStruct.cxx:1197
std::vector< MsWrdStruct::Font > m_fontList
the list of fonts
Definition: MsWrdTextStyles.cxx:73
static std::vector< int > orderStyles(std::vector< int > const &previous)
try to reorder the styles to find a good order
Definition: MsWrdTextStyles.cxx:1438
@ italicBit
Definition: MWAWFont.hxx:190
@ Dot
Definition: MWAWFont.hxx:49
the main class to read/store the text font, paragraph, section stylesread
Definition: MsWrdTextStyles.hxx:67
MWAWVariable< int > m_col
the num of columns
Definition: MsWrdStruct.hxx:161
Defines MWAWTextListener: the libmwaw word processor listener.
bool readStylesParagraph(MsWrdEntry &zone, int N, std::vector< int > const &previous, std::vector< int > const &order)
try to read the styles fonts
Definition: MsWrdTextStyles.cxx:1285
the main class to read a Microsoft Word file
Definition: MsWrdParser.hxx:98
Internal: the state of a MsWrdTextStylesInternal.
Definition: MsWrdTextStyles.cxx:49
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:630
Line const & getUnderline() const
returns the underline
Definition: MWAWFont.hxx:456
void setUnderlineWordFlag(bool wordFlag=false)
sets the underline word flag
Definition: MWAWFont.hxx:479
int version() const
returns the file version
Definition: MsWrdTextStyles.cxx:106
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
the section structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:118
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:106
@ Double
Definition: MWAWFont.hxx:51
bool readSection(MsWrdEntry &entry, std::vector< long > &cLimits)
read the text section
Definition: MsWrdTextStyles.cxx:953
bool readStylesHierarchy(MsWrdEntry &entry, int N, std::vector< int > &orig)
try to read the styles hierachy
Definition: MsWrdTextStyles.cxx:1372
MWAWVariable< Font > m_modFont
font (modifier)
Definition: MsWrdStruct.hxx:371
uint32_t flags() const
returns the font flags
Definition: MWAWFont.hxx:320
std::map< int, MsWrdStruct::Paragraph > m_styleParagraphMap
the list of paragraph in style
Definition: MsWrdTextStyles.cxx:88
Class to store font.
Definition: MWAWFont.hxx:44
MsWrdTextStyles & operator=(MsWrdTextStyles const &orig)=delete
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:190
MsWrdTextStyles(MsWrdText &textParser)
constructor
Definition: MsWrdTextStyles.cxx:95
the entry of MsWrdParser
Definition: MsWrdParser.hxx:63
bool getSectionFont(ZoneType type, int id, MsWrdStruct::Font &font)
return a font corresponding to the section
Definition: MsWrdTextStyles.cxx:935
MWAWVariable< int > m_unknown
some unknown flag
Definition: MsWrdStruct.hxx:112
bool getParagraph(ZoneType type, int id, MsWrdStruct::Paragraph ¶)
return a paragraph corresponding to an index
Definition: MsWrdTextStyles.cxx:353
MWAWVariable< float > m_size
a second size
Definition: MsWrdStruct.hxx:104
bool getFont(ZoneType type, int id, MsWrdStruct::Font &actFont)
return a font corresponding to an index
Definition: MsWrdTextStyles.cxx:304
MWAWVariable< int > m_flag
some flag ( in the main position)
Definition: MsWrdStruct.hxx:167
@ hiddenBit
Definition: MWAWFont.hxx:191
@ InParagraphDefinition
Definition: MsWrdTextStyles.hxx:70
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
std::vector< MsWrdStruct::Section > m_sectionList
the list of section
Definition: MsWrdTextStyles.cxx:79
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:466
@ Paragraph
Definition: MsWrdText.hxx:71
virtual ~MsWrdTextStyles()
destructor
Definition: MsWrdTextStyles.cxx:103
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
std::shared_ptr< MsWrdTextStylesInternal::State > m_state
the state
Definition: MsWrdTextStyles.hxx:158
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20