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<std::shared_ptr<WriteNowTextInternal::ContentZones> > &footnoteList,
170 std::shared_ptr<WriteNowTextInternal::State>
m_state;
bool checkIfPositionValid(long pos)
check if a position is inside the file
Definition: WriteNowParser.cxx:989
std::shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:567
@ Time
Definition: libmwaw_internal.hxx:401
int numCells() const
returns the number of cell
Definition: MWAWTable.hxx:113
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:167
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
an noop deleter used to transform a libwpd pointer in a false std::shared_ptr
Definition: libmwaw_internal.hxx:101
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
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: WriteNowText.cxx:2088
int m_flags[4]
some unknown flags : T, R, B, L
Definition: WriteNowText.cxx:337
bool readTable(MWAWInputStream &input, WriteNowTextInternal::TableData &table)
read a table frame (checkme)
Definition: WriteNowText.cxx:1703
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
bool readParagraph(MWAWInputStream &input, WriteNowTextInternal::Paragraph &ruler)
read a paragraph format
Definition: WriteNowText.cxx:1331
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
@ ColumnBreak
Definition: MWAWListener.hxx:58
Type m_type
the border repetition
Definition: libmwaw_internal.hxx:385
void setBdBox(MWAWBox2f box)
set the bdbox (unit point)
Definition: MWAWCell.hxx:211
int m_graphicZone
the graphic zone id
Definition: WriteNowText.cxx:199
bool isEmpty() const
returns true if the border is empty
Definition: libmwaw_internal.hxx:356
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
Internal: the token of a WriteNowText.
Definition: WriteNowText.cxx:168
int numPages() const
returns the number of pages
Definition: WriteNowText.cxx:670
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:162
Paragraph m_paragraph
the paragraph properties
Definition: WriteNowText.cxx:621
int m_type
the zone type : 0 : main, 1 header/footer, 2 footnote,
Definition: WriteNowText.cxx:483
std::shared_ptr< ContentZones > m_footer
Definition: WriteNowText.cxx:623
std::string m_DTFormat
the date/time format using strftime format if defined
Definition: libmwaw_internal.hxx:424
int m_numPages
Definition: WriteNowText.cxx:619
bool readTokenV2(MWAWInputStream &input, WriteNowTextInternal::Token &token)
read a token (v2)
Definition: WriteNowText.cxx:1660
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:125
void newPage(int number)
adds a new page
Definition: WriteNowParser.cxx:185
@ boldBit
Definition: MWAWFont.hxx:190
int m_nextId
the next style ?
Definition: WriteNowText.cxx:155
std::shared_ptr< WriteNowTextInternal::State > m_state
the state
Definition: WriteNowText.hxx:170
void updateCell(MWAWCell &cell) const
update a cell
Definition: WriteNowText.cxx:229
Internal: the state of a WriteNowText.
Definition: WriteNowText.cxx:557
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
int m_values[19]
some unknown values
Definition: WriteNowText.cxx:208
int m_value
a value
Definition: WriteNowText.cxx:367
@ BottomBit
Definition: libmwaw_internal.hxx:178
@ CENTER
Definition: MWAWParagraph.hxx:48
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
~Table() final
destructor
Definition: WriteNowText.cxx:538
bool readStyles(WriteNowEntry const &entry)
try to read the styles zone
Definition: WriteNowText.cxx:1441
std::string m_error
the parsing errors
Definition: WriteNowText.cxx:342
MWAWParserStatePtr m_parserState
the parser state
Definition: WriteNowText.hxx:167
int id() const
returns the id
Definition: MWAWEntry.hxx:164
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
Zone()
constructor
Definition: WriteNowText.cxx:546
Internal: structure used to store the content structure.
Definition: WriteNowText.cxx:544
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:109
class to store entry in a WriteNow document
Definition: WriteNowEntry.hxx:48
Definition: WriteNowText.cxx:519
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
Font m_font
the font properties
Definition: WriteNowText.cxx:157
the manager of the entries
Definition: WriteNowEntry.hxx:106
@ Simple
Definition: MWAWFont.hxx:49
WriteNowEntry m_entry
the general zone
Definition: WriteNowText.cxx:479
static MWAWPictData * get(MWAWInputStreamPtr const &input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
double m_width
the border total width in point
Definition: libmwaw_internal.hxx:387
friend std::ostream & operator<<(std::ostream &o, ContentZone const &z)
operator<<
Definition: WriteNowText.cxx:370
void setBackgroundColor(MWAWColor color)
sets the background color
Definition: MWAWCell.hxx:332
int m_flags[6]
some unknown flags
Definition: WriteNowText.cxx:163
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
std::map< long, std::shared_ptr< ContentZones > > m_contentMap
the list of contentZones
Definition: WriteNowText.cxx:635
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
friend std::ostream & operator<<(std::ostream &o, TableData const &table)
operator<<
Definition: WriteNowText.cxx:265
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
@ Dot
Definition: libmwaw_internal.hxx:335
MWAWColor m_color
the background color
Definition: WriteNowText.cxx:334
@ DECIMAL
Definition: MWAWParagraph.hxx:48
bool m_sent
true if this zone was sent to the listener
Definition: WriteNowText.cxx:491
void setNaturalSize(MWAWVec2f const &naturalSz)
sets the natural size (if known)
Definition: MWAWPosition.hxx:220
Internal: the cell of a WriteNowText.
Definition: WriteNowText.cxx:497
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:135
void setUnderlineColor(MWAWColor const &color)
sets the underline color
Definition: MWAWFont.hxx:489
@ embossBit
Definition: MWAWFont.hxx:190
std::vector< int > m_textCalledTypesList
the list of type of text zone called by this zone
Definition: WriteNowText.cxx:487
Cell * get(int id)
return a cell corresponding to id
Definition: WriteNowText.cxx:528
Defines MWAWCell (cell content and format)
@ Date
Definition: libmwaw_internal.hxx:401
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:427
bool readFontNames(WriteNowEntry const &entry)
try to read the fonts zone
Definition: WriteNowText.cxx:1118
void getColumnInfo(int &numColumns, int &width) const
returns the columns information
Definition: WriteNowParser.cxx:176
int getFontId(int localId) const
return a mac font id corresponding to a local id
Definition: WriteNowText.cxx:599
int m_version
the file version
Definition: WriteNowText.cxx:615
void setUnderlineWidth(float w)
sets the underline width
Definition: MWAWFont.hxx:484
int getNumberOfZonesWithType(int type) const
Definition: WriteNowText.cxx:471
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWParser.hxx:185
virtual ~WriteNowText()
destructor
Definition: WriteNowText.cxx:660
int m_numColumns
the number of column
Definition: WriteNowText.cxx:617
bool sendGraphic(int gId, MWAWBox2i const &bdbox)
try to send the graphic zone
Definition: WriteNowParser.cxx:220
Internal: the table of a WriteNowText.
Definition: WriteNowText.cxx:216
ContentZones()
Definition: WriteNowText.cxx:456
@ AtLeast
Definition: MWAWParagraph.hxx:94
std::string m_extra
extra data
Definition: MWAWFont.hxx:573
WriteNowText(WriteNowParser &parser)
constructor
Definition: WriteNowText.cxx:652
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
std::string m_name
the style name
Definition: WriteNowText.cxx:153
int m_fileType
the file entry id
Definition: WriteNowEntry.hxx:100
WriteNowText & operator=(WriteNowText const &orig)=delete
@ shadowBit
Definition: MWAWFont.hxx:191
int m_id
an identificator
Definition: MWAWEntry.hxx:204
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:132
bool sendContent(MWAWListenerPtr, MWAWTable &) final
send the content
Definition: WriteNowText.cxx:638
Paragraph m_paragraph
the paragraph properties
Definition: WriteNowText.cxx:159
std::ostream & operator<<(std::ostream &o, ContentZone const &z)
Definition: WriteNowText.cxx:370
std::vector< std::shared_ptr< ContentZones > > m_footnoteList
a list to retrieve the footnote content
Definition: WriteNowText.cxx:514
T y() const
second element
Definition: libmwaw_internal.hxx:673
std::shared_ptr< ContentZones > m_header
the header and the footer
Definition: WriteNowText.cxx:623
Paragraph()
constructor
Definition: WriteNowText.cxx:95
int version() const
returns the file version
Definition: WriteNowText.cxx:663
T x() const
first element
Definition: libmwaw_internal.hxx:668
Internal: structure used to store the content structure.
Definition: WriteNowText.cxx:347
Style()
Definition: WriteNowText.cxx:126
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
a border
Definition: libmwaw_internal.hxx:333
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
std::map< int, int > m_localFIdMap
a map local fontId->fontId
Definition: WriteNowText.cxx:625
std::vector< Style > m_styleList
the list of styles (body, footer, footnote, header, table )
Definition: WriteNowText.cxx:629
the main class to read a WriteNow file
Definition: WriteNowParser.hxx:69
Paragraph(Paragraph const &)=default
int m_type
the type
Definition: WriteNowText.cxx:328
WriteNowText & m_parser
the text parser
Definition: WriteNowText.cxx:510
std::vector< std::shared_ptr< ContentZones > > m_footnoteList
a list to retrieve the footnote content
Definition: WriteNowText.cxx:489
std::vector< std::shared_ptr< ContentZones > > m_zones
a zones
Definition: WriteNowText.cxx:552
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
Internal: class to store a style.
Definition: WriteNowText.cxx:125
@ RightBit
Definition: libmwaw_internal.hxx:178
MWAWBox2i m_box
the bdbox
Definition: WriteNowText.cxx:331
int m_id
the zone id
Definition: WriteNowText.cxx:481
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:76
a class which stores section properties
Definition: MWAWSection.hxx:46
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
std::vector< ContentZone > m_zonesList
the list of zone
Definition: WriteNowText.cxx:485
std::shared_ptr< WriteNowTextInternal::ContentZones > parseContent(WriteNowEntry const &entry)
parse a text data zone ( and create the associated structure )
Definition: WriteNowText.cxx:837
int m_actualPage
Definition: WriteNowText.cxx:619
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
Paragraph getDefaultParagraph(int type) const
return a paragraph corresponding to 0:body, 1: header/footer, 2: footnote
Definition: WriteNowText.cxx:575
void setProperty(WriteNowTextInternal::Paragraph const &ruler)
sends a paragraph property to the listener
Definition: WriteNowText.cxx:1431
double m_position
the tab position
Definition: MWAWParagraph.hxx:74
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
std::map< int, int > m_styleMap
the style indirection table
Definition: WriteNowText.cxx:627
TableData()
constructor
Definition: WriteNowText.cxx:218
a field
Definition: libmwaw_internal.hxx:399
@ PageNumber
Definition: libmwaw_internal.hxx:401
bool readFont(MWAWInputStream &input, bool inStyle, WriteNowTextInternal::Font &font)
read a font
Definition: WriteNowText.cxx:1241
bool createZones()
finds the different text zones
Definition: WriteNowText.cxx:709
Internal: structure used to store the content structure.
Definition: WriteNowText.cxx:455
int m_values[10]
some unknown values
Definition: WriteNowText.cxx:339
@ Char
Definition: MWAWPosition.hxx:51
int m_val[4]
other values
Definition: WriteNowEntry.hxx:102
MWAWVec2i m_pos[2]
two positions ( seen relative to the RB point)
Definition: WriteNowText.cxx:205
friend std::ostream & operator<<(std::ostream &o, Token const &tkn)
operator<<
Definition: WriteNowText.cxx:178
Zone m_mainZones[3]
the three main zone ( text, footnote, header/footer)
Definition: WriteNowText.cxx:632
bool hasPageColumnBreak() const
returns true if the entry corresponds to a page/column break
Definition: WriteNowText.cxx:467
Style m_style
the border style
Definition: libmwaw_internal.hxx:380
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
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:363
friend std::ostream & operator<<(std::ostream &o, Style const &st)
operator<<
Definition: WriteNowText.cxx:133
bool getColor(int colId, MWAWColor &col) const
returns the color which corresponds to colId
Definition: WriteNowParser.cxx:198
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
Paragraph & operator=(Paragraph &&)=default
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:2051
friend std::ostream & operator<<(std::ostream &o, Font const &font)
operator<<
Definition: WriteNowText.cxx:71
@ LeftBit
Definition: libmwaw_internal.hxx:178
@ Double
Definition: libmwaw_internal.hxx:337
long m_pos[2]
the begin and the end pos
Definition: WriteNowText.cxx:365
Internal: class to store the paragraph properties.
Definition: WriteNowText.cxx:93
@ italicBit
Definition: MWAWFont.hxx:190
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:150
@ Dot
Definition: MWAWFont.hxx:49
Defines MWAWTextListener: the libmwaw word processor listener.
WriteNowParser * m_mainParser
the main parser;
Definition: WriteNowText.hxx:176
MWAWFont m_font
the font
Definition: WriteNowText.cxx:85
int m_flags[3]
some unknown flag
Definition: WriteNowText.cxx:89
std::vector< ContentZone > m_zonesList
the list of zone
Definition: WriteNowText.cxx:512
State()
constructor
Definition: WriteNowText.cxx:559
@ JustificationFull
Definition: MWAWParagraph.hxx:90
@ JustificationRight
Definition: MWAWParagraph.hxx:91
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
@ TopBit
Definition: libmwaw_internal.hxx:178
MWAWVec2< T > const & min() const
the minimum 2D point (in x and in y)
Definition: libmwaw_internal.hxx:1039
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
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:630
~Paragraph() final
destructor
Definition: WriteNowText.cxx:120
WriteNowEntry getHeader() const
returns the header entry (if defined)
Definition: WriteNowText.cxx:689
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
bool readToken(MWAWInputStream &input, WriteNowTextInternal::Token &token)
read a token
Definition: WriteNowText.cxx:1626
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:202
int m_values[12]
some unknown value
Definition: WriteNowText.cxx:161
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:106
@ Double
Definition: MWAWFont.hxx:51
bool send(WriteNowEntry const &entry)
send the text to the listener
Definition: WriteNowText.cxx:1748
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:289
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
Table()
constructor
Definition: WriteNowText.cxx:521
std::shared_ptr< MWAWCell > get(int id)
returns the i^th cell
Definition: MWAWTable.cxx:122
void sendFootnote(WriteNowEntry const &entry)
try to send a footnote entry
Definition: WriteNowParser.cxx:207
Paragraph & operator=(Paragraph const &)=default
@ 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:696
ContentZone()
Definition: WriteNowText.cxx:348
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:1044
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:190
std::shared_ptr< WriteNowEntryManager > m_entryManager
the list of entry
Definition: WriteNowText.hxx:173
Token()
Definition: WriteNowText.cxx:169
int m_values[8]
some unknown value
Definition: WriteNowText.cxx:117
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
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
Cell(WriteNowText &parser)
constructor
Definition: WriteNowText.cxx:499
std::shared_ptr< ContentZones > getContentZone(long pos) const
return the content corresponding to a pos
Definition: WriteNowText.cxx:606
int m_styleId[2]
the char/ruler style id
Definition: WriteNowText.cxx:87
the main class to read the text part of writenow file
Definition: WriteNowText.hxx:82
WriteNowText(WriteNowText const &orig)=delete
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
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:994
std::string m_error
the parsing errors
Definition: WriteNowText.cxx:211
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20