Go to the documentation of this file.
38 #ifndef LIGHT_WAY_TXT_TEXT
39 # define LIGHT_WAY_TXT_TEXT
130 std::shared_ptr<LightWayTxtTextInternal::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
@ Time
Definition: libmwaw_internal.hxx:401
PLCType m_type
the PLC types
Definition: LightWayTxtText.cxx:76
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:167
void setStrikeOut(Line const &line)
sets the strikeoutline
Definition: MWAWFont.hxx:422
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
MWAWFont m_font
the font
Definition: LightWayTxtText.cxx:214
bool readRuby(MWAWEntry const &entry)
read the ruby data
Definition: LightWayTxtText.cxx:1171
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
@ P_Ruler
Definition: LightWayTxtText.cxx:62
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
std::string m_extra
extra data
Definition: LightWayTxtText.cxx:218
int m_actualPage
Definition: LightWayTxtText.cxx:271
the main class to read a LightWay Text file
Definition: LightWayTxtParser.hxx:59
int m_pictId
the pict id (if set)
Definition: LightWayTxtText.cxx:154
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:162
Internal: the structures of a LightWayTxtText.
Definition: LightWayTxtText.cxx:60
Internal: the header/footer zone of a LightWayTxtText.
Definition: LightWayTxtText.cxx:194
@ boldBit
Definition: MWAWFont.hxx:190
HFZone m_header
header
Definition: LightWayTxtText.cxx:281
LightWayTxtParser * m_mainParser
the main parser;
Definition: LightWayTxtText.hxx:133
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
@ 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:278
libmwaw::DebugFile & rsrcAscii()
a DebugFile used to write what we recognize when we parse the document in rsrc
Definition: LightWayTxtParser.cxx:168
Font()
constructor
Definition: LightWayTxtText.cxx:122
int id() const
returns the id
Definition: MWAWEntry.hxx:164
the class to store a color
Definition: libmwaw_internal.hxx:192
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:156
void setColumns(int num, double width, librevenge::RVNGUnit widthUnit, double colSep=0)
a function which sets n uniform columns
Definition: MWAWSection.cxx:109
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
@ JustificationFullAllLines
Definition: MWAWParagraph.hxx:91
void getBackgroundColor(MWAWColor &c) const
returns the font background color
Definition: MWAWFont.hxx:347
Paragraph(Paragraph const &)=default
void setOverlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the overline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:388
int version() const
returns the file version
Definition: LightWayTxtText.cxx:300
void computePositions()
compute the positions
Definition: LightWayTxtText.cxx:316
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
@ Simple
Definition: MWAWFont.hxx:49
State()
constructor
Definition: LightWayTxtText.cxx:255
void setUnderline(Line const &line)
sets the underline
Definition: MWAWFont.hxx:461
bool readFont2(MWAWEntry const &entry)
read the Font2 resource ( underline, upperline, ...)
Definition: LightWayTxtText.cxx:621
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
LightWayTxtText(LightWayTxtText const &orig)=delete
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
bool isSet() const
return true if the line is not empty
Definition: MWAWFont.hxx:62
int m_numChar
the number of char
Definition: LightWayTxtText.cxx:208
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
Internal: struct used to store the font of a LightWayTxtText.
Definition: LightWayTxtText.cxx:120
@ DECIMAL
Definition: MWAWParagraph.hxx:48
std::shared_ptr< LightWayTxtTextInternal::State > m_state
the state
Definition: LightWayTxtText.hxx:130
Line const & getOverline() const
returns the overline
Definition: MWAWFont.hxx:378
void setUnderlineColor(MWAWColor const &color)
sets the underline color
Definition: MWAWFont.hxx:489
@ embossBit
Definition: MWAWFont.hxx:190
Internal: the state of a LightWayTxtText.
Definition: LightWayTxtText.cxx:253
@ PageCount
Definition: libmwaw_internal.hxx:401
std::ostream & operator<<(std::ostream &o, PLC const &plc)
Definition: LightWayTxtText.cxx:83
@ Date
Definition: libmwaw_internal.hxx:401
PLCType
the different plc type
Definition: LightWayTxtText.cxx:62
bool sendMainText()
send a main zone
Definition: LightWayTxtText.cxx:410
void setStrikeOutType(Line::Type type=Line::Single)
sets the strikeoutline type
Definition: MWAWFont.hxx:435
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 readStyleU(MWAWEntry const &entry)
read the unknown styu resource
Definition: LightWayTxtText.cxx:1119
LightWayTxtText(LightWayTxtParser &parser)
constructor
Definition: LightWayTxtText.cxx:289
void sendGraphic(int graphId)
ask the graph parser to send a graph
Definition: LightWayTxtParser.cxx:217
Line const & getStrikeOut() const
returns the strikeoutline
Definition: MWAWFont.hxx:417
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition: libmwaw_internal.cxx:206
void setUnderlineWidth(float w)
sets the underline width
Definition: MWAWFont.hxx:484
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:813
friend std::ostream & operator<<(std::ostream &o, PLC const &plc)
operator<<
Definition: LightWayTxtText.cxx:83
std::string m_extra
extra data
Definition: MWAWFont.hxx:573
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
int numPages() const
returns the number of pages
Definition: LightWayTxtText.cxx:307
Justification
an enum used to defined the paragraph justification: left, center, right, full ...
Definition: MWAWParagraph.hxx:90
@ shadowBit
Definition: MWAWFont.hxx:191
bool getColumnInfo(int &numCols, int &colSep) const
returns the number of column and the column separator (in point)
Definition: LightWayTxtParser.cxx:190
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:185
MWAWParagraph::Justification m_justify
the paragraph justification
Definition: LightWayTxtText.cxx:216
int m_version
the file version
Definition: LightWayTxtText.cxx:269
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: LightWayTxtText.cxx:1270
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
LightWayTxtText & operator=(LightWayTxtText const &orig)=delete
@ P_StyleV
Definition: LightWayTxtText.cxx:62
MWAWEntry m_pos
the position of the text in the file
Definition: LightWayTxtText.cxx:210
float size() const
returns the font size
Definition: MWAWFont.hxx:270
Internal: class to store the paragraph properties.
Definition: LightWayTxtText.cxx:167
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:76
@ boxedBit
Definition: MWAWFont.hxx:195
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 merge(Font const &fExtra)
merge extra data to get final font
Definition: LightWayTxtText.cxx:132
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
void setOverlineWidth(float w)
sets the overline width
Definition: MWAWFont.hxx:406
double m_position
the tab position
Definition: MWAWParagraph.hxx:74
@ P_Unknown
Definition: LightWayTxtText.cxx:62
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
@ P_StyleU
Definition: LightWayTxtText.cxx:62
bool sendHeaderFooter(bool header)
try to send the header/footer
Definition: LightWayTxtText.cxx:955
bool readDocumentHF(MWAWEntry const &entry)
read the header/footer part of the document zone
Definition: LightWayTxtText.cxx:1016
Script const & script() const
returns the script position
Definition: MWAWFont.hxx:308
a field
Definition: libmwaw_internal.hxx:399
@ PageNumber
Definition: libmwaw_internal.hxx:401
int m_height
the line height
Definition: LightWayTxtText.cxx:152
@ JustificationLeft
Definition: MWAWParagraph.hxx:90
static Script sub()
return a yposition which correspond to a basic subscript
Definition: MWAWFont.hxx:120
bool readFonts(MWAWEntry const &entry)
read the fonts ( styl resource)
Definition: LightWayTxtText.cxx:548
void setOverline(Line const &line)
sets the overline
Definition: MWAWFont.hxx:383
friend std::ostream & operator<<(std::ostream &o, HFZone const &hf)
operator<<
Definition: LightWayTxtText.cxx:221
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
void setOverlineType(Line::Type type=Line::Single)
sets the overline type
Definition: MWAWFont.hxx:396
std::vector< Font > m_fontsList
the list of fonts
Definition: LightWayTxtText.cxx:274
int m_numPages
Definition: LightWayTxtText.cxx:271
PLC()
the constructor
Definition: LightWayTxtText.cxx:67
bool readUnknownStyle(MWAWEntry const &entry)
read the styl resource
Definition: LightWayTxtText.cxx:1220
@ italicBit
Definition: MWAWFont.hxx:190
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:150
@ Dot
Definition: MWAWFont.hxx:49
~Paragraph() final
destructor
Definition: LightWayTxtText.cxx:188
bool getColor(int id, MWAWColor &col) const
return a color corresponding to an id
Definition: LightWayTxtText.cxx:330
Defines MWAWTextListener: the libmwaw word processor listener.
MWAWFont m_font
the font
Definition: LightWayTxtText.cxx:150
Paragraph()
Constructor.
Definition: LightWayTxtText.cxx:169
@ JustificationFull
Definition: MWAWParagraph.hxx:90
bool hasHeaderFooter(bool header) const
returns true if there is a header/footer
Definition: LightWayTxtText.cxx:323
@ JustificationRight
Definition: MWAWParagraph.hxx:91
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
the main class to read the text part of LightWay Text file
Definition: LightWayTxtText.hxx:58
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:99
@ P_Ruby
Definition: LightWayTxtText.cxx:62
static Script super()
return a yposition which correspond to a basic superscript
Definition: MWAWFont.hxx:130
virtual ~LightWayTxtText()
destructor
Definition: LightWayTxtText.cxx:296
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:630
void setStrikeOutColor(MWAWColor const &color)
sets the strikeoutline color
Definition: MWAWFont.hxx:450
Line const & getUnderline() const
returns the underline
Definition: MWAWFont.hxx:456
void setBackgroundColor(MWAWColor color)
sets the font background color
Definition: MWAWFont.hxx:352
friend std::ostream & operator<<(std::ostream &o, Font const &font)
operator<<
Definition: LightWayTxtText.cxx:157
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:173
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:106
@ Double
Definition: MWAWFont.hxx:51
bool createZones()
finds the different text zones
Definition: LightWayTxtText.cxx:349
uint32_t flags() const
returns the font flags
Definition: MWAWFont.hxx:320
int m_height
the height
Definition: LightWayTxtText.cxx:212
@ RIGHT
Definition: MWAWParagraph.hxx:48
Class to store font.
Definition: MWAWFont.hxx:44
void setProperty(MWAWParagraph const ¶)
send the paragraph properties
Definition: LightWayTxtText.cxx:807
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:190
@ Title
Definition: libmwaw_internal.hxx:401
HFZone m_footer
footer
Definition: LightWayTxtText.cxx:281
void setStrikeOutWidth(float w)
sets the strikeoutline width
Definition: MWAWFont.hxx:445
MWAWInputStreamPtr rsrcInput()
return the input input
Definition: LightWayTxtParser.cxx:163
std::vector< Font > m_auxiFontsList
the auxiliar list of fonts
Definition: LightWayTxtText.cxx:276
std::multimap< long, PLC > m_plcMap
the plc map
Definition: LightWayTxtText.cxx:279
int m_id
the id
Definition: LightWayTxtText.cxx:78
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
HFZone()
constructor
Definition: LightWayTxtText.cxx:196
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
std::string m_extra
extra data
Definition: LightWayTxtText.cxx:80
void setOverlineColor(MWAWColor const &color)
sets the overline color
Definition: MWAWFont.hxx:411
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20