Go to the documentation of this file.
38 #ifndef MARINER_WRT_TEXT
39 # define MARINER_WRT_TEXT
86 bool send(
int zoneId);
127 shared_ptr<MarinerWrtTextInternal::State>
m_state;
MarinerWrtText & operator=(MarinerWrtText const &orig)
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:161
MWAWColor m_backColor
the background color
Definition: MarinerWrtText.cxx:187
int version() const
returns the file version
Definition: MarinerWrtText.cxx:535
bool getPosition(long cPos, long &fPos, size_t &subZone) const
returns the file position and the number of the sub zone
Definition: MarinerWrtText.cxx:352
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:293
bool m_parsed
a flag to know if the zone is parsed
Definition: MarinerWrtText.cxx:416
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
BorderFill()
constructor
Definition: MarinerWrtText.cxx:136
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:1087
friend std::ostream & operator<<(std::ostream &o, Font const &font)
operator<<
Definition: MarinerWrtText.cxx:81
bool hasBackgroundColor() const
return true if we have a not white background color
Definition: MarinerWrtText.cxx:155
@ smallCapsBit
Definition: MWAWFont.hxx:184
uint16_t m_leaderCharacter
the leader char
Definition: MWAWParagraph.hxx:75
std::map< long, int > m_posFontMap
a map pos -> fontId
Definition: MarinerWrtText.cxx:410
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
void resizeBorders(size_t newSize)
a function used to resize the borders list ( adding empty borders if needed )
Definition: MWAWParagraph.hxx:116
@ ColumnBreak
Definition: MWAWListener.hxx:58
int m_rulerId
a list of cell ruler id
Definition: MarinerWrtText.cxx:490
Type m_type
the border repetition
Definition: libmwaw_internal.hxx:355
@ Dash
Definition: libmwaw_internal.hxx:316
a small struct to define a line in MWAWFont
Definition: MWAWFont.hxx:47
std::string name() const
returns the entry name;
Definition: MarinerWrtParser.cxx:1526
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:156
bool getRuler(int id, Paragraph &ruler) const
returns a ruler corresponding to an id (if possible)
Definition: MarinerWrtText.cxx:390
void setProperty(MarinerWrtTextInternal::Paragraph const &ruler)
sends a paragraph property to the listener
Definition: MarinerWrtText.cxx:1551
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:163
long value(int i) const
returns the ith value (or 0 if it does not exists )
Definition: MarinerWrtParser.cxx:1579
void sendToken(int zoneId, long tokenId)
ask the graph parser to send a token
Definition: MarinerWrtParser.cxx:322
@ Simple
Definition: libmwaw_internal.hxx:316
std::ostream & operator<<(std::ostream &o, Font const &font)
Definition: MarinerWrtText.cxx:81
bool readFontNames(MarinerWrtEntry const &entry, int zoneId)
try to read a font name zone
Definition: MarinerWrtText.cxx:1140
@ boldBit
Definition: MWAWFont.hxx:182
void resetBorders()
reset the borders
Definition: MarinerWrtText.cxx:167
std::map< long, int > m_posRulerMap
a map pos -> rulerId
Definition: MarinerWrtText.cxx:412
MarinerWrtText(MarinerWrtParser &parser)
constructor
Definition: MarinerWrtText.cxx:526
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:231
MWAWVariable< int > m_listLevelIndex
the actual level index
Definition: MWAWParagraph.hxx:168
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:320
@ 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
std::vector< Row > m_rowsList
the list of row
Definition: MarinerWrtText.cxx:461
int id() const
returns the id
Definition: MWAWEntry.hxx:153
bool readFonts(MarinerWrtEntry const &entry, int zoneId)
try to read a font zone
Definition: MarinerWrtText.cxx:1224
friend std::ostream & operator<<(std::ostream &o, BorderFill const &fill)
operator<<
Definition: MarinerWrtText.cxx:282
the class to store a color
Definition: libmwaw_internal.hxx:182
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:150
int m_fileType
the entry type
Definition: MarinerWrtParser.hxx:84
bool readZone(MarinerWrtEntry const &entry, int zoneId)
try to read a text zone
Definition: MarinerWrtText.cxx:564
@ JustificationFullAllLines
Definition: MWAWParagraph.hxx:88
bool isDefault() const
return true if the properties are default properties
Definition: MarinerWrtText.cxx:143
@ outlineBit
Definition: MWAWFont.hxx:183
class to store the paragraph properties
Definition: MWAWParagraph.hxx:82
void resetBackgroundColor()
reset the background color
Definition: MarinerWrtText.cxx:148
@ Simple
Definition: MWAWFont.hxx:49
@ None
Definition: libmwaw_internal.hxx:316
BorderFill m_cellFill
the cell fill properties
Definition: MarinerWrtText.cxx:204
void setUnderline(Line const &line)
sets the underline
Definition: MWAWFont.hxx:440
double m_width
the border total width in point
Definition: libmwaw_internal.hxx:357
std::vector< Paragraph > m_rulerList
a list of ruler
Definition: MarinerWrtText.cxx:406
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
MWAWEntry m_entry
the cell entry
Definition: MarinerWrtText.cxx:488
MWAWSection getSection(int zoneId) const
returns the section information corresponding to a zone
Definition: MarinerWrtParser.cxx:270
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
Information()
constructor
Definition: MarinerWrtText.cxx:421
int m_width
the column width
Definition: MarinerWrtText.cxx:492
void update(float percent, MWAWCell &cell) const
updates the paragraph knowing the paragraph pattern percent
Definition: MarinerWrtText.cxx:117
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:142
@ Dot
Definition: libmwaw_internal.hxx:316
@ DECIMAL
Definition: MWAWParagraph.hxx:48
Table(Zone const &zone)
constructor
Definition: MarinerWrtText.cxx:446
long m_lastChar
the last table position
Definition: MarinerWrtText.cxx:470
int numColumns() const
returns the number of columns
Definition: MWAWSection.hxx:63
@ uppercaseBit
Definition: MWAWFont.hxx:184
int m_borderTypes[4]
the border type L T R B
Definition: MarinerWrtText.cxx:193
@ TableDimBit
Definition: MWAWTable.hxx:56
float getPatternPercent(int id) const
return the pattern percent which corresponds to an id (or -1)
Definition: MarinerWrtParser.cxx:317
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
std::vector< Information > m_infoList
the list of information of the text in the file
Definition: MarinerWrtText.cxx:402
int m_height
the table height ( <=0 a least )
Definition: MarinerWrtText.cxx:472
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition: libmwaw_internal.cxx:205
std::vector< MWAWVariable< MWAWBorder > > m_borders
list of border ( order MWAWBorder::Pos)
Definition: MWAWParagraph.hxx:180
a table row of a MarinerWrtText
Definition: MarinerWrtText.cxx:464
@ AtLeast
Definition: MWAWParagraph.hxx:91
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: MarinerWrtText.cxx:1998
std::vector< double > m_widthsList
the different length used for each line/sep (if defined)
Definition: libmwaw_internal.hxx:361
@ JustificationCenter
Definition: MWAWParagraph.hxx:87
bool decodeZone(std::vector< MarinerWrtStruct > &dataList, long numData=999999)
try to decode a zone
Definition: MarinerWrtParser.cxx:1425
@ shadowBit
Definition: MWAWFont.hxx:183
virtual ~MarinerWrtText()
destructor
Definition: MarinerWrtText.cxx:531
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:1488
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
bool findTableStructure(MarinerWrtTextInternal::Table &table, MWAWEntry const &entry)
try to find the table structure beginning in actual position
Definition: MarinerWrtText.cxx:1012
Zone(int zId)
constructor
Definition: MarinerWrtText.cxx:347
@ Bottom
Definition: libmwaw_internal.hxx:166
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:66
bool setMergeBorders(bool val)
sets the merge borders' value
Definition: MWAWTable.hxx:88
MWAWVariable< MWAWColor > m_backgroundColor
the background color
Definition: MWAWParagraph.hxx:177
bool sendTable(MarinerWrtTextInternal::Table &table)
try to send a table
Definition: MarinerWrtText.cxx:957
Cell()
Definition: MarinerWrtText.cxx:479
virtual ~Paragraph()
destructor
Definition: MarinerWrtText.cxx:207
int m_cellSep
a cell separator
Definition: MarinerWrtText.cxx:202
a border
Definition: libmwaw_internal.hxx:314
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:265
int m_patternId
the pattern id
Definition: MarinerWrtText.cxx:189
BorderFill m_paraFill
the paragraph fill properties
Definition: MarinerWrtText.cxx:196
Internal: the state of a MarinerWrtText.
Definition: MarinerWrtText.cxx:498
void newPage(int number)
adds a new page
Definition: MarinerWrtParser.cxx:280
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
std::vector< Cell > m_cellsList
a list of cell entry list
Definition: MarinerWrtText.cxx:474
@ RightBit
Definition: libmwaw_internal.hxx:168
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:73
@ boxedBit
Definition: MWAWFont.hxx:187
a class which stores section properties
Definition: MWAWSection.hxx:46
MWAWEntry m_pos
the file position
Definition: MarinerWrtText.cxx:432
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
Zone & getZone(int id)
return a reference to a textzone ( if zone not exists, created it )
Definition: MarinerWrtText.cxx:505
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:61
MWAWBorder getBorder(int pos) const
return a border corresponding to a pos
Definition: MarinerWrtText.cxx:229
MWAWEntry m_pos
the file data position (for type=0 data )
Definition: MarinerWrtParser.hxx:114
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:127
std::map< int, int > m_idFontMap
a map id -> fontId
Definition: MarinerWrtText.cxx:408
void setColsSize(std::vector< float > const &cSize)
define the columns size (in point)
Definition: MWAWTable.hxx:121
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:226
@ RIGHT
Definition: MWAWList.hxx:50
double m_position
the tab position
Definition: MWAWParagraph.hxx:71
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
bool send(int zoneId)
try to send a zone (knowing zoneId)
Definition: MarinerWrtText.cxx:736
int m_type
the data type
Definition: MarinerWrtParser.hxx:116
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:158
MWAWFont m_font
the font
Definition: MarinerWrtText.cxx:72
bool readRulers(MarinerWrtEntry const &entry, int zoneId)
try to read a ruler zone
Definition: MarinerWrtText.cxx:1557
std::string m_extra
extra data
Definition: MarinerWrtText.cxx:78
std::string m_extra
extra data
Definition: MarinerWrtText.cxx:436
MWAWParserStatePtr m_parserState
the parser state
Definition: MarinerWrtText.hxx:124
MWAWColor m_foreColor
the foreground color
Definition: MarinerWrtText.cxx:185
int m_cellHeight
a cell height
Definition: MarinerWrtText.cxx:200
void setOverline(Line const &line)
sets the overline
Definition: MWAWFont.hxx:362
MWAWColor m_borderColor
the border color
Definition: MarinerWrtText.cxx:191
MarinerWrtText(MarinerWrtText const &orig)
@ Top
Definition: libmwaw_internal.hxx:166
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
a entry to store a zone structure
Definition: MarinerWrtParser.hxx:62
int m_localId
the local id
Definition: MarinerWrtText.cxx:74
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 numValues() const
returns the number of values
Definition: MarinerWrtParser.hxx:100
librevenge::RVNGString m_bullet
the bullet if we have an bullet level
Definition: MWAWList.hxx:99
bool isBasic() const
returns true if this corresponds to a simple container
Definition: MarinerWrtParser.hxx:105
bool hasBorders() const
return true if we have border
Definition: MarinerWrtText.cxx:173
long length() const
returns the zone length
Definition: MarinerWrtText.cxx:367
the main class to read the text part of Mariner Write file
Definition: MarinerWrtText.hxx:61
@ Double
Definition: libmwaw_internal.hxx:318
@ LeftBit
Definition: libmwaw_internal.hxx:168
bool ok() const
Definition: MarinerWrtText.cxx:483
Internal: a struct used to read some field.
Definition: MarinerWrtParser.hxx:92
small structure to store border/fills properties in MarinerWrtText
Definition: MarinerWrtText.cxx:134
@ italicBit
Definition: MWAWFont.hxx:182
@ Dot
Definition: MWAWFont.hxx:49
MWAWColor getBackgroundColor(float percent) const
returns the background color knowing the pattern percent
Definition: MarinerWrtText.cxx:160
void update(float percent)
updates the paragraph knowing the paragraph pattern percent
Definition: MarinerWrtText.cxx:102
Internal: struct used to store zone data of a MarinerWrtText.
Definition: MarinerWrtText.cxx:343
friend std::ostream & operator<<(std::ostream &o, Information const &info)
operator<<
Definition: MarinerWrtText.cxx:423
@ BULLET
Definition: MWAWList.hxx:46
Font()
constructor
Definition: MarinerWrtText.cxx:65
@ Right
Definition: libmwaw_internal.hxx:166
Internal: struct used to store the table of a MarinerWrtText.
Definition: MarinerWrtText.cxx:442
long nextCharPos() const
returns the next char position after the table
Definition: MarinerWrtText.cxx:450
@ JustificationFull
Definition: MWAWParagraph.hxx:87
double m_labelWidth
the minimum label width
Definition: MWAWList.hxx:90
std::map< int, Zone > m_textZoneMap
a map id -> textZone
Definition: MarinerWrtText.cxx:517
@ JustificationRight
Definition: MWAWParagraph.hxx:88
long m_tokenId
the token id
Definition: MarinerWrtText.cxx:76
@ TopBit
Definition: libmwaw_internal.hxx:168
int m_id
the zone id
Definition: MarinerWrtText.cxx:400
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:379
struct used to keep the information of a small zone of MarinerWrtTextInternal::Zone
Definition: MarinerWrtText.cxx:419
Type m_type
the type of the level
Definition: MWAWList.hxx:86
bool getFont(int id, Font &ft) const
returns a fonts corresponding to an id (if possible)
Definition: MarinerWrtText.cxx:375
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
bool readTextStruct(MarinerWrtEntry const &entry, int zoneId)
try to read the text struct
Definition: MarinerWrtText.cxx:630
int m_version
the file version
Definition: MarinerWrtText.cxx:515
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:609
Line const & getUnderline() const
returns the underline
Definition: MWAWFont.hxx:435
void setUnderlineWordFlag(bool wordFlag=false)
sets the underline word flag
Definition: MWAWFont.hxx:458
@ Left
Definition: libmwaw_internal.hxx:166
void setBackgroundColor(MWAWColor color)
sets the font background color
Definition: MWAWFont.hxx:331
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:100
@ Double
Definition: MWAWFont.hxx:51
Zone const & m_zone
the actual zone
Definition: MarinerWrtText.cxx:459
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:270
Row()
constructor
Definition: MarinerWrtText.cxx:466
int m_N
the number of value
Definition: MarinerWrtParser.hxx:86
@ RIGHT
Definition: MWAWParagraph.hxx:48
int numPages() const
returns the number of pages
Definition: MarinerWrtText.cxx:542
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:184
MWAWVec2l m_cPos
the characters positions
Definition: MarinerWrtText.cxx:434
MWAWVariable< int > m_listId
the list id (if know )
Definition: MWAWParagraph.hxx:170
std::vector< Font > m_fontList
a list of font
Definition: MarinerWrtText.cxx:404
MWAWColor m_color
the border color
Definition: libmwaw_internal.hxx:363
@ hiddenBit
Definition: MWAWFont.hxx:183
a table cell of a MarinerWrtText
Definition: MarinerWrtText.cxx:477
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWList.hxx:93
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
Internal: struct used to store the paragraph of a MarinerWrtText.
Definition: MarinerWrtText.cxx:93
Paragraph()
constructor
Definition: MarinerWrtText.cxx:95
int m_actZone
a index used to know the next zone in MarinerWrtText::readZone
Definition: MarinerWrtText.cxx:414
State()
constructor
Definition: MarinerWrtText.cxx:500
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
int m_cellWidth
a cell width
Definition: MarinerWrtText.cxx:198
friend std::ostream & operator<<(std::ostream &o, Paragraph const ¶)
operator<<
Definition: MarinerWrtText.cxx:211
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
@ lowercaseBit
Definition: MWAWFont.hxx:185
shared_ptr< MarinerWrtTextInternal::State > m_state
the state
Definition: MarinerWrtText.hxx:127
Generated on Wed Jun 17 2020 06:30:11 for libmwaw by
doxygen 1.8.18