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 };
76 friend std::ostream &
operator<<(std::ostream &o,
PLC const &plc);
PLC(Type type, int id=0)
Definition: MsWrdText.hxx:72
long m_bot
the default text begin
Definition: MsWrdText.cxx:360
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
std::vector< MWAWVariable< MsWrdStruct::Table::Cell > > m_cells
the table cells
Definition: MsWrdText.cxx:278
int m_paragraphId
the paragraph id
Definition: MsWrdText.cxx:132
@ Time
Definition: libmwaw_internal.hxx:371
std::vector< Line > m_lineList
the list of lines
Definition: MsWrdText.cxx:376
shared_ptr< Table > getTable(long cPos) const
try to return a table which begins at a character position
Definition: MsWrdText.cxx:331
bool sendSection(int sectionId)
try to open a section
Definition: MsWrdText.cxx:2055
int m_paragraphId
the paragraph id
Definition: MsWrdText.cxx:179
@ StyleZone
Definition: MsWrdTextStyles.hxx:70
Type
an enum used to differentiate line and cell
Definition: MsWrdText.cxx:249
@ FootnoteDef
Definition: MsWrdText.hxx:71
@ ParagraphInfo
Definition: MsWrdText.hxx:71
shared_ptr< MWAWParserState > & getParserState()
returns the parser state
Definition: MsWrdText.hxx:114
shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:519
int m_version
the file version
Definition: MsWrdText.cxx:357
@ L_Cell
Definition: MsWrdText.cxx:249
std::string m_extra
some extra data
Definition: MsWrdText.hxx:93
@ TextStructZone
Definition: MsWrdTextStyles.hxx:70
the paragraph structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:284
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: MsWrdText.cxx:2184
friend std::ostream & operator<<(std::ostream &o, Page const &page)
operator<<
Definition: MsWrdText.cxx:152
std::multimap< long, MsWrdText::PLC > & getTextPLCMap()
returns the text correspondance zone ( textpos, plc )
Definition: MsWrdText.cxx:490
@ TextZone
Definition: MsWrdTextStyles.hxx:70
bool sendFootnote(int id)
send a note to a listener
Definition: MsWrdText.cxx:2146
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
std::fstream m_debugFile
internal and low level: defined a second debug file
Definition: MsWrdText.cxx:407
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MWAWVariable< float > m_backColor
the background gray color
Definition: MsWrdStruct.hxx:206
std::string m_error
the errors
Definition: MsWrdText.cxx:230
int numPages() const
returns the number of pages
Definition: MsWrdText.cxx:433
void newPage(int number)
adds a new page
Definition: MsWrdParser.cxx:327
std::vector< long > m_delimiterPos
the list of the delimiter cPos (ie. end of each cell)
Definition: MsWrdText.cxx:272
bool readPageBreak(MsWrdEntry &entry)
read the page limit ?
Definition: MsWrdText.cxx:920
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:163
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:110
friend std::ostream & operator<<(std::ostream &o, Field const &field)
operator<<
Definition: MsWrdText.cxx:218
std::vector< MsWrdStruct::ParagraphInfo > m_paraInfoList
the list of paragraph info modifier
Definition: MsWrdText.cxx:393
std::string m_DTFormat
the date/time format using strftime format if defined
Definition: libmwaw_internal.hxx:386
MWAWVariable< MWAWFont > m_font
the font
Definition: MsWrdStruct.hxx:95
@ BottomBit
Definition: libmwaw_internal.hxx:168
int getParagraphId() const
returns the paragraph id ( or -1, if unknown )
Definition: MsWrdText.cxx:112
int id() const
returns the id
Definition: MWAWEntry.hxx:153
friend std::ostream & operator<<(std::ostream &o, TextStruct const &entry)
operator<<
Definition: MsWrdText.cxx:81
Internal and low level: a structure to store a line or a cell of a MsWrdText.
Definition: MsWrdText.cxx:247
MWAWColor m_backgroundColor
the background color
Definition: MsWrdText.cxx:276
the class to store a color
Definition: libmwaw_internal.hxx:182
std::vector< MWAWVariable< MWAWBorder > > m_borders
the borders TLBR
Definition: MsWrdStruct.hxx:204
bool sendText(MWAWEntry const &textEntry, bool mainZone, bool tableCell=false)
send a text zone
Definition: MsWrdText.cxx:1845
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:126
void updateParagraphToFinalState(Paragraph const *style=0)
update the paragraph to obtain the final paragraph
Definition: MsWrdStruct.cxx:1136
bool readFootnotesData(MsWrdEntry &entry)
read the footnote data
Definition: MsWrdText.cxx:1045
MsWrdText(MsWrdText const &orig)
@ Page
Definition: MsWrdText.hxx:71
void sendFieldComment(int id)
try to send a bookmark field id
Definition: MsWrdParser.cxx:383
bool sendTable(MsWrdTextInternal::Table const &table)
try to send a table.
Definition: MsWrdText.cxx:2071
std::multimap< std::string, MsWrdEntry > m_entryMap
the list of entries
Definition: MsWrdParser.hxx:201
int getTextStructId(long textPos) const
returns the id of textpos corresponding to a cPos or -1
Definition: MsWrdText.cxx:306
void prepareParagraphProperties()
retrieve the paragraph properties
Definition: MsWrdText.cxx:1384
bool getFont(Font &font, Font const *styleFont=0) const
returns the font which correspond to the paragraph if possible
Definition: MsWrdStruct.cxx:1122
bool readLongZone(MsWrdEntry &entry, int sz, std::vector< long > &list)
read a zone which consists in a list of int
Definition: MsWrdText.cxx:1185
@ None
Definition: libmwaw_internal.hxx:316
@ L_LastLineCell
Definition: MsWrdText.cxx:249
long getTotalTextSize() const
returns the total text size
Definition: MsWrdText.cxx:299
int m_page
the page number
Definition: MsWrdText.cxx:177
std::vector< long > m_cellPos
the list of cPos corresponding to cells limits
Definition: MsWrdText.cxx:270
void setBackgroundColor(MWAWColor color)
sets the background color
Definition: MWAWCell.hxx:296
shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:509
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:115
MsWrdParser * m_mainParser
the main parser;
Definition: MsWrdText.hxx:216
std::vector< float > const & getColsSize() const
returns the columns size if defined (in point)
Definition: MWAWTable.hxx:116
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:389
MWAWVariable< std::vector< float > > m_columns
the table columns
Definition: MsWrdStruct.hxx:218
Property()
Definition: MsWrdText.cxx:236
int m_id
some identificator
Definition: MsWrdText.cxx:128
std::string m_extra
extra data
Definition: MsWrdText.cxx:136
int m_actPage
the actual page
Definition: MsWrdText.cxx:404
std::map< long, MsWrdStruct::Paragraph > m_paragraphMap
the final correspondance paragraph zone ( textpos, paragraph)
Definition: MsWrdText.cxx:385
Internal: the field of MsWrdParser.
Definition: MsWrdText.cxx:214
bool createZones(long bot)
finds the different zones
Definition: MsWrdText.cxx:581
shared_ptr< MsWrdTextStyles > m_stylesManager
the style manager
Definition: MsWrdText.hxx:213
std::fstream & debugFile2()
internal and low level: defined a second debug file
Definition: MsWrdText.cxx:345
bool m_debugPrint
a flag to know if we have print data
Definition: MsWrdText.cxx:242
MWAWVariable< long > m_picturePos
a picture file position (if this corresponds to a picture)
Definition: MsWrdStruct.hxx:103
MsWrdText & operator=(MsWrdText const &orig)
@ TableDimBit
Definition: MWAWTable.hxx:56
@ Date
Definition: libmwaw_internal.hxx:371
int m_type
the type
Definition: MsWrdText.cxx:175
TextStruct()
construtor
Definition: MsWrdText.cxx:75
bool isSet() const
return true if the variable is set
Definition: libmwaw_internal.hxx:586
std::map< long, Property > m_propertyMap
the position where we have new data ( textpos -> [ we have done debug printing ])
Definition: MsWrdText.cxx:387
int m_values[4]
some values ( 0, -1, 0, small number )
Definition: MsWrdText.cxx:181
bool sendMainText()
send a main zone
Definition: MsWrdText.cxx:2137
MWAWParserStatePtr m_parserState
the parser state
Definition: MsWrdText.hxx:207
bool readFields(MsWrdEntry &entry, std::vector< long > const &fieldPos)
read the field data
Definition: MsWrdText.cxx:1093
std::string m_error
the errors
Definition: MsWrdText.cxx:183
std::vector< Footnote > m_footnoteList
the list of footnotes
Definition: MsWrdText.cxx:402
std::vector< TextStruct > m_textposList
the text positions
Definition: MsWrdText.cxx:368
long m_fPos
the character position in the file
Definition: MsWrdText.cxx:238
State()
constructor
Definition: MsWrdText.cxx:288
MWAWEntry getHeader() const
returns the header entry
Definition: MsWrdText.cxx:444
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
@ Section
Definition: MsWrdText.hxx:71
bool readFootnotesPos(MsWrdEntry &entry, std::vector< long > const ¬eDef)
read the footnote pos in text + val
Definition: MsWrdText.cxx:983
Page()
constructor
Definition: MsWrdText.cxx:147
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:66
@ Object
Definition: MsWrdText.hxx:71
Line()
constructor
Definition: MsWrdText.cxx:251
MWAWEntry getFooter() const
returns the footer entry
Definition: MsWrdText.cxx:467
Internal: the plc.
Definition: MsWrdText.hxx:70
~TextStruct()
destructor
Definition: MsWrdText.cxx:139
Type
Definition: MsWrdText.hxx:71
void insert(Paragraph const ¶, bool insertModif=true)
insert the new values
Definition: MsWrdStruct.cxx:1163
bool readParagraphInfo(MsWrdEntry &entry)
read the paragraph height info
Definition: MsWrdText.cxx:854
MWAWVariable< int > m_styleId
the style id (if known)
Definition: MsWrdStruct.hxx:321
friend class MsWrdTextStyles
Definition: MsWrdText.hxx:67
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
int m_type
the type
Definition: MsWrdText.cxx:130
int m_id
the identificator
Definition: MsWrdText.hxx:91
void prepareData()
prepare the data to be send
Definition: MsWrdText.cxx:1690
void insert(Font const &font, Font const *styleFont=0)
insert new font data ( beginning by updating font flags )
Definition: MsWrdStruct.cxx:82
int m_id
the identificator
Definition: MsWrdText.cxx:173
the font structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:57
@ Font
Definition: MsWrdText.hxx:71
@ L_Line
Definition: MsWrdText.cxx:249
virtual ~MsWrdText()
destructor
Definition: MsWrdText.cxx:423
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
a class used to recreate the table structure using cell informations, ....
Definition: MWAWTable.hxx:52
@ RightBit
Definition: libmwaw_internal.hxx:168
bool operator()(TextStruct const *t1, TextStruct const *t2) const
comparaison function
Definition: MsWrdText.cxx:119
bool readFontNames(MsWrdEntry &entry)
read the font names
Definition: MsWrdText.cxx:793
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
MWAWVec2l m_cPos
the caracter position
Definition: MsWrdText.cxx:257
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:61
long getMainTextLength() const
returns the main text length
Definition: MsWrdText.cxx:439
Internal and low level: a structure to store a table of a MsWrdText.
Definition: MsWrdText.cxx:262
void sendFootnote(int id)
try to send a footnote id
Definition: MsWrdParser.cxx:374
void prepareTableLimits()
find the table end position knowing the end cell/pos delimiter
Definition: MsWrdText.cxx:1565
the main class to read the text part of Microsoft Word file
Definition: MsWrdText.hxx:65
Internal: a list of plc.
Definition: MsWrdText.cxx:235
Table()
constructor
Definition: MsWrdText.cxx:264
bool sendFieldComment(int id)
send a field note to a listener
Definition: MsWrdText.cxx:2164
a field
Definition: libmwaw_internal.hxx:369
@ PageNumber
Definition: libmwaw_internal.hxx:371
int version() const
returns the file version
Definition: MsWrdText.cxx:426
bool readHeaderTextLength()
reads the three different zone size
Definition: MsWrdText.cxx:551
std::multimap< long, MsWrdText::PLC > & getFilePLCMap()
returns the file correspondance zone ( filepos, plc )
Definition: MsWrdText.cxx:495
std::map< long, shared_ptr< Table > > m_tableMap
the final correspondance table zone ( textpos, font)
Definition: MsWrdText.cxx:391
@ Char
Definition: MWAWPosition.hxx:51
Type m_type
the plc type
Definition: MsWrdText.hxx:89
~Table()
destructor
Definition: MsWrdText.cxx:281
std::vector< MWAWVariable< Cell > > m_cells
the table cells
Definition: MsWrdStruct.hxx:222
std::map< long, MsWrdStruct::Font > m_fontMap
the final correspondance font zone ( textpos, font)
Definition: MsWrdText.cxx:382
a comparaison structure
Definition: MsWrdText.hxx:78
bool read(MWAWInputStreamPtr &input, long endPos, int vers)
try to read a data
Definition: MsWrdStruct.cxx:708
bool updateTableBeginnningAt(long cPos, long &nextCPos)
try to find a table which begin at position cPos, if so, update its data...
Definition: MsWrdText.cxx:1667
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
long end() const
returns the end offset
Definition: MWAWEntry.hxx:77
void print(std::ostream &o, MWAWFontConverterPtr converter) const
operator<<
Definition: MsWrdStruct.cxx:1205
the paragraph information of a Microsoft Word file (PHE)
Definition: MsWrdStruct.hxx:230
void prepareLines()
cut the text in line/cell pos
Definition: MsWrdText.cxx:1223
MsWrdText(MsWrdParser &parser)
constructor
Definition: MsWrdText.cxx:416
@ LeftBit
Definition: libmwaw_internal.hxx:168
@ HeaderFooter
Definition: MsWrdText.hxx:71
MWAWVariable< Table > m_table
the table
Definition: MsWrdStruct.hxx:339
the main class to read/store the text font, paragraph, section stylesread
Definition: MsWrdTextStyles.hxx:67
@ Field
Definition: MsWrdText.hxx:71
MWAWVariable< float > m_height
the row height in inches
Definition: MsWrdStruct.hxx:212
the main class to read a Microsoft Word file
Definition: MsWrdParser.hxx:95
float m_height
the row height
Definition: MsWrdText.cxx:274
int m_numPages
the number of page of the final document
Definition: MsWrdText.cxx:404
@ Footnote
Definition: MsWrdText.hxx:71
std::vector< long > m_sectionLimitList
the section cPos limit
Definition: MsWrdText.cxx:380
void sendPicture(long fPos, int cPos, MWAWPosition::AnchorTo anchor=MWAWPosition::Char)
send a picture
Definition: MsWrdParser.cxx:1789
@ TopBit
Definition: libmwaw_internal.hxx:168
shared_ptr< MsWrdTextInternal::State > m_state
the state
Definition: MsWrdText.hxx:210
@ 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:379
std::vector< MWAWEntry > m_headerFooterZones
the header/footer zones
Definition: MsWrdText.cxx:366
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
a struct used to compare file textpos
Definition: MsWrdText.cxx:117
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:581
Internal: the structures of a MsWrdText.
Definition: MsWrdText.cxx:70
int m_id
the id
Definition: MsWrdText.cxx:228
the table in a Microsoft Word file
Definition: MsWrdStruct.hxx:159
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:693
Internal: the state of a MsWrdParser.
Definition: MsWrdText.cxx:286
the section structure of a Microsoft Word file
Definition: MsWrdStruct.hxx:111
std::map< long, int > m_paragraphLimitMap
the paragraph limit -> textposition (or -1)
Definition: MsWrdText.cxx:378
Type m_type
the line type
Definition: MsWrdText.cxx:255
std::ostream & operator<<(std::ostream &o, MsWrdText::PLC const &plc)
Definition: MsWrdText.cxx:504
bool operator()(PLC const &s1, PLC const &s2) const
Definition: MsWrdText.hxx:79
std::multimap< long, MsWrdText::PLC > m_plcMap
the text correspondance zone ( textpos, plc )
Definition: MsWrdText.cxx:371
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:270
long getFilePos(long textPos) const
returns the file position corresponding to a text entry
Definition: MsWrdText.cxx:323
bool inTable() const
returns true if we are in table
Definition: MsWrdStruct.hxx:303
the cells definitions in a Microsoft Word Table
Definition: MsWrdStruct.hxx:177
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
void prepareFontProperties()
retrieve the font properties
Definition: MsWrdText.cxx:1479
Field()
constructor
Definition: MsWrdText.cxx:216
the entry of MsWrdParser
Definition: MsWrdParser.hxx:63
int m_pos
the text position
Definition: MsWrdText.cxx:126
friend std::ostream & operator<<(std::ostream &o, PLC const &plc)
operator<<
Definition: MsWrdText.cxx:504
std::vector< MsWrdText::PLC > m_plcList
the list of plc
Definition: MsWrdText.cxx:240
Internal: the page.
Definition: MsWrdText.cxx:145
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
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:337
void convertFilePLCPos()
convert the file position in character position and compute the paragraph limit
Definition: MsWrdText.cxx:1263
bool m_complex
a flag to know if we read a complex or a simple PRM
Definition: MsWrdText.cxx:134
std::string m_text
the text
Definition: MsWrdText.cxx:226
std::vector< Page > m_pageList
the list of pages
Definition: MsWrdText.cxx:396
@ Paragraph
Definition: MsWrdText.hxx:71
std::vector< Field > m_fieldList
the list of fields
Definition: MsWrdText.cxx:399
long m_textLength[3]
the text length (main, footnote, header+footer)
Definition: MsWrdText.cxx:363
std::multimap< long, MsWrdText::PLC > m_filePlcMap
the file correspondance zone ( filepos, plc )
Definition: MsWrdText.cxx:373
@ L_LastRowCell
Definition: MsWrdText.cxx:249
Generated on Wed Jun 17 2020 06:30:11 for libmwaw by
doxygen 1.8.18