Go to the documentation of this file.
38 #ifndef LIGHT_WAY_TXT_TEXT
39 # define LIGHT_WAY_TXT_TEXT
130 shared_ptr<LightWayTxtTextInternal::State>
m_state;
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
@ Time
Definition: libmwaw_internal.hxx:371
PLCType m_type
the PLC types
Definition: LightWayTxtText.cxx:73
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:161
void setStrikeOut(Line const &line)
sets the strikeoutline
Definition: MWAWFont.hxx:401
MWAWFont m_font
the font
Definition: LightWayTxtText.cxx:199
bool readRuby(MWAWEntry const &entry)
read the ruby data
Definition: LightWayTxtText.cxx:1149
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:293
LightWayTxtText(LightWayTxtText const &orig)
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
@ P_Ruler
Definition: LightWayTxtText.cxx:62
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
std::string m_extra
extra data
Definition: LightWayTxtText.cxx:203
int m_actualPage
Definition: LightWayTxtText.cxx:247
the main class to read a LightWay Text file
Definition: LightWayTxtParser.hxx:59
shared_ptr< LightWayTxtTextInternal::State > m_state
the state
Definition: LightWayTxtText.hxx:130
int m_pictId
the pict id (if set)
Definition: LightWayTxtText.cxx:148
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:156
Internal: the structures of a LightWayTxtText.
Definition: LightWayTxtText.cxx:60
Internal: the header/footer zone of a LightWayTxtText.
Definition: LightWayTxtText.cxx:185
@ boldBit
Definition: MWAWFont.hxx:182
HFZone m_header
header
Definition: LightWayTxtText.cxx:257
LightWayTxtParser * m_mainParser
the main parser;
Definition: LightWayTxtText.hxx:133
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:231
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:320
@ P_Font2
Definition: LightWayTxtText.cxx:62
@ CENTER
Definition: MWAWParagraph.hxx:48
Internal : the different plc types: mainly for debugging.
Definition: LightWayTxtText.cxx:65
std::vector< Paragraph > m_paragraphsList
the list of paragraph
Definition: LightWayTxtText.cxx:254
libmwaw::DebugFile & rsrcAscii()
a DebugFile used to write what we recognize when we parse the document in rsrc
Definition: LightWayTxtParser.cxx:160
Font()
constructor
Definition: LightWayTxtText.cxx:119
int id() const
returns the id
Definition: MWAWEntry.hxx:153
the class to store a color
Definition: libmwaw_internal.hxx:182
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:150
void setColumns(int num, double width, librevenge::RVNGUnit widthUnit, double colSep=0)
a function which sets n uniform columns
Definition: MWAWSection.cxx:108
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:126
@ JustificationFullAllLines
Definition: MWAWParagraph.hxx:88
void getBackgroundColor(MWAWColor &c) const
returns the font background color
Definition: MWAWFont.hxx:326
void setOverlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the overline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:367
int version() const
returns the file version
Definition: LightWayTxtText.cxx:273
void computePositions()
compute the positions
Definition: LightWayTxtText.cxx:289
class to store the paragraph properties
Definition: MWAWParagraph.hxx:82
@ Simple
Definition: MWAWFont.hxx:49
State()
constructor
Definition: LightWayTxtText.cxx:240
void setUnderline(Line const &line)
sets the underline
Definition: MWAWFont.hxx:440
bool readFont2(MWAWEntry const &entry)
read the Font2 resource ( underline, upperline, ...)
Definition: LightWayTxtText.cxx:598
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
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
bool isSet() const
return true if the line is not empty
Definition: MWAWFont.hxx:56
int m_numChar
the number of char
Definition: LightWayTxtText.cxx:193
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:142
Internal: struct used to store the font of a LightWayTxtText.
Definition: LightWayTxtText.cxx:117
@ DECIMAL
Definition: MWAWParagraph.hxx:48
Line const & getOverline() const
returns the overline
Definition: MWAWFont.hxx:357
void setUnderlineColor(MWAWColor const &color)
sets the underline color
Definition: MWAWFont.hxx:468
@ embossBit
Definition: MWAWFont.hxx:182
Internal: the state of a LightWayTxtText.
Definition: LightWayTxtText.cxx:238
@ PageCount
Definition: libmwaw_internal.hxx:371
std::ostream & operator<<(std::ostream &o, PLC const &plc)
Definition: LightWayTxtText.cxx:80
@ Date
Definition: libmwaw_internal.hxx:371
PLCType
the different plc type
Definition: LightWayTxtText.cxx:62
bool sendMainText()
send a main zone
Definition: LightWayTxtText.cxx:384
void setStrikeOutType(Line::Type type=Line::Single)
sets the strikeoutline type
Definition: MWAWFont.hxx:414
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 readStyleU(MWAWEntry const &entry)
read the unknown styu resource
Definition: LightWayTxtText.cxx:1097
LightWayTxtText(LightWayTxtParser &parser)
constructor
Definition: LightWayTxtText.cxx:265
void sendGraphic(int graphId)
ask the graph parser to send a graph
Definition: LightWayTxtParser.cxx:209
Line const & getStrikeOut() const
returns the strikeoutline
Definition: MWAWFont.hxx:396
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition: libmwaw_internal.cxx:205
void setUnderlineWidth(float w)
sets the underline width
Definition: MWAWFont.hxx:463
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWParser.hxx:185
bool readRulers(MWAWEntry const &entry)
read the rulers (stylx resource)
Definition: LightWayTxtText.cxx:790
friend std::ostream & operator<<(std::ostream &o, PLC const &plc)
operator<<
Definition: LightWayTxtText.cxx:80
std::string m_extra
extra data
Definition: MWAWFont.hxx:552
@ JustificationCenter
Definition: MWAWParagraph.hxx:87
int numPages() const
returns the number of pages
Definition: LightWayTxtText.cxx:280
Justification
an enum used to defined the paragraph justification: left, center, right, full ...
Definition: MWAWParagraph.hxx:87
@ shadowBit
Definition: MWAWFont.hxx:183
bool getColumnInfo(int &numCols, int &colSep) const
returns the number of column and the column separator (in point)
Definition: LightWayTxtParser.cxx:182
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
MWAWRSRCParserPtr & getRSRCParser()
returns the rsrc parser
Definition: MWAWParser.hxx:190
@ P_Font
Definition: LightWayTxtText.cxx:62
float m_deltaSpacing
the paragraph delta spacing
Definition: LightWayTxtText.cxx:176
MWAWParagraph::Justification m_justify
the paragraph justification
Definition: LightWayTxtText.cxx:201
int m_version
the file version
Definition: LightWayTxtText.cxx:245
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: LightWayTxtText.cxx:1248
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
@ P_StyleV
Definition: LightWayTxtText.cxx:62
MWAWEntry m_pos
the position of the text in the file
Definition: LightWayTxtText.cxx:195
float size() const
returns the font size
Definition: MWAWFont.hxx:249
Internal: class to store the paragraph properties.
Definition: LightWayTxtText.cxx:161
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
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
void merge(Font const &fExtra)
merge extra data to get final font
Definition: LightWayTxtText.cxx:126
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:226
void setOverlineWidth(float w)
sets the overline width
Definition: MWAWFont.hxx:385
double m_position
the tab position
Definition: MWAWParagraph.hxx:71
@ P_Unknown
Definition: LightWayTxtText.cxx:62
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
@ P_StyleU
Definition: LightWayTxtText.cxx:62
bool sendHeaderFooter(bool header)
try to send the header/footer
Definition: LightWayTxtText.cxx:932
bool readDocumentHF(MWAWEntry const &entry)
read the header/footer part of the document zone
Definition: LightWayTxtText.cxx:993
Script const & script() const
returns the script position
Definition: MWAWFont.hxx:287
a field
Definition: libmwaw_internal.hxx:369
@ PageNumber
Definition: libmwaw_internal.hxx:371
int m_height
the line height
Definition: LightWayTxtText.cxx:146
@ JustificationLeft
Definition: MWAWParagraph.hxx:87
friend std::ostream & operator<<(std::ostream &o, Paragraph const &ind)
operator<<
Definition: LightWayTxtText.cxx:169
static Script sub()
return a yposition which correspond to a basic subscript
Definition: MWAWFont.hxx:112
bool readFonts(MWAWEntry const &entry)
read the fonts ( styl resource)
Definition: LightWayTxtText.cxx:524
void setOverline(Line const &line)
sets the overline
Definition: MWAWFont.hxx:362
friend std::ostream & operator<<(std::ostream &o, HFZone const &hf)
operator<<
Definition: LightWayTxtText.cxx:206
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 setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:254
void setOverlineType(Line::Type type=Line::Single)
sets the overline type
Definition: MWAWFont.hxx:375
std::vector< Font > m_fontsList
the list of fonts
Definition: LightWayTxtText.cxx:250
int m_numPages
Definition: LightWayTxtText.cxx:247
PLC()
the constructor
Definition: LightWayTxtText.cxx:67
bool readUnknownStyle(MWAWEntry const &entry)
read the styl resource
Definition: LightWayTxtText.cxx:1198
@ italicBit
Definition: MWAWFont.hxx:182
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:144
@ Dot
Definition: MWAWFont.hxx:49
bool getColor(int id, MWAWColor &col) const
return a color corresponding to an id
Definition: LightWayTxtText.cxx:303
MWAWFont m_font
the font
Definition: LightWayTxtText.cxx:144
Paragraph()
Constructor.
Definition: LightWayTxtText.cxx:163
@ JustificationFull
Definition: MWAWParagraph.hxx:87
bool hasHeaderFooter(bool header) const
returns true if there is a header/footer
Definition: LightWayTxtText.cxx:296
@ JustificationRight
Definition: MWAWParagraph.hxx:88
the main class to read the text part of LightWay Text file
Definition: LightWayTxtText.hxx:58
LightWayTxtText & operator=(LightWayTxtText const &orig)
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWParserStatePtr m_parserState
the parser state
Definition: LightWayTxtText.hxx:127
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
@ P_Ruby
Definition: LightWayTxtText.cxx:62
static Script super()
return a yposition which correspond to a basic superscript
Definition: MWAWFont.hxx:122
virtual ~LightWayTxtText()
destructor
Definition: LightWayTxtText.cxx:270
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:581
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:513
void setStrikeOutColor(MWAWColor const &color)
sets the strikeoutline color
Definition: MWAWFont.hxx:429
Line const & getUnderline() const
returns the underline
Definition: MWAWFont.hxx:435
void setBackgroundColor(MWAWColor color)
sets the font background color
Definition: MWAWFont.hxx:331
friend std::ostream & operator<<(std::ostream &o, Font const &font)
operator<<
Definition: LightWayTxtText.cxx:151
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 textInDataFork() const
returns true if the main text is in data fork
Definition: LightWayTxtParser.cxx:165
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:100
@ Double
Definition: MWAWFont.hxx:51
bool createZones()
finds the different text zones
Definition: LightWayTxtText.cxx:322
uint32_t flags() const
returns the font flags
Definition: MWAWFont.hxx:299
int m_height
the height
Definition: LightWayTxtText.cxx:197
@ RIGHT
Definition: MWAWParagraph.hxx:48
Class to store font.
Definition: MWAWFont.hxx:44
void setProperty(MWAWParagraph const ¶)
send the paragraph properties
Definition: LightWayTxtText.cxx:784
~Paragraph()
destructor
Definition: LightWayTxtText.cxx:179
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:184
@ Title
Definition: libmwaw_internal.hxx:371
HFZone m_footer
footer
Definition: LightWayTxtText.cxx:257
void setStrikeOutWidth(float w)
sets the strikeoutline width
Definition: MWAWFont.hxx:424
MWAWInputStreamPtr rsrcInput()
return the input input
Definition: LightWayTxtParser.cxx:155
std::vector< Font > m_auxiFontsList
the auxiliar list of fonts
Definition: LightWayTxtText.cxx:252
std::multimap< long, PLC > m_plcMap
the plc map
Definition: LightWayTxtText.cxx:255
int m_id
the id
Definition: LightWayTxtText.cxx:75
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:445
HFZone()
constructor
Definition: LightWayTxtText.cxx:187
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
std::string m_extra
extra data
Definition: LightWayTxtText.cxx:77
void setOverlineColor(MWAWColor const &color)
sets the overline color
Definition: MWAWFont.hxx:390
Generated on Wed Jun 17 2020 06:30:10 for libmwaw by
doxygen 1.8.18