Go to the documentation of this file.
38 #ifndef MS_WRD_MWAW_TEXT
39 # define MS_WRD_MWAW_TEXT
71 enum Type {
TextPosition,
HeaderFooter,
Page,
Section,
ParagraphInfo,
Paragraph,
Font,
Footnote,
FootnoteDef,
Field,
Object };
79 friend std::ostream &
operator<<(std::ostream &o,
PLC const &plc);
213 std::shared_ptr<MsWrdTextInternal::State>
m_state;
PLC(Type type, int id=0)
Definition: MsWrdText.hxx:72
std::shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:567
long m_bot
the default text begin
Definition: MsWrdText.cxx:411
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MsWrdText & operator=(MsWrdText const &orig)=delete
std::vector< MWAWVariable< MsWrdStruct::Table::Cell > > m_cells
the table cells
Definition: MsWrdText.cxx:312
int m_paragraphId
the paragraph id
Definition: MsWrdText.cxx:139
@ Time
Definition: libmwaw_internal.hxx:401
std::vector< Line > m_lineList
the list of lines
Definition: MsWrdText.cxx:427
bool sendSection(int sectionId)
try to open a section
Definition: MsWrdText.cxx:2093
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
int m_paragraphId
the paragraph id
Definition: MsWrdText.cxx:189
@ StyleZone
Definition: MsWrdTextStyles.hxx:70
Type
an enum used to differentiate line and cell
Definition: MsWrdText.cxx:275
std::shared_ptr< MWAWParserState > & getParserState()
returns the parser state
Definition: MsWrdText.hxx:117
@ FootnoteDef
Definition: MsWrdText.hxx:71
@ ParagraphInfo
Definition: MsWrdText.hxx:71
std::shared_ptr< MsWrdTextInternal::State > m_state
the state
Definition: MsWrdText.hxx:213
int m_version
the file version
Definition: MsWrdText.cxx:408
@ L_Cell
Definition: MsWrdText.cxx:275
std::string m_extra
some extra data
Definition: MsWrdText.hxx:96
@ TextStructZone
Definition: MsWrdTextStyles.hxx:70
the paragraph structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:312
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: MsWrdText.cxx:2222
friend std::ostream & operator<<(std::ostream &o, Page const &page)
operator<<
Definition: MsWrdText.cxx:162
std::multimap< long, MsWrdText::PLC > & getTextPLCMap()
returns the text correspondance zone ( textpos, plc )
Definition: MsWrdText.cxx:543
@ TextZone
Definition: MsWrdTextStyles.hxx:70
bool sendFootnote(int id)
send a note to a listener
Definition: MsWrdText.cxx:2184
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
a generic variable template: value + flag to know if the variable is set
Definition: libmwaw_internal.hxx:577
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
std::string m_error
the errors
Definition: MsWrdText.cxx:251
int numPages() const
returns the number of pages
Definition: MsWrdText.cxx:486
void newPage(int number)
adds a new page
Definition: MsWrdParser.cxx:367
std::vector< long > m_delimiterPos
the list of the delimiter cPos (ie. end of each cell)
Definition: MsWrdText.cxx:306
bool readPageBreak(MsWrdEntry &entry)
read the page limit ?
Definition: MsWrdText.cxx:973
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:189
friend std::ostream & operator<<(std::ostream &o, Field const &field)
operator<<
Definition: MsWrdText.cxx:239
std::vector< MsWrdStruct::ParagraphInfo > m_paraInfoList
the list of paragraph info modifier
Definition: MsWrdText.cxx:444
std::string m_DTFormat
the date/time format using strftime format if defined
Definition: libmwaw_internal.hxx:424
void setExtra(std::string const &s)
sets the extra string
Definition: MWAWEntry.hxx:180
MWAWVariable< MWAWFont > m_font
the font
Definition: MsWrdStruct.hxx:102
@ BottomBit
Definition: libmwaw_internal.hxx:178
int getParagraphId() const
returns the paragraph id ( or -1, if unknown )
Definition: MsWrdText.cxx:119
int id() const
returns the id
Definition: MWAWEntry.hxx:164
void updateParagraphToFinalState(Paragraph const *style=nullptr)
update the paragraph to obtain the final paragraph
Definition: MsWrdStruct.cxx:1130
Internal and low level: a structure to store a line or a cell of a MsWrdText.
Definition: MsWrdText.cxx:273
MWAWColor m_backgroundColor
the background color
Definition: MsWrdText.cxx:310
the class to store a color
Definition: libmwaw_internal.hxx:192
bool sendText(MWAWEntry const &textEntry, bool mainZone, bool tableCell=false)
send a text zone
Definition: MsWrdText.cxx:1883
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
bool readFootnotesData(MsWrdEntry &entry)
read the footnote data
Definition: MsWrdText.cxx:1097
@ Page
Definition: MsWrdText.hxx:71
void sendFieldComment(int id)
try to send a bookmark field id
Definition: MsWrdParser.cxx:452
bool sendTable(MsWrdTextInternal::Table const &table)
try to send a table.
Definition: MsWrdText.cxx:2109
std::multimap< std::string, MsWrdEntry > m_entryMap
the list of entries
Definition: MsWrdParser.hxx:206
int getTextStructId(long textPos) const
returns the id of textpos corresponding to a cPos or -1
Definition: MsWrdText.cxx:357
void prepareParagraphProperties()
retrieve the paragraph properties
Definition: MsWrdText.cxx:1429
bool readLongZone(MsWrdEntry &entry, int sz, std::vector< long > &list)
read a zone which consists in a list of int
Definition: MsWrdText.cxx:1236
@ None
Definition: libmwaw_internal.hxx:335
@ L_LastLineCell
Definition: MsWrdText.cxx:275
long getTotalTextSize() const
returns the total text size
Definition: MsWrdText.cxx:350
int m_page
the page number
Definition: MsWrdText.cxx:187
std::vector< long > m_cellPos
the list of cPos corresponding to cells limits
Definition: MsWrdText.cxx:304
void setBackgroundColor(MWAWColor color)
sets the background color
Definition: MWAWCell.hxx:332
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
MsWrdParser * m_mainParser
the main parser;
Definition: MsWrdText.hxx:219
std::vector< float > const & getColsSize() const
returns the columns size if defined (in point)
Definition: MWAWTable.hxx:128
Internal: the entry of MsWrdParser.
Definition: MsWrdText.cxx:73
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
std::set< long > m_tableCellPosSet
a set of all begin cell position
Definition: MsWrdText.cxx:440
Property()
Definition: MsWrdText.cxx:257
std::map< long, MsWrdStruct::Paragraph > m_paragraphMap
the final correspondance paragraph zone ( textpos, paragraph)
Definition: MsWrdText.cxx:436
Internal: the field of MsWrdParser.
Definition: MsWrdText.cxx:230
bool createZones(long bot)
finds the different zones
Definition: MsWrdText.cxx:634
std::fstream & debugFile2()
internal and low level: defined a second debug file
Definition: MsWrdText.cxx:396
bool m_debugPrint
a flag to know if we have print data
Definition: MsWrdText.cxx:268
Defines MWAWCell (cell content and format)
@ TableDimBit
Definition: MWAWTable.hxx:56
@ Date
Definition: libmwaw_internal.hxx:401
int m_type
the type
Definition: MsWrdText.cxx:185
TextStruct()
construtor
Definition: MsWrdText.cxx:75
int m_styleId
some identificator(maybe style)
Definition: MsWrdText.cxx:135
bool isSet() const
return true if the variable is set
Definition: libmwaw_internal.hxx:635
std::map< long, Property > m_propertyMap
the position where we have new data ( textpos -> [ we have done debug printing ])
Definition: MsWrdText.cxx:438
int m_values[4]
some values ( 0, -1, 0, small number )
Definition: MsWrdText.cxx:191
bool sendMainText()
send a main zone
Definition: MsWrdText.cxx:2175
MWAWParserStatePtr m_parserState
the parser state
Definition: MsWrdText.hxx:210
bool readFields(MsWrdEntry &entry, std::vector< long > const &fieldPos)
read the field data
Definition: MsWrdText.cxx:1144
std::string m_error
the errors
Definition: MsWrdText.cxx:193
std::vector< Footnote > m_footnoteList
the list of footnotes
Definition: MsWrdText.cxx:453
std::vector< TextStruct > m_textposList
the text positions
Definition: MsWrdText.cxx:419
long m_fPos
the character position in the file
Definition: MsWrdText.cxx:264
State()
constructor
Definition: MsWrdText.cxx:322
std::map< long, std::shared_ptr< Table > > m_tableMap
the final correspondance table zone ( textpos, font)
Definition: MsWrdText.cxx:442
MWAWEntry getHeader() const
returns the header entry
Definition: MsWrdText.cxx:497
@ Section
Definition: MsWrdText.hxx:71
bool readFootnotesPos(MsWrdEntry &entry, std::vector< long > const ¬eDef)
read the footnote pos in text + val
Definition: MsWrdText.cxx:1036
namespace to store the main structure which appears in a Microsoft Word 3.0-5.0 file
Definition: MsWrdStruct.cxx:42
Page()
constructor
Definition: MsWrdText.cxx:152
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
@ Object
Definition: MsWrdText.hxx:71
Line()
constructor
Definition: MsWrdText.cxx:277
MWAWEntry getFooter() const
returns the footer entry
Definition: MsWrdText.cxx:520
Internal: the plc.
Definition: MsWrdText.hxx:70
Type
Definition: MsWrdText.hxx:71
void insert(Paragraph const ¶, bool insertModif=true)
insert the new values
Definition: MsWrdStruct.cxx:1157
bool readParagraphInfo(MsWrdEntry &entry)
read the paragraph height info
Definition: MsWrdText.cxx:907
MWAWVariable< int > m_styleId
the style id (if known)
Definition: MsWrdStruct.hxx:363
friend class MsWrdTextStyles
Definition: MsWrdText.hxx:67
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
int m_id
the identificator
Definition: MsWrdText.hxx:94
void prepareData()
prepare the data to be send
Definition: MsWrdText.cxx:1729
int m_id
the identificator
Definition: MsWrdText.cxx:183
the font structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:57
@ Font
Definition: MsWrdText.hxx:71
@ L_Line
Definition: MsWrdText.cxx:275
virtual ~MsWrdText()
destructor
Definition: MsWrdText.cxx:476
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
a class used to recreate the table structure using cell informations, ....
Definition: MWAWTable.hxx:52
void insert(Font const &font, Font const *styleFont=nullptr)
insert new font data ( beginning by updating font flags )
Definition: MsWrdStruct.cxx:83
@ RightBit
Definition: libmwaw_internal.hxx:178
bool operator()(TextStruct const *t1, TextStruct const *t2) const
comparaison function
Definition: MsWrdText.cxx:126
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
bool readFontNames(MsWrdEntry &entry)
read the font names
Definition: MsWrdText.cxx:846
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
MWAWVec2l m_cPos
the caracter position
Definition: MsWrdText.cxx:285
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
long getMainTextLength() const
returns the main text length
Definition: MsWrdText.cxx:492
Internal and low level: a structure to store a table of a MsWrdText.
Definition: MsWrdText.cxx:290
std::shared_ptr< MsWrdTextStyles > m_stylesManager
the style manager
Definition: MsWrdText.hxx:216
void sendFootnote(int id)
try to send a footnote id
Definition: MsWrdParser.cxx:443
void prepareTableLimits()
find the table end position knowing the end cell/pos delimiter
Definition: MsWrdText.cxx:1606
the main class to read the text part of Microsoft Word file
Definition: MsWrdText.hxx:65
Internal: a list of plc.
Definition: MsWrdText.cxx:256
Table()
constructor
Definition: MsWrdText.cxx:292
bool sendFieldComment(int id)
send a field note to a listener
Definition: MsWrdText.cxx:2202
a field
Definition: libmwaw_internal.hxx:399
@ PageNumber
Definition: libmwaw_internal.hxx:401
~TextStruct() final
destructor
Definition: MsWrdText.cxx:144
int version() const
returns the file version
Definition: MsWrdText.cxx:479
bool readHeaderTextLength()
reads the three different zone size
Definition: MsWrdText.cxx:604
std::multimap< long, MsWrdText::PLC > & getFilePLCMap()
returns the file correspondance zone ( filepos, plc )
Definition: MsWrdText.cxx:548
@ Char
Definition: MWAWPosition.hxx:51
Type m_type
the plc type
Definition: MsWrdText.hxx:92
std::map< long, MsWrdStruct::Font > m_fontMap
the final correspondance font zone ( textpos, font)
Definition: MsWrdText.cxx:433
a comparaison structure
Definition: MsWrdText.hxx:81
bool read(MWAWInputStreamPtr &input, long endPos, int vers)
try to read a data
Definition: MsWrdStruct.cxx:702
bool updateTableBeginnningAt(long cPos, long &nextCPos)
try to find a table which begin at position cPos, if so, update its data...
Definition: MsWrdText.cxx:1706
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
void print(std::ostream &o, MWAWFontConverterPtr converter) const
operator<<
Definition: MsWrdStruct.cxx:1197
the paragraph information of a Microsoft Word file (PHE)
Definition: MsWrdStruct.hxx:254
void prepareLines()
cut the text in line/cell pos
Definition: MsWrdText.cxx:1274
MsWrdText(MsWrdParser &parser)
constructor
Definition: MsWrdText.cxx:467
@ LeftBit
Definition: libmwaw_internal.hxx:178
TextStruct(TextStruct const &)=default
@ HeaderFooter
Definition: MsWrdText.hxx:71
MWAWVariable< Table > m_table
the table
Definition: MsWrdStruct.hxx:381
the main class to read/store the text font, paragraph, section stylesread
Definition: MsWrdTextStyles.hxx:67
@ Field
Definition: MsWrdText.hxx:71
Defines MWAWTextListener: the libmwaw word processor listener.
the main class to read a Microsoft Word file
Definition: MsWrdParser.hxx:98
float m_height
the row height
Definition: MsWrdText.cxx:308
@ Footnote
Definition: MsWrdText.hxx:71
std::vector< long > m_sectionLimitList
the section cPos limit
Definition: MsWrdText.cxx:431
void sendPicture(long fPos, int cPos, MWAWPosition::AnchorTo anchor=MWAWPosition::Char)
send a picture
Definition: MsWrdParser.cxx:1871
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
@ TopBit
Definition: libmwaw_internal.hxx:178
@ TextPosition
Definition: MsWrdText.hxx:71
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
void setBorders(int wh, MWAWBorder const &border)
sets the cell border: wh=libmwaw::LeftBit|...
Definition: MWAWCell.cxx:382
std::vector< MWAWEntry > m_headerFooterZones
the header/footer zones
Definition: MsWrdText.cxx:417
MsWrdText(MsWrdText const &orig)=delete
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
a struct used to compare file textpos
Definition: MsWrdText.cxx:124
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:630
Internal: the structures of a MsWrdText.
Definition: MsWrdText.cxx:70
int m_id
the id
Definition: MsWrdText.cxx:249
~Table() final
destructor
Definition: MsWrdText.cxx:315
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
bool readTextStruct(MsWrdEntry &entry)
read the text structure(some paragraph style+some text position?)
Definition: MsWrdText.cxx:744
Internal: the state of a MsWrdParser.
Definition: MsWrdText.cxx:320
int m_flags
some flags
Definition: MsWrdText.cxx:137
the section structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:118
std::map< long, int > m_paragraphLimitMap
the paragraph limit -> textposition (or -1)
Definition: MsWrdText.cxx:429
Type m_type
the line type
Definition: MsWrdText.cxx:283
std::ostream & operator<<(std::ostream &o, MsWrdText::PLC const &plc)
Definition: MsWrdText.cxx:557
bool operator()(PLC const &s1, PLC const &s2) const
Definition: MsWrdText.hxx:82
std::multimap< long, MsWrdText::PLC > m_plcMap
the text correspondance zone ( textpos, plc )
Definition: MsWrdText.cxx:422
std::shared_ptr< Table > getTable(long cPos) const
try to return a table which begins at a character position
Definition: MsWrdText.cxx:382
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:289
long getFilePos(long textPos) const
returns the file position corresponding to a text entry
Definition: MsWrdText.cxx:374
bool inTable() const
returns true if we are in table
Definition: MsWrdStruct.hxx:345
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
void prepareFontProperties()
retrieve the font properties
Definition: MsWrdText.cxx:1521
Field()
constructor
Definition: MsWrdText.cxx:232
the entry of MsWrdParser
Definition: MsWrdParser.hxx:63
int m_pos
the text position
Definition: MsWrdText.cxx:133
friend std::ostream & operator<<(std::ostream &o, PLC const &plc)
operator<<
Definition: MsWrdText.cxx:557
std::vector< MsWrdText::PLC > m_plcList
the list of plc
Definition: MsWrdText.cxx:266
Internal: the page.
Definition: MsWrdText.cxx:150
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
bool getFont(Font &font, Font const *styleFont=nullptr) const
returns the font which correspond to the paragraph if possible
Definition: MsWrdStruct.cxx:1116
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MWAWVariable< bool > m_tableDef
a table flag
Definition: MsWrdStruct.hxx:379
void convertFilePLCPos()
convert the file position in character position and compute the paragraph limit
Definition: MsWrdText.cxx:1312
bool m_complex
a flag to know if we read a complex or a simple PRM
Definition: MsWrdText.cxx:141
std::string m_text
the text
Definition: MsWrdText.cxx:247
std::vector< Page > m_pageList
the list of pages
Definition: MsWrdText.cxx:447
@ Paragraph
Definition: MsWrdText.hxx:71
std::vector< Field > m_fieldList
the list of fields
Definition: MsWrdText.cxx:450
std::multimap< long, MsWrdText::PLC > m_filePlcMap
the file correspondance zone ( filepos, plc )
Definition: MsWrdText.cxx:424
@ L_LastRowCell
Definition: MsWrdText.cxx:275
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20