Go to the documentation of this file.
38 #ifndef WRITE_NOW_TEXT
39 # define WRITE_NOW_TEXT
126 bool send(std::vector<WriteNowTextInternal::ContentZone> &listZones,
127 std::vector<shared_ptr<WriteNowTextInternal::ContentZones> > &footnoteList,
170 shared_ptr<WriteNowTextInternal::State>
m_state;
bool checkIfPositionValid(long pos)
check if a position is inside the file
Definition: WriteNowParser.cxx:986
@ Time
Definition: libmwaw_internal.hxx:371
int numCells() const
returns the number of cell
Definition: MWAWTable.hxx:101
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:161
an noop deleter used to transform a libwpd pointer in a false shared_ptr
Definition: libmwaw_internal.hxx:109
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:293
void setUnderlineType(Line::Type type=Line::Single)
sets the underline type
Definition: MWAWFont.hxx:453
shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:519
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: WriteNowText.cxx:2077
int m_flags[4]
some unknown flags : T, R, B, L
Definition: WriteNowText.cxx:326
bool readTable(MWAWInputStream &input, WriteNowTextInternal::TableData &table)
read a table frame (checkme)
Definition: WriteNowText.cxx:1688
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
bool readParagraph(MWAWInputStream &input, WriteNowTextInternal::Paragraph &ruler)
read a paragraph format
Definition: WriteNowText.cxx:1300
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
@ ColumnBreak
Definition: MWAWListener.hxx:58
Type m_type
the border repetition
Definition: libmwaw_internal.hxx:355
virtual ~Table()
destructor
Definition: WriteNowText.cxx:513
void setBdBox(MWAWBox2f box)
set the bdbox (unit point)
Definition: MWAWCell.hxx:185
int m_graphicZone
the graphic zone id
Definition: WriteNowText.cxx:192
shared_ptr< ContentZones > m_footer
Definition: WriteNowText.cxx:586
bool isEmpty() const
returns true if the border is empty
Definition: libmwaw_internal.hxx:327
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:221
Internal: the token of a WriteNowText.
Definition: WriteNowText.cxx:164
int numPages() const
returns the number of pages
Definition: WriteNowText.cxx:631
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:156
Paragraph m_paragraph
the paragraph properties
Definition: WriteNowText.cxx:584
int m_type
the zone type : 0 : main, 1 header/footer, 2 footnote,
Definition: WriteNowText.cxx:464
std::string m_DTFormat
the date/time format using strftime format if defined
Definition: libmwaw_internal.hxx:386
int m_numPages
Definition: WriteNowText.cxx:582
bool readTokenV2(MWAWInputStream &input, WriteNowTextInternal::Token &token)
read a token (v2)
Definition: WriteNowText.cxx:1644
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:117
void newPage(int number)
adds a new page
Definition: WriteNowParser.cxx:177
@ boldBit
Definition: MWAWFont.hxx:182
int m_nextId
the next style ?
Definition: WriteNowText.cxx:151
void updateCell(MWAWCell &cell) const
update a cell
Definition: WriteNowText.cxx:218
Internal: the state of a WriteNowText.
Definition: WriteNowText.cxx:529
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:320
int m_values[19]
some unknown values
Definition: WriteNowText.cxx:201
int m_value
a value
Definition: WriteNowText.cxx:354
@ BottomBit
Definition: libmwaw_internal.hxx:168
@ CENTER
Definition: MWAWParagraph.hxx:48
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:123
bool readStyles(WriteNowEntry const &entry)
try to read the styles zone
Definition: WriteNowText.cxx:1410
std::string m_error
the parsing errors
Definition: WriteNowText.cxx:331
MWAWParserStatePtr m_parserState
the parser state
Definition: WriteNowText.hxx:167
int id() const
returns the id
Definition: MWAWEntry.hxx:153
shared_ptr< MWAWCell > get(int id)
returns the i^th cell
Definition: MWAWTable.cxx:114
the class to store a color
Definition: libmwaw_internal.hxx:182
small class use to define a embedded object
Definition: libmwaw_internal.hxx:425
Zone()
constructor
Definition: WriteNowText.cxx:521
Internal: structure used to store the content structure.
Definition: WriteNowText.cxx:519
Internal: the structures of a WriteNowText.
Definition: WriteNowText.cxx:59
void setColumns(int num, double width, librevenge::RVNGUnit widthUnit, double colSep=0)
a function which sets n uniform columns
Definition: MWAWSection.cxx:108
shared_ptr< ContentZones > getContentZone(long pos) const
return the content corresponding to a pos
Definition: WriteNowText.cxx:569
class to store entry in a WriteNow document
Definition: WriteNowEntry.hxx:48
Definition: WriteNowText.cxx:495
shared_ptr< WriteNowEntryManager > m_entryManager
the list of entry
Definition: WriteNowText.hxx:173
class to store the paragraph properties
Definition: MWAWParagraph.hxx:82
Font m_font
the font properties
Definition: WriteNowText.cxx:153
the manager of the entries
Definition: WriteNowEntry.hxx:101
@ Simple
Definition: MWAWFont.hxx:49
WriteNowEntry m_entry
the general zone
Definition: WriteNowText.cxx:460
double m_width
the border total width in point
Definition: libmwaw_internal.hxx:357
friend std::ostream & operator<<(std::ostream &o, ContentZone const &z)
operator<<
Definition: WriteNowText.cxx:357
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
std::vector< shared_ptr< ContentZones > > m_footnoteList
a list to retrieve the footnote content
Definition: WriteNowText.cxx:470
int m_flags[6]
some unknown flags
Definition: WriteNowText.cxx:159
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:115
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:271
friend std::ostream & operator<<(std::ostream &o, TableData const &table)
operator<<
Definition: WriteNowText.cxx:254
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:142
@ Dot
Definition: libmwaw_internal.hxx:316
MWAWColor m_color
the background color
Definition: WriteNowText.cxx:323
@ DECIMAL
Definition: MWAWParagraph.hxx:48
bool m_sent
true if this zone was sent to the listener
Definition: WriteNowText.cxx:472
void setNaturalSize(MWAWVec2f const &naturalSz)
sets the natural size (if known)
Definition: MWAWPosition.hxx:204
Internal: the cell of a WriteNowText.
Definition: WriteNowText.cxx:478
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:127
void setUnderlineColor(MWAWColor const &color)
sets the underline color
Definition: MWAWFont.hxx:468
@ embossBit
Definition: MWAWFont.hxx:182
std::vector< int > m_textCalledTypesList
the list of type of text zone called by this zone
Definition: WriteNowText.cxx:468
Cell * get(int id)
return a cell corresponding to id
Definition: WriteNowText.cxx:503
@ Date
Definition: libmwaw_internal.hxx:371
Internal: the fonts.
Definition: WriteNowText.cxx:62
@ Wave
Definition: MWAWFont.hxx:49
Font()
the constructor
Definition: WriteNowText.cxx:64
class to store a tab use by MWAWParagraph
Definition: MWAWParagraph.hxx:46
void setStrikeOutStyle(Line::Style style=Line::None, bool doReset=true)
sets the strikeoutline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:406
bool readFontNames(WriteNowEntry const &entry)
try to read the fonts zone
Definition: WriteNowText.cxx:1087
std::vector< shared_ptr< ContentZones > > m_footnoteList
a list to retrieve the footnote content
Definition: WriteNowText.cxx:490
void getColumnInfo(int &numColumns, int &width) const
returns the columns information
Definition: WriteNowParser.cxx:168
int getFontId(int localId) const
return a mac font id corresponding to a local id
Definition: WriteNowText.cxx:562
int m_version
the file version
Definition: WriteNowText.cxx:578
void setUnderlineWidth(float w)
sets the underline width
Definition: MWAWFont.hxx:463
int getNumberOfZonesWithType(int type) const
Definition: WriteNowText.cxx:452
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWParser.hxx:185
virtual ~WriteNowText()
destructor
Definition: WriteNowText.cxx:621
int m_numColumns
the number of column
Definition: WriteNowText.cxx:580
bool sendGraphic(int gId, MWAWBox2i const &bdbox)
try to send the graphic zone
Definition: WriteNowParser.cxx:212
Internal: the table of a WriteNowText.
Definition: WriteNowText.cxx:209
ContentZones()
Definition: WriteNowText.cxx:443
@ AtLeast
Definition: MWAWParagraph.hxx:91
std::string m_extra
extra data
Definition: MWAWFont.hxx:552
WriteNowText(WriteNowParser &parser)
constructor
Definition: WriteNowText.cxx:615
bool sendContent(MWAWListenerPtr, MWAWTable &)
send the content
Definition: WriteNowText.cxx:601
@ JustificationCenter
Definition: MWAWParagraph.hxx:87
std::string m_name
the style name
Definition: WriteNowText.cxx:149
WriteNowText & operator=(WriteNowText const &orig)
int m_fileType
the file entry id
Definition: WriteNowEntry.hxx:95
@ shadowBit
Definition: MWAWFont.hxx:183
int m_id
an identificator
Definition: MWAWEntry.hxx:193
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:121
Paragraph m_paragraph
the paragraph properties
Definition: WriteNowText.cxx:155
std::ostream & operator<<(std::ostream &o, ContentZone const &z)
Definition: WriteNowText.cxx:357
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
T y() const
second element
Definition: libmwaw_internal.hxx:620
Paragraph()
constructor
Definition: WriteNowText.cxx:94
int version() const
returns the file version
Definition: WriteNowText.cxx:624
T x() const
first element
Definition: libmwaw_internal.hxx:615
Internal: structure used to store the content structure.
Definition: WriteNowText.cxx:336
Style()
Definition: WriteNowText.cxx:122
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
a border
Definition: libmwaw_internal.hxx:314
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
std::map< int, int > m_localFIdMap
a map local fontId->fontId
Definition: WriteNowText.cxx:588
std::vector< Style > m_styleList
the list of styles (body, footer, footnote, header, table )
Definition: WriteNowText.cxx:592
the main class to read a WriteNow file
Definition: WriteNowParser.hxx:69
int m_type
the type
Definition: WriteNowText.cxx:317
WriteNowText & m_parser
the text parser
Definition: WriteNowText.cxx:486
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
Internal: class to store a style.
Definition: WriteNowText.cxx:121
@ RightBit
Definition: libmwaw_internal.hxx:168
MWAWBox2i m_box
the bdbox
Definition: WriteNowText.cxx:320
int m_id
the zone id
Definition: WriteNowText.cxx:462
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:73
a class which stores section properties
Definition: MWAWSection.hxx:46
shared_ptr< ContentZones > m_header
the header and the footer
Definition: WriteNowText.cxx:586
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:61
std::vector< ContentZone > m_zonesList
the list of zone
Definition: WriteNowText.cxx:466
int m_actualPage
Definition: WriteNowText.cxx:582
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1134
Paragraph getDefaultParagraph(int type) const
return a paragraph corresponding to 0:body, 1: header/footer, 2: footnote
Definition: WriteNowText.cxx:538
void setProperty(WriteNowTextInternal::Paragraph const &ruler)
sends a paragraph property to the listener
Definition: WriteNowText.cxx:1400
double m_position
the tab position
Definition: MWAWParagraph.hxx:71
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
std::map< int, int > m_styleMap
the style indirection table
Definition: WriteNowText.cxx:590
TableData()
constructor
Definition: WriteNowText.cxx:211
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:158
a field
Definition: libmwaw_internal.hxx:369
@ PageNumber
Definition: libmwaw_internal.hxx:371
bool readFont(MWAWInputStream &input, bool inStyle, WriteNowTextInternal::Font &font)
read a font
Definition: WriteNowText.cxx:1210
bool createZones()
finds the different text zones
Definition: WriteNowText.cxx:670
int m_values[13]
some unknown value
Definition: WriteNowText.cxx:157
Internal: structure used to store the content structure.
Definition: WriteNowText.cxx:442
int m_values[10]
some unknown values
Definition: WriteNowText.cxx:328
@ Char
Definition: MWAWPosition.hxx:51
int m_val[4]
other values
Definition: WriteNowEntry.hxx:97
MWAWVec2i m_pos[2]
two positions ( seen relative to the RB point)
Definition: WriteNowText.cxx:198
friend std::ostream & operator<<(std::ostream &o, Token const &tkn)
operator<<
Definition: WriteNowText.cxx:171
Zone m_mainZones[3]
the three main zone ( text, footnote, header/footer)
Definition: WriteNowText.cxx:595
bool hasPageColumnBreak() const
returns true if the entry corresponds to a page/column break
Definition: WriteNowText.cxx:448
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
Style m_style
the border style
Definition: libmwaw_internal.hxx:350
long end() const
returns the end offset
Definition: MWAWEntry.hxx:77
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:254
int m_type
the type 0 : text, 1<->7 : a char flag 8<->f : a zone 10 : used to store a break
Definition: WriteNowText.cxx:350
friend std::ostream & operator<<(std::ostream &o, Style const &st)
operator<<
Definition: WriteNowText.cxx:129
bool getColor(int colId, MWAWColor &col) const
returns the color which corresponds to colId
Definition: WriteNowParser.cxx:190
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1132
void sendZone(int id)
send all the content zone of a zone defined by id 0: main, 1 header/footer, 2: footnote
Definition: WriteNowText.cxx:2040
friend std::ostream & operator<<(std::ostream &o, Font const &font)
operator<<
Definition: WriteNowText.cxx:70
@ LeftBit
Definition: libmwaw_internal.hxx:168
@ Double
Definition: libmwaw_internal.hxx:318
long m_pos[2]
the begin and the end pos
Definition: WriteNowText.cxx:352
Internal: class to store the paragraph properties.
Definition: WriteNowText.cxx:92
@ italicBit
Definition: MWAWFont.hxx:182
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:144
@ Dot
Definition: MWAWFont.hxx:49
WriteNowParser * m_mainParser
the main parser;
Definition: WriteNowText.hxx:176
MWAWFont m_font
the font
Definition: WriteNowText.cxx:84
int m_flags[3]
some unknown flag
Definition: WriteNowText.cxx:88
std::vector< ContentZone > m_zonesList
the list of zone
Definition: WriteNowText.cxx:488
State()
constructor
Definition: WriteNowText.cxx:531
@ JustificationFull
Definition: MWAWParagraph.hxx:87
@ JustificationRight
Definition: MWAWParagraph.hxx:88
@ TopBit
Definition: libmwaw_internal.hxx:168
MWAWVec2< T > const & min() const
the minimum 2D point (in x and in y)
Definition: libmwaw_internal.hxx:980
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
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:581
std::map< long, shared_ptr< ContentZones > > m_contentMap
the list of contentZones
Definition: WriteNowText.cxx:598
WriteNowEntry getHeader() const
returns the header entry (if defined)
Definition: WriteNowText.cxx:650
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1008
bool readToken(MWAWInputStream &input, WriteNowTextInternal::Token &token)
read a token
Definition: WriteNowText.cxx:1603
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
MWAWBox2i m_box
the bdbox
Definition: WriteNowText.cxx:195
WriteNowText(WriteNowText const &orig)
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:100
@ Double
Definition: MWAWFont.hxx:51
bool send(WriteNowEntry const &entry)
send the text to the listener
Definition: WriteNowText.cxx:1735
virtual ~Paragraph()
destructor
Definition: WriteNowText.cxx:116
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:270
Table()
constructor
Definition: WriteNowText.cxx:497
shared_ptr< WriteNowTextInternal::State > m_state
the state
Definition: WriteNowText.hxx:170
void sendFootnote(WriteNowEntry const &entry)
try to send a footnote entry
Definition: WriteNowParser.cxx:199
@ Dash
Definition: MWAWFont.hxx:49
@ RIGHT
Definition: MWAWParagraph.hxx:48
Class to store font.
Definition: MWAWFont.hxx:44
WriteNowEntry getFooter() const
returns the footer entry (if defined)
Definition: WriteNowText.cxx:657
ContentZone()
Definition: WriteNowText.cxx:337
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
MWAWVec2< T > const & max() const
the maximum 2D point (in x and in y)
Definition: libmwaw_internal.hxx:985
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:184
Token()
Definition: WriteNowText.cxx:165
int m_values[8]
some unknown value
Definition: WriteNowText.cxx:113
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
std::vector< shared_ptr< ContentZones > > m_zones
a zones
Definition: WriteNowText.cxx:524
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:505
static MWAWPictData * get(MWAWInputStreamPtr input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:445
Cell(WriteNowText &parser)
constructor
Definition: WriteNowText.cxx:480
int m_styleId[2]
the char/ruler style id
Definition: WriteNowText.cxx:86
the main class to read the text part of writenow file
Definition: WriteNowText.hxx:82
friend std::ostream & operator<<(std::ostream &o, Paragraph const &ind)
operator<<
Definition: WriteNowText.cxx:103
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
shared_ptr< WriteNowTextInternal::ContentZones > parseContent(WriteNowEntry const &entry)
parse a text data zone ( and create the associated structure )
Definition: WriteNowText.cxx:806
bool parseZone(WriteNowEntry const &entry, std::vector< WriteNowEntry > &listData)
try to read the text zone ( list of entries ) and to create the text data zone
Definition: WriteNowText.cxx:963
std::string m_error
the parsing errors
Definition: WriteNowText.cxx:204
Generated on Wed Jun 17 2020 06:30:13 for libmwaw by
doxygen 1.8.18