Go to the documentation of this file.
38 #ifndef MARINER_WRT_TEXT
39 # define MARINER_WRT_TEXT
86 bool send(
int zoneId);
127 std::shared_ptr<MarinerWrtTextInternal::State>
m_state;
std::shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:567
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
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
MWAWColor m_backColor
the background color
Definition: MarinerWrtText.cxx:199
int version() const
returns the file version
Definition: MarinerWrtText.cxx:575
bool getPosition(long cPos, long &fPos, size_t &subZone) const
returns the file position and the number of the sub zone
Definition: MarinerWrtText.cxx:373
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
~Paragraph() final
destructor
Definition: MarinerWrtText.cxx:219
bool m_parsed
a flag to know if the zone is parsed
Definition: MarinerWrtText.cxx:437
void setUnderlineType(Line::Type type=Line::Single)
sets the underline type
Definition: MWAWFont.hxx:474
BorderFill()
constructor
Definition: MarinerWrtText.cxx:147
bool readPLCZone(MarinerWrtEntry const &entry, int zoneId)
try to read a PLC zone: position in text to char(zone 4) or ruler(zone 5) id
Definition: MarinerWrtText.cxx:1123
friend std::ostream & operator<<(std::ostream &o, Font const &font)
operator<<
Definition: MarinerWrtText.cxx:85
bool hasBackgroundColor() const
return true if we have a not white background color
Definition: MarinerWrtText.cxx:168
@ smallCapsBit
Definition: MWAWFont.hxx:192
uint16_t m_leaderCharacter
the leader char
Definition: MWAWParagraph.hxx:78
std::map< long, int > m_posFontMap
a map pos -> fontId
Definition: MarinerWrtText.cxx:431
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
void resizeBorders(size_t newSize)
a function used to resize the borders list ( adding empty borders if needed )
Definition: MWAWParagraph.hxx:122
@ ColumnBreak
Definition: MWAWListener.hxx:58
int m_rulerId
a list of cell ruler id
Definition: MarinerWrtText.cxx:524
std::shared_ptr< MarinerWrtTextInternal::State > m_state
the state
Definition: MarinerWrtText.hxx:127
Type m_type
the border repetition
Definition: libmwaw_internal.hxx:385
@ Dash
Definition: libmwaw_internal.hxx:335
a small struct to define a line in MWAWFont
Definition: MWAWFont.hxx:47
std::string name() const
returns the entry name;
Definition: MarinerWrtParser.cxx:1541
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:162
bool getRuler(int id, Paragraph &ruler) const
returns a ruler corresponding to an id (if possible)
Definition: MarinerWrtText.cxx:411
void setProperty(MarinerWrtTextInternal::Paragraph const &ruler)
sends a paragraph property to the listener
Definition: MarinerWrtText.cxx:1587
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:189
long value(int i) const
returns the ith value (or 0 if it does not exists )
Definition: MarinerWrtParser.cxx:1594
void sendToken(int zoneId, long tokenId)
ask the graph parser to send a token
Definition: MarinerWrtParser.cxx:337
@ Simple
Definition: libmwaw_internal.hxx:335
std::ostream & operator<<(std::ostream &o, Font const &font)
Definition: MarinerWrtText.cxx:85
bool readFontNames(MarinerWrtEntry const &entry, int zoneId)
try to read a font name zone
Definition: MarinerWrtText.cxx:1176
@ boldBit
Definition: MWAWFont.hxx:190
void resetBorders()
reset the borders
Definition: MarinerWrtText.cxx:180
std::map< long, int > m_posRulerMap
a map pos -> rulerId
Definition: MarinerWrtText.cxx:433
MarinerWrtText(MarinerWrtParser &parser)
constructor
Definition: MarinerWrtText.cxx:564
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
MWAWVariable< int > m_listLevelIndex
the actual level index
Definition: MWAWParagraph.hxx:174
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
@ 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
std::vector< Row > m_rowsList
the list of row
Definition: MarinerWrtText.cxx:489
int id() const
returns the id
Definition: MWAWEntry.hxx:164
bool readFonts(MarinerWrtEntry const &entry, int zoneId)
try to read a font zone
Definition: MarinerWrtText.cxx:1260
friend std::ostream & operator<<(std::ostream &o, BorderFill const &fill)
operator<<
Definition: MarinerWrtText.cxx:294
the class to store a color
Definition: libmwaw_internal.hxx:192
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libmwaw_internal.cxx:63
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:156
int m_fileType
the entry type
Definition: MarinerWrtParser.hxx:88
bool readZone(MarinerWrtEntry const &entry, int zoneId)
try to read a text zone
Definition: MarinerWrtText.cxx:603
@ JustificationFullAllLines
Definition: MWAWParagraph.hxx:91
bool isDefault() const
return true if the properties are default properties
Definition: MarinerWrtText.cxx:156
@ outlineBit
Definition: MWAWFont.hxx:191
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
void resetBackgroundColor()
reset the background color
Definition: MarinerWrtText.cxx:161
@ Simple
Definition: MWAWFont.hxx:49
@ None
Definition: libmwaw_internal.hxx:335
BorderFill m_cellFill
the cell fill properties
Definition: MarinerWrtText.cxx:216
#define MWAW_FALLTHROUGH
Definition: libmwaw_internal.hxx:118
void setUnderline(Line const &line)
sets the underline
Definition: MWAWFont.hxx:461
double m_width
the border total width in point
Definition: libmwaw_internal.hxx:387
std::vector< Paragraph > m_rulerList
a list of ruler
Definition: MarinerWrtText.cxx:427
void setBackgroundColor(MWAWColor color)
sets the background color
Definition: MWAWCell.hxx:332
MWAWEntry m_entry
the cell entry
Definition: MarinerWrtText.cxx:522
MWAWSection getSection(int zoneId) const
returns the section information corresponding to a zone
Definition: MarinerWrtParser.cxx:285
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
Information()
constructor
Definition: MarinerWrtText.cxx:442
int m_width
the column width
Definition: MarinerWrtText.cxx:526
void update(float percent, MWAWCell &cell) const
updates the paragraph knowing the paragraph pattern percent
Definition: MarinerWrtText.cxx:128
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
@ Dot
Definition: libmwaw_internal.hxx:335
@ DECIMAL
Definition: MWAWParagraph.hxx:48
Table(Zone const &zone)
constructor
Definition: MarinerWrtText.cxx:472
long m_lastChar
the last table position
Definition: MarinerWrtText.cxx:501
int numColumns() const
returns the number of columns
Definition: MWAWSection.hxx:71
@ uppercaseBit
Definition: MWAWFont.hxx:192
int m_borderTypes[4]
the border type L T R B
Definition: MarinerWrtText.cxx:205
Defines MWAWCell (cell content and format)
@ TableDimBit
Definition: MWAWTable.hxx:56
float getPatternPercent(int id) const
return the pattern percent which corresponds to an id (or -1)
Definition: MarinerWrtParser.cxx:332
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
std::vector< Information > m_infoList
the list of information of the text in the file
Definition: MarinerWrtText.cxx:423
int m_height
the table height ( <=0 a least )
Definition: MarinerWrtText.cxx:503
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition: libmwaw_internal.cxx:206
std::vector< MWAWVariable< MWAWBorder > > m_borders
list of border ( order MWAWBorder::Pos)
Definition: MWAWParagraph.hxx:186
a table row of a MarinerWrtText
Definition: MarinerWrtText.cxx:492
@ AtLeast
Definition: MWAWParagraph.hxx:94
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: MarinerWrtText.cxx:2034
std::vector< double > m_widthsList
the different length used for each line/sep (if defined)
Definition: libmwaw_internal.hxx:391
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
bool decodeZone(std::vector< MarinerWrtStruct > &dataList, long numData=999999)
try to decode a zone
Definition: MarinerWrtParser.cxx:1440
@ shadowBit
Definition: MWAWFont.hxx:191
virtual ~MarinerWrtText()
destructor
Definition: MarinerWrtText.cxx:571
MarinerWrtParser * m_mainParser
the main parser;
Definition: MarinerWrtText.hxx:130
bool readStyleNames(MarinerWrtEntry const &entry, int zoneId)
try to read a style name zone
Definition: MarinerWrtText.cxx:1524
bool findTableStructure(MarinerWrtTextInternal::Table &table, MWAWEntry const &entry)
try to find the table structure beginning in actual position
Definition: MarinerWrtText.cxx:1048
Zone(int zId)
constructor
Definition: MarinerWrtText.cxx:359
@ Bottom
Definition: libmwaw_internal.hxx:176
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
bool setMergeBorders(bool val)
sets the merge borders' value
Definition: MWAWTable.hxx:100
MWAWVariable< MWAWColor > m_backgroundColor
the background color
Definition: MWAWParagraph.hxx:183
bool sendTable(MarinerWrtTextInternal::Table &table)
try to send a table
Definition: MarinerWrtText.cxx:994
Cell()
Definition: MarinerWrtText.cxx:510
int m_cellSep
a cell separator
Definition: MarinerWrtText.cxx:214
MarinerWrtText & operator=(MarinerWrtText const &orig)=delete
a border
Definition: libmwaw_internal.hxx:333
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:284
int m_patternId
the pattern id
Definition: MarinerWrtText.cxx:201
BorderFill m_paraFill
the paragraph fill properties
Definition: MarinerWrtText.cxx:208
Internal: the state of a MarinerWrtText.
Definition: MarinerWrtText.cxx:532
void newPage(int number)
adds a new page
Definition: MarinerWrtParser.cxx:295
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
std::vector< Cell > m_cellsList
a list of cell entry list
Definition: MarinerWrtText.cxx:505
@ RightBit
Definition: libmwaw_internal.hxx:178
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:76
@ boxedBit
Definition: MWAWFont.hxx:195
Paragraph(Paragraph const &)=default
a class which stores section properties
Definition: MWAWSection.hxx:46
MWAWEntry m_pos
the file position
Definition: MarinerWrtText.cxx:458
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
Zone & getZone(int id)
return a reference to a textzone ( if zone not exists, created it )
Definition: MarinerWrtText.cxx:543
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MWAWBorder getBorder(int pos) const
return a border corresponding to a pos
Definition: MarinerWrtText.cxx:241
MWAWEntry m_pos
the file data position (for type=0 data )
Definition: MarinerWrtParser.hxx:122
Internal: struct used to store the font of a MarinerWrtText.
Definition: MarinerWrtText.cxx:63
the main class to read a Mariner Write file
Definition: MarinerWrtParser.hxx:135
std::map< int, int > m_idFontMap
a map id -> fontId
Definition: MarinerWrtText.cxx:429
void setColsSize(std::vector< float > const &cSize)
define the columns size (in point)
Definition: MWAWTable.hxx:133
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
@ RIGHT
Definition: MWAWList.hxx:50
double m_position
the tab position
Definition: MWAWParagraph.hxx:74
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
bool send(int zoneId)
try to send a zone (knowing zoneId)
Definition: MarinerWrtText.cxx:773
int m_type
the data type
Definition: MarinerWrtParser.hxx:124
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
MWAWFont m_font
the font
Definition: MarinerWrtText.cxx:76
bool readRulers(MarinerWrtEntry const &entry, int zoneId)
try to read a ruler zone
Definition: MarinerWrtText.cxx:1593
std::string m_extra
extra data
Definition: MarinerWrtText.cxx:82
std::string m_extra
extra data
Definition: MarinerWrtText.cxx:462
MWAWParserStatePtr m_parserState
the parser state
Definition: MarinerWrtText.hxx:124
Paragraph & operator=(Paragraph const &)=default
MarinerWrtText(MarinerWrtText const &orig)=delete
MWAWColor m_foreColor
the foreground color
Definition: MarinerWrtText.cxx:197
int m_cellHeight
a cell height
Definition: MarinerWrtText.cxx:212
void setOverline(Line const &line)
sets the overline
Definition: MWAWFont.hxx:383
MWAWColor m_borderColor
the border color
Definition: MarinerWrtText.cxx:203
@ Top
Definition: libmwaw_internal.hxx:176
Style m_style
the border style
Definition: libmwaw_internal.hxx:380
a entry to store a zone structure
Definition: MarinerWrtParser.hxx:62
int m_localId
the local id
Definition: MarinerWrtText.cxx:78
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 numValues() const
returns the number of values
Definition: MarinerWrtParser.hxx:108
librevenge::RVNGString m_bullet
the bullet if we have an bullet level
Definition: MWAWList.hxx:114
bool isBasic() const
returns true if this corresponds to a simple container
Definition: MarinerWrtParser.hxx:113
bool hasBorders() const
return true if we have border
Definition: MarinerWrtText.cxx:185
long length() const
returns the zone length
Definition: MarinerWrtText.cxx:388
the main class to read the text part of Mariner Write file
Definition: MarinerWrtText.hxx:61
@ Double
Definition: libmwaw_internal.hxx:337
@ LeftBit
Definition: libmwaw_internal.hxx:178
bool ok() const
Definition: MarinerWrtText.cxx:517
Internal: a struct used to read some field.
Definition: MarinerWrtParser.hxx:96
small structure to store border/fills properties in MarinerWrtText
Definition: MarinerWrtText.cxx:145
@ italicBit
Definition: MWAWFont.hxx:190
@ Dot
Definition: MWAWFont.hxx:49
MWAWColor getBackgroundColor(float percent) const
returns the background color knowing the pattern percent
Definition: MarinerWrtText.cxx:173
void update(float percent)
updates the paragraph knowing the paragraph pattern percent
Definition: MarinerWrtText.cxx:113
Internal: struct used to store zone data of a MarinerWrtText.
Definition: MarinerWrtText.cxx:355
friend std::ostream & operator<<(std::ostream &o, Information const &info)
operator<<
Definition: MarinerWrtText.cxx:449
Defines MWAWTextListener: the libmwaw word processor listener.
@ BULLET
Definition: MWAWList.hxx:46
Font()
constructor
Definition: MarinerWrtText.cxx:65
@ Right
Definition: libmwaw_internal.hxx:176
Internal: struct used to store the table of a MarinerWrtText.
Definition: MarinerWrtText.cxx:468
long nextCharPos() const
returns the next char position after the table
Definition: MarinerWrtText.cxx:478
@ JustificationFull
Definition: MWAWParagraph.hxx:90
double m_labelWidth
the minimum label width
Definition: MWAWList.hxx:105
std::map< int, Zone > m_textZoneMap
a map id -> textZone
Definition: MarinerWrtText.cxx:555
@ JustificationRight
Definition: MWAWParagraph.hxx:91
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
long m_tokenId
the token id
Definition: MarinerWrtText.cxx:80
@ TopBit
Definition: libmwaw_internal.hxx:178
int m_id
the zone id
Definition: MarinerWrtText.cxx:421
Internal: the structures of a MarinerWrtText.
Definition: MarinerWrtText.cxx:60
small structure to keep information about a list level
Definition: MWAWList.hxx:44
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
struct used to keep the information of a small zone of MarinerWrtTextInternal::Zone
Definition: MarinerWrtText.cxx:440
Type m_type
the type of the level
Definition: MWAWList.hxx:101
bool getFont(int id, Font &ft) const
returns a fonts corresponding to an id (if possible)
Definition: MarinerWrtText.cxx:396
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
bool readTextStruct(MarinerWrtEntry const &entry, int zoneId)
try to read the text struct
Definition: MarinerWrtText.cxx:667
int m_version
the file version
Definition: MarinerWrtText.cxx:553
int computeNumPages(MarinerWrtTextInternal::Zone const &zone) const
try to compute the number of pages of a zone, returns 0 if not data
Definition: MarinerWrtText.cxx:647
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
@ Left
Definition: libmwaw_internal.hxx:176
void setBackgroundColor(MWAWColor color)
sets the font background color
Definition: MWAWFont.hxx:352
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
@ CENTER
Definition: MWAWList.hxx:50
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:106
@ Double
Definition: MWAWFont.hxx:51
Zone const & m_zone
the actual zone
Definition: MarinerWrtText.cxx:487
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:289
Row()
constructor
Definition: MarinerWrtText.cxx:494
int m_N
the number of value
Definition: MarinerWrtParser.hxx:90
@ RIGHT
Definition: MWAWParagraph.hxx:48
int numPages() const
returns the number of pages
Definition: MarinerWrtText.cxx:582
Class to store font.
Definition: MWAWFont.hxx:44
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:190
MWAWVec2l m_cPos
the characters positions
Definition: MarinerWrtText.cxx:460
MWAWVariable< int > m_listId
the list id (if know )
Definition: MWAWParagraph.hxx:176
std::vector< Font > m_fontList
a list of font
Definition: MarinerWrtText.cxx:425
MWAWColor m_color
the border color
Definition: libmwaw_internal.hxx:393
@ hiddenBit
Definition: MWAWFont.hxx:191
a table cell of a MarinerWrtText
Definition: MarinerWrtText.cxx:508
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWList.hxx:108
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
Internal: struct used to store the paragraph of a MarinerWrtText.
Definition: MarinerWrtText.cxx:97
Paragraph()
constructor
Definition: MarinerWrtText.cxx:99
int m_actZone
a index used to know the next zone in MarinerWrtText::readZone
Definition: MarinerWrtText.cxx:435
State()
constructor
Definition: MarinerWrtText.cxx:534
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
int m_cellWidth
a cell width
Definition: MarinerWrtText.cxx:210
friend std::ostream & operator<<(std::ostream &o, Paragraph const ¶)
operator<<
Definition: MarinerWrtText.cxx:223
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
@ lowercaseBit
Definition: MWAWFont.hxx:193
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20