Go to the documentation of this file.
40 #include <librevenge/librevenge.h>
68 void parse(librevenge::RVNGTextInterface *documentInterface);
72 void createDocument(librevenge::RVNGTextInterface *documentInterface);
124 shared_ptr<StyleParserInternal::State>
m_state;
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:187
bool readStat(MWAWEntry const &entry)
tries to read the stat zone: stat
Definition: StyleParser.cxx:1438
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:161
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:296
State()
constructor
Definition: StyleParser.cxx:96
Internal: the state of a StyleParser.
Definition: StyleParser.cxx:94
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
std::map< long, int > m_posFontIdMap
a map pos->font id
Definition: StyleParser.cxx:117
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:293
shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:519
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:262
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
std::vector< MWAWParagraph > m_paragraphList
the list of paragraph style
Definition: StyleParser.cxx:115
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:109
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:221
std::vector< Font > m_fontList
the list of font style
Definition: StyleParser.cxx:113
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:110
@ boldBit
Definition: MWAWFont.hxx:182
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:1315
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:320
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:123
int id() const
returns the id
Definition: MWAWEntry.hxx:153
MWAWEntry m_entry
the picture entry
Definition: StyleParser.cxx:72
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:202
the class to store a color
Definition: libmwaw_internal.hxx:182
small class use to define a embedded object
Definition: libmwaw_internal.hxx:425
friend class TTText
Definition: StyleParser.hxx:57
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:150
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:126
bool readTabWidth(MWAWEntry const &entry)
tries to read the tab width zone : tabw
Definition: StyleParser.cxx:1474
small structure used to store picture data in StyleParser
Definition: StyleParser.cxx:59
class to store the paragraph properties
Definition: MWAWParagraph.hxx:82
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:187
@ Simple
Definition: MWAWFont.hxx:49
double m_width
the border total width in point
Definition: libmwaw_internal.hxx:357
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
int m_actPage
the actual page
Definition: StyleParser.cxx:122
bool readVersion(MWAWEntry const &entry)
tries to read the version zone: vers
Definition: StyleParser.cxx:1500
shared_ptr< StyleParserInternal::State > m_state
the state
Definition: StyleParser.hxx:124
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:115
int m_numPages
the number of page of the final document
Definition: StyleParser.cxx:122
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:121
void setDeltaLetterSpacing(float d, librevenge::RVNGUnit unit=librevenge::RVNG_POINT)
sets the letter spacing ( delta value in point )
Definition: MWAWFont.hxx:271
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:142
@ Dot
Definition: libmwaw_internal.hxx:316
bool sendPicture(StyleParserInternal::Picture const &pict)
try to send a picture knowing the char position
Definition: StyleParser.cxx:1658
bool readTypeEntryMap()
tries to read the main entry map
Definition: StyleParser.cxx:345
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
@ embossBit
Definition: MWAWFont.hxx:182
bool readRules(MWAWEntry const &entry)
tries to read the rule zone: rule
Definition: StyleParser.cxx:801
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 readMargins(MWAWEntry const &entry)
tries to read the margins zone: marg
Definition: StyleParser.cxx:1344
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:172
std::vector< MWAWVariable< MWAWBorder > > m_borders
list of border ( order MWAWBorder::Pos)
Definition: MWAWParagraph.hxx:180
void setBackgroundColor(MWAWColor color=MWAWColor::white())
set the background color
Definition: MWAWPageSpan.hxx:252
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:85
std::string m_extra
extra data
Definition: MWAWFont.hxx:552
void parse(librevenge::RVNGTextInterface *documentInterface)
virtual function used to parse the input
Definition: StyleParser.cxx:159
@ JustificationCenter
Definition: MWAWParagraph.hxx:87
@ shadowBit
Definition: MWAWFont.hxx:183
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:121
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:146
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:105
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
T y() const
second element
Definition: libmwaw_internal.hxx:620
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:197
Picture()
constructor
Definition: StyleParser.cxx:61
@ Bottom
Definition: libmwaw_internal.hxx:166
int computeNumPages(MWAWEntry const &entry, bool unicodeChar) const
compute the number of page of a zone
Definition: StyleParser.cxx:1533
bool readStyleTable(MWAWEntry const &entry)
tries to read the style zone: styl
Definition: StyleParser.cxx:489
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:177
small structure used to store a font and a picture
Definition: StyleParser.cxx:76
T x() const
first element
Definition: libmwaw_internal.hxx:615
@ MWAW_T_STYLE
Style: v1.6, v1.9.
Definition: MWAWDocument.hxx:180
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
a border
Definition: libmwaw_internal.hxx:314
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
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:441
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
@ PageBreak
Definition: MWAWListener.hxx:58
StyleParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: StyleParser.cxx:130
Definition: libmwaw_internal.hxx:142
MWAWVec2i m_size
the picture size in point
Definition: StyleParser.cxx:70
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
bool readPrintInfo(MWAWEntry const &entry)
tries to read the printer info zone: prec
Definition: StyleParser.cxx:1388
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:61
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
bool valid() const
returns true if the picture is valid
Definition: StyleParser.cxx:65
bool readFormats(MWAWEntry const &entry)
tries to read the format: cfor (v1.9)
Definition: StyleParser.cxx:569
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
bool readPictures(MWAWEntry const &entry)
tries to read the pictures zone: soup
Definition: StyleParser.cxx:1027
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:158
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:197
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:218
@ Char
Definition: MWAWPosition.hxx:51
Font()
constructor
Definition: StyleParser.cxx:78
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:143
Picture m_picture
the picture
Definition: StyleParser.cxx:89
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
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: StyleParser.cxx:1692
bool hasPicture() const
returns true if the picture is valid
Definition: StyleParser.cxx:82
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
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1132
virtual ~StyleParser()
destructor
Definition: StyleParser.cxx:136
MWAWEntry m_textEntry
the text entry
Definition: StyleParser.cxx:107
@ italicBit
Definition: MWAWFont.hxx:182
bool m_unicodeChar
true if the character are unicode character
Definition: StyleParser.cxx:105
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
bool readPLCs(MWAWEntry const &entry, bool para)
tries to read the plc zone: runa or para
Definition: StyleParser.cxx:987
@ JustificationFull
Definition: MWAWParagraph.hxx:87
@ JustificationRight
Definition: MWAWParagraph.hxx:88
bool sendText(MWAWEntry const &entry, bool unicodeChar)
try to send the main text
Definition: StyleParser.cxx:1547
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWFont m_font
the font
Definition: StyleParser.cxx:87
void setStream(MWAWInputStreamPtr ip)
resets the input
Definition: MWAWDebug.hxx:73
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:192
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:513
std::vector< int > m_fontIdToFinalIdList
list of font final id
Definition: StyleParser.cxx:111
void setBackgroundColor(MWAWColor color)
sets the font background color
Definition: MWAWFont.hxx:331
bool readFontNames(MWAWEntry const &entry)
tries to read the font table: fntb (v1.6)
Definition: StyleParser.cxx:408
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:100
std::map< long, int > m_posParagraphIdMap
a map pos->paragraphId
Definition: StyleParser.cxx:119
bool createZones()
finds the different objects zones
Definition: StyleParser.cxx:217
uint32_t flags() const
returns the font flags
Definition: MWAWFont.hxx:299
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:207
std::map< std::string, MWAWEntry > m_entryMap
the map type to entry
Definition: StyleParser.cxx:103
Class to store font.
Definition: MWAWFont.hxx:44
bool readExtraProperties(MWAWEntry const &entry)
tries to read the extra property zone: xprc
Definition: StyleParser.cxx:1110
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
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
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:96
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:151
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
Generated on Wed Jun 17 2020 06:30:13 for libmwaw by
doxygen 1.8.18