Go to the documentation of this file.
37 #ifndef MIND_WRT_PARSER
38 # define MIND_WRT_PARSER
102 void sendText(std::
string const &text, std::vector<
MWAWFont> const &fonts, std::vector<
int> const &textPos);
void sendHeaderFooterFields(bool header)
try to send the header/footer fields as text (in a textbox)
Definition: MindWrtParser.cxx:1101
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
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
std::vector< Field > m_footerFieldList
the footer field list
Definition: MindWrtParser.cxx:520
int m_listLevel
the item level
Definition: MindWrtParser.cxx:372
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: MindWrtParser.cxx:539
bool readGraphic(MindWrtParserInternal::LineInfo const &line)
try to read a graphic
Definition: MindWrtParser.cxx:942
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
int m_listLevelsRepeatPos
the position used to repeat level
Definition: MindWrtParser.cxx:155
MWAWEntry m_entry
the main entry
Definition: MindWrtParser.cxx:356
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
librevenge::RVNGString m_suffix
string which follows the number if we have an ordered level
Definition: MWAWList.hxx:113
MWAWVariable< int > m_listStartValue
the list start value (if set )
Definition: MWAWParagraph.hxx:178
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
Internal: a field of a MindWrtParser.
Definition: MindWrtParser.cxx:63
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
void newPage(int number)
adds a new page
Definition: MindWrtParser.cxx:615
int m_numLinesByZone[3]
the number of paragraph by zones ( main, header, footer )
Definition: MindWrtParser.cxx:506
bool ok() const
return true is the field is defined
Definition: MindWrtParser.cxx:72
@ MWAW_T_MINDWRITE
MindWrite.
Definition: MWAWDocument.hxx:128
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:162
void setProperty(MWAWParagraph const ¶)
sends a paragraph property to the listener
Definition: MindWrtParser.cxx:2086
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:121
bool readFonts(MWAWEntry const &entry, std::vector< MWAWFont > &fonts, std::vector< int > &textPos)
try to read the fonts
Definition: MindWrtParser.cxx:1336
std::string m_DTFormat
the date/time format using strftime format if defined
Definition: libmwaw_internal.hxx:424
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:125
@ boldBit
Definition: MWAWFont.hxx:190
std::string m_extra
extra data
Definition: MindWrtParser.cxx:378
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
ZoneInfo()
Definition: MindWrtParser.cxx:384
MWAWVariable< int > m_listLevelIndex
the actual level index
Definition: MWAWParagraph.hxx:174
@ NONE
Definition: MWAWList.hxx:46
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
@ CENTER
Definition: MWAWParagraph.hxx:48
int m_y
the y pos
Definition: MindWrtParser.cxx:362
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
@ LOWER_ALPHA
Definition: MWAWList.hxx:46
void sendHeaderFooter(bool header)
try to send the header/footer zone
Definition: MindWrtParser.cxx:1079
int m_startValue
the actual value (if this is an ordered level )
Definition: MWAWList.hxx:110
int id() const
returns the id
Definition: MWAWEntry.hxx:164
int m_numPages
the number of page of the final document
Definition: MindWrtParser.cxx:515
@ WBackground
Definition: MWAWPosition.hxx:53
std::vector< Field > m_headerFieldList
the actual list id the header field list
Definition: MindWrtParser.cxx:518
MWAWField::Type m_type
the field type
Definition: MindWrtParser.cxx:121
int m_height
the height
Definition: MindWrtParser.cxx:360
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libmwaw_internal.cxx:63
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
Type
Defines some basic type for field.
Definition: libmwaw_internal.hxx:401
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:156
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
bool readHeadingStates(MWAWEntry &entry)
read the heading state
Definition: MindWrtParser.cxx:1626
bool m_specialHeadingInterface
true if the paragraph
Definition: MindWrtParser.cxx:368
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
std::shared_ptr< MWAWList > getNewList(std::shared_ptr< MWAWList > actList, int levl, MWAWListLevel const &level)
returns a new list corresponding to a list where we have a new level
Definition: MWAWList.cxx:404
@ Simple
Definition: MWAWFont.hxx:49
@ UPPER_ALPHA
Definition: MWAWList.hxx:46
bool readPrintInfo(MWAWEntry &entry)
read the print info zone
Definition: MindWrtParser.cxx:1990
static MWAWPictData * get(MWAWInputStreamPtr const &input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
bool m_showFirstLevel
true if we show the level 1 label
Definition: MindWrtParser.cxx:157
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
MWAWEntry readEntry()
read a file entry
Definition: MindWrtParser.cxx:628
bool readHeadingFields(MWAWEntry &entry)
read the heading field zone ( zone 12 )
Definition: MindWrtParser.cxx:1932
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
bool m_paragraphSet
true if the paragraph is reset
Definition: MindWrtParser.cxx:370
std::string m_extra
extra data
Definition: MindWrtParser.cxx:125
void sendText(std::string const &text, std::vector< MWAWFont > const &fonts, std::vector< int > const &textPos)
try to send the text
Definition: MindWrtParser.cxx:2056
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
int m_flags[4]
two flags
Definition: MindWrtParser.cxx:376
void updateListId(ListProperties &prop, MWAWListManager &listManager)
update the line list id
Definition: MindWrtParser.cxx:396
double m_labelBeforeSpace
the extra space between inserting a label
Definition: MWAWList.hxx:104
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:135
@ embossBit
Definition: MWAWFont.hxx:190
std::shared_ptr< MindWrtParserInternal::State > m_state
the state
Definition: MindWrtParser.hxx:148
MindWrtParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: MindWrtParser.cxx:590
@ PageCount
Definition: libmwaw_internal.hxx:401
Defines MWAWCell (cell content and format)
@ Date
Definition: libmwaw_internal.hxx:401
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
@ BookmarkEnd
Definition: libmwaw_internal.hxx:401
class to store a tab use by MWAWParagraph
Definition: MWAWParagraph.hxx:46
int m_listType
the item type
Definition: MindWrtParser.cxx:374
Internal: the subdocument of a MindWrtParser.
Definition: MindWrtParser.cxx:526
bool isNumeric() const
returns true if the list is decimal, alpha or roman
Definition: MWAWList.hxx:81
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWParser.hxx:185
SubDocumentType
Definition: libmwaw_internal.hxx:188
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
@ 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 setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
@ UPPER_ROMAN
Definition: MWAWList.hxx:47
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
int m_step
the current step: 0 mean send header, 1 mean send header fields
Definition: MindWrtParser.cxx:556
T y() const
second element
Definition: libmwaw_internal.hxx:673
MWAWRSRCParserPtr & getRSRCParser()
returns the rsrc parser
Definition: MWAWParser.hxx:190
bool readText(MindWrtParserInternal::LineInfo const &line)
try to read a non compressed text zone
Definition: MindWrtParser.cxx:1169
@ Database
Definition: libmwaw_internal.hxx:401
bool readRuler(MindWrtParserInternal::LineInfo &line)
try to read a ruler
Definition: MindWrtParser.cxx:984
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
LineInfo()
Definition: MindWrtParser.cxx:257
Internal: the state of a MindWrtParser.
Definition: MindWrtParser.cxx:488
T x() const
first element
Definition: libmwaw_internal.hxx:668
friend std::ostream & operator<<(std::ostream &o, Field const &field)
operator<<
Definition: MindWrtParser.cxx:86
int m_startListIndex
the first list index
Definition: MindWrtParser.cxx:147
int m_headingStyle
the heading labels style
Definition: MindWrtParser.cxx:149
std::string m_compressCorr
the correspondance between int compressed and char : must be 15 character
Definition: MindWrtParser.cxx:503
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
void updateHeadingList()
updates the heading list
Definition: MindWrtParser.cxx:194
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
std::vector< MWAWListLevel > m_headingListLevels
the heading list
Definition: MindWrtParser.cxx:153
bool createZones()
finds the different objects zones
Definition: MindWrtParser.cxx:740
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MindWrtParser.cxx:696
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
Wrapping m_wrapping
Wrapping.
Definition: MWAWPosition.hxx:278
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
@ PageBreak
Definition: MWAWListener.hxx:58
Field(MWAWField::Type type=MWAWField::None)
constructor
Definition: MindWrtParser.cxx:65
ZoneInfo m_zones[3]
the zones
Definition: MindWrtParser.cxx:508
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
@ None
Definition: libmwaw_internal.hxx:401
std::multimap< std::string, MWAWEntry > m_entryMap
the zones map
Definition: MindWrtParser.cxx:511
bool readLastZone(MWAWEntry &entry)
read the last zone ( pos + 7fffffff )
Definition: MindWrtParser.cxx:1584
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:76
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
MWAWParagraph m_paragraph
the paragraph
Definition: MindWrtParser.cxx:366
std::vector< LineInfo > m_linesList
the list of line information
Definition: MindWrtParser.cxx:393
bool readCompressedText(MindWrtParserInternal::LineInfo const &line)
try to read a compressed text zone
Definition: MindWrtParser.cxx:1237
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
@ BookmarkStart
Definition: libmwaw_internal.hxx:401
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
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: MindWrtParser.cxx:1398
@ LOWER_ROMAN
Definition: MWAWList.hxx:47
double m_position
the tab position
Definition: MWAWParagraph.hxx:74
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: MindWrtParser.cxx:643
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
bool readHeadingCustom(MWAWEntry &entry)
read the heading custom zone
Definition: MindWrtParser.cxx:1674
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
MWAWField getField() const
Definition: MindWrtParser.cxx:76
a field
Definition: libmwaw_internal.hxx:399
@ PageNumber
Definition: libmwaw_internal.hxx:401
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
@ JustificationLeft
Definition: MWAWParagraph.hxx:90
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
@ Char
Definition: MWAWPosition.hxx:51
~SubDocument() final
destructor
Definition: MindWrtParser.cxx:536
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: MindWrtParser.cxx:559
bool readLinesInfo(MWAWEntry &entry)
read the lines information zone
Definition: MindWrtParser.cxx:1505
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
int m_actPage
the actual page
Definition: MindWrtParser.cxx:515
MWAWVec2i m_pos
the field position: x position in point, y position in line (-1: means no field )
Definition: MindWrtParser.cxx:123
int m_type
the entry type
Definition: MindWrtParser.cxx:358
@ DECIMAL
Definition: MWAWList.hxx:46
@ italicBit
Definition: MWAWFont.hxx:190
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:150
bool readZone8(MWAWEntry &entry)
read the 8th zone ( unknown zone)
Definition: MindWrtParser.cxx:1878
the main class to read a MindWrite file
Definition: MindWrtParser.hxx:61
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
Defines MWAWTextListener: the libmwaw word processor listener.
@ BULLET
Definition: MWAWList.hxx:46
ListProperties()
constructor
Definition: MindWrtParser.cxx:132
bool m_headingFullSubLevels
true if heading labels show all sub level
Definition: MindWrtParser.cxx:151
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
@ JustificationFull
Definition: MWAWParagraph.hxx:90
double m_labelWidth
the minimum label width
Definition: MWAWList.hxx:105
@ JustificationRight
Definition: MWAWParagraph.hxx:91
Internal: the list properties of a MindWrtParser.
Definition: MindWrtParser.cxx:130
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
Type m_type
the type of the level
Definition: MWAWList.hxx:101
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
Internal: a zone information of a MindWrtParser.
Definition: MindWrtParser.cxx:383
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
int m_numBeforeLabels
the number of label to show before this
Definition: MWAWList.hxx:103
bool m_useHeadingStyle
true if we need to use heading style
Definition: MindWrtParser.cxx:159
double m_labelAfterSpace
the minimum distance between the label and the text
Definition: MWAWList.hxx:106
void init()
inits all internal variables
Definition: MindWrtParser.cxx:601
a manager which manages the lists, keeps the different kind of lists, to assure the unicity of each l...
Definition: MWAWList.hxx:216
@ Paragraph
Definition: MWAWPosition.hxx:51
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
int m_page
the page number
Definition: MindWrtParser.cxx:364
friend std::ostream & operator<<(std::ostream &o, LineInfo const &line)
operator<<
Definition: MindWrtParser.cxx:274
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:270
Definition: MWAWDocument.hxx:57
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
~MindWrtParser() final
destructor
Definition: MindWrtParser.cxx:597
Class to store font.
Definition: MWAWFont.hxx:44
bool readHeadingProperties(MWAWEntry &entry)
read the heading property zone
Definition: MindWrtParser.cxx:1801
MWAWListLevel getLevel(int level) const
returns a list level
Definition: MindWrtParser.cxx:162
librevenge::RVNGString m_prefix
string which preceedes the number if we have an ordered level
Definition: MWAWList.hxx:112
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:190
@ Title
Definition: libmwaw_internal.hxx:401
bool sendZone(int i)
try to send a zone
Definition: MindWrtParser.cxx:855
State()
constructor
Definition: MindWrtParser.cxx:490
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
ListProperties m_listProperties
the list properties
Definition: MindWrtParser.cxx:514
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
Internal: the structures of a MindWrtParser.
Definition: MindWrtParser.cxx:60
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
Internal: a line information of a MindWrtParser.
Definition: MindWrtParser.cxx:256
SubDocument(MindWrtParser &pars, MWAWInputStreamPtr const &input, int zoneId, int step)
Definition: MindWrtParser.cxx:528
int m_id
the subdocument id
Definition: MindWrtParser.cxx:554
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