Go to the documentation of this file.
40 #include <librevenge/librevenge.h>
67 void parse(librevenge::RVNGTextInterface *documentInterface)
final;
71 void createDocument(librevenge::RVNGTextInterface *documentInterface);
123 std::shared_ptr<StyleParserInternal::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
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: StyleParser.cxx:201
bool readStat(MWAWEntry const &entry)
tries to read the stat zone: stat
Definition: StyleParser.cxx:1448
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
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:299
State()
constructor
Definition: StyleParser.cxx:100
Internal: the state of a StyleParser.
Definition: StyleParser.cxx:98
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
std::map< long, int > m_posFontIdMap
a map pos->font id
Definition: StyleParser.cxx:130
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
std::vector< MWAWParagraph > m_paragraphList
the list of paragraph style
Definition: StyleParser.cxx:128
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MWAWColor m_backgroundColor
the background color
Definition: StyleParser.cxx:122
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
std::vector< Font > m_fontList
the list of font style
Definition: StyleParser.cxx:126
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:121
@ boldBit
Definition: MWAWFont.hxx:190
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
bool readBackgroundColor(MWAWEntry const &entry)
tries to read the background color: bgcl
Definition: StyleParser.cxx:1325
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
std::shared_ptr< StyleParserInternal::State > m_state
the state
Definition: StyleParser.hxx:123
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
StyleParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: StyleParser.cxx:143
MWAWEntry m_entry
the picture entry
Definition: StyleParser.cxx:74
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:156
int version() const
returns the works version
Definition: MWAWParser.hxx:108
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
bool readTabWidth(MWAWEntry const &entry)
tries to read the tab width zone : tabw
Definition: StyleParser.cxx:1484
small structure used to store picture data in StyleParser
Definition: StyleParser.cxx:59
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
@ Simple
Definition: MWAWFont.hxx:49
double m_width
the border total width in point
Definition: libmwaw_internal.hxx:387
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
int m_actPage
the actual page
Definition: StyleParser.cxx:135
bool readVersion(MWAWEntry const &entry)
tries to read the version zone: vers
Definition: StyleParser.cxx:1510
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
int m_numPages
the number of page of the final document
Definition: StyleParser.cxx:135
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
std::map< long, Picture > m_posPictureMap
a map pos->pictEntry
Definition: StyleParser.cxx:134
void setDeltaLetterSpacing(float d, librevenge::RVNGUnit unit=librevenge::RVNG_POINT)
sets the letter spacing ( delta value in point )
Definition: MWAWFont.hxx:292
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
@ Dot
Definition: libmwaw_internal.hxx:335
bool sendPicture(StyleParserInternal::Picture const &pict)
try to send a picture knowing the char position
Definition: StyleParser.cxx:1667
bool readTypeEntryMap()
tries to read the main entry map
Definition: StyleParser.cxx:358
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
@ embossBit
Definition: MWAWFont.hxx:190
bool readRules(MWAWEntry const &entry)
tries to read the rule zone: rule
Definition: StyleParser.cxx:812
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 readMargins(MWAWEntry const &entry)
tries to read the margins zone: marg
Definition: StyleParser.cxx:1354
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
std::vector< MWAWVariable< MWAWBorder > > m_borders
list of border ( order MWAWBorder::Pos)
Definition: MWAWParagraph.hxx:186
void setBackgroundColor(MWAWColor color=MWAWColor::white())
set the background color
Definition: MWAWPageSpan.hxx:258
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
std::string m_extra
extra data
Definition: MWAWFont.hxx:573
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
@ shadowBit
Definition: MWAWFont.hxx:191
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:132
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:158
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
T y() const
second element
Definition: libmwaw_internal.hxx:673
bool dumpFile(librevenge::RVNGBinaryData &data, char const *fileName)
a debug function to store in a datafile in the current directory WARNING: this function erase the fil...
Definition: MWAWDebug.cxx:193
Picture()
constructor
Definition: StyleParser.cxx:61
@ Bottom
Definition: libmwaw_internal.hxx:176
int computeNumPages(MWAWEntry const &entry, bool unicodeChar) const
compute the number of page of a zone
Definition: StyleParser.cxx:1543
bool readStyleTable(MWAWEntry const &entry)
tries to read the style zone: styl
Definition: StyleParser.cxx:502
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
small structure used to store a font and a picture
Definition: StyleParser.cxx:78
T x() const
first element
Definition: libmwaw_internal.hxx:668
@ MWAW_T_STYLE
Style: v1.6, v1.9.
Definition: MWAWDocument.hxx:204
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: StyleParser.cxx:1701
a border
Definition: libmwaw_internal.hxx:333
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
bool readFontCorr(MWAWEntry const &entry)
tries to read the font correspondance zone: font, contains the font id, the position in fntb and many...
Definition: StyleParser.cxx:454
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
@ PageBreak
Definition: MWAWListener.hxx:58
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
Definition: libmwaw_internal.hxx:144
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
MWAWVec2i m_size
the picture size in point
Definition: StyleParser.cxx:72
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
bool readPrintInfo(MWAWEntry const &entry)
tries to read the printer info zone: prec
Definition: StyleParser.cxx:1398
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
~StyleParser() final
destructor
Definition: StyleParser.cxx:150
bool valid() const
returns true if the picture is valid
Definition: StyleParser.cxx:67
bool readFormats(MWAWEntry const &entry)
tries to read the format: cfor (v1.9)
Definition: StyleParser.cxx:580
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
bool readPictures(MWAWEntry const &entry)
tries to read the pictures zone: soup
Definition: StyleParser.cxx:1038
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
@ Char
Definition: MWAWPosition.hxx:51
Font()
constructor
Definition: StyleParser.cxx:80
Internal: the structures of a StyleParser.
Definition: StyleParser.cxx:57
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
void newPage(int number)
adds a new page
Definition: StyleParser.cxx:157
Picture m_picture
the picture
Definition: StyleParser.cxx:93
Style m_style
the border style
Definition: libmwaw_internal.hxx:380
bool hasPicture() const
returns true if the picture is valid
Definition: StyleParser.cxx:86
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
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: StyleParser.cxx:173
MWAWEntry m_textEntry
the text entry
Definition: StyleParser.cxx:120
@ italicBit
Definition: MWAWFont.hxx:190
bool m_unicodeChar
true if the character are unicode character
Definition: StyleParser.cxx:118
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
Defines MWAWTextListener: the libmwaw word processor listener.
bool readPLCs(MWAWEntry const &entry, bool para)
tries to read the plc zone: runa or para
Definition: StyleParser.cxx:998
@ JustificationFull
Definition: MWAWParagraph.hxx:90
@ JustificationRight
Definition: MWAWParagraph.hxx:91
bool sendText(MWAWEntry const &entry, bool unicodeChar)
try to send the main text
Definition: StyleParser.cxx:1557
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWFont m_font
the font
Definition: StyleParser.cxx:91
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
std::vector< int > m_fontIdToFinalIdList
list of font final id
Definition: StyleParser.cxx:124
void setBackgroundColor(MWAWColor color)
sets the font background color
Definition: MWAWFont.hxx:352
bool readFontNames(MWAWEntry const &entry)
tries to read the font table: fntb (v1.6)
Definition: StyleParser.cxx:421
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:106
std::map< long, int > m_posParagraphIdMap
a map pos->paragraphId
Definition: StyleParser.cxx:132
bool createZones()
finds the different objects zones
Definition: StyleParser.cxx:231
uint32_t flags() const
returns the font flags
Definition: MWAWFont.hxx:320
the main class to read a Style file
Definition: StyleParser.hxx:56
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
std::map< std::string, MWAWEntry > m_entryMap
the map type to entry
Definition: StyleParser.cxx:116
Class to store font.
Definition: MWAWFont.hxx:44
bool readExtraProperties(MWAWEntry const &entry)
tries to read the extra property zone: xprc
Definition: StyleParser.cxx:1121
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
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20