35 #ifndef MAC_WRT_PRO_PARSER
36 # define MAC_WRT_PRO_PARSER
83 void parse(librevenge::RVNGTextInterface *documentInterface);
90 void createDocument(librevenge::RVNGTextInterface *documentInterface);
96 bool getZoneData(librevenge::RVNGBinaryData &data,
int blockId);
108 bool parseTextZone(shared_ptr<MacWrtProParserInternal::Zone> zone);
112 std::vector<MWAWEntry> &res,
int textLength);
114 bool readTextIds(shared_ptr<MacWrtProParserInternal::Zone> zone,
115 std::vector<MacWrtProParserInternal::TextZoneData> &res,
116 int textLength,
int type);
118 bool readTextTokens(shared_ptr<MacWrtProParserInternal::Zone> zone,
119 std::vector<MacWrtProParserInternal::Token> &res,
132 void newPage(
int number,
bool softBreak=
false);
171 bool sendText(shared_ptr<MacWrtProParserInternal::TextZone> zone,
bool mainZone =
false);
184 shared_ptr<MacWrtProParserInternal::State>
m_state;
bool readTextTokens(shared_ptr< MacWrtProParserInternal::Zone > zone, std::vector< MacWrtProParserInternal::Token > &res, int textLength)
try to read the text token entries
Definition: MacWrtProParser.cxx:1200
the main class to read the structures part of MacWrite Pro file
Definition: MacWrtProStructures.hxx:152
bool sendTextBoxZone(int blockId, MWAWPosition const &pos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
send a textbox zone
Definition: MacWrtProParser.cxx:1398
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: MacWrtProParser.cxx:658
virtual ~MacWrtProParser()
destructor
Definition: MacWrtProParser.cxx:317
bool parseDataZone(int blockId, int type)
parse a data zone
Definition: MacWrtProParser.cxx:968
bool sendText(shared_ptr< MacWrtProParserInternal::TextZone > zone, bool mainZone=false)
try to send a text
Definition: MacWrtProParser.cxx:1435
MacWrtProParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: MacWrtProParser.cxx:311
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:47
bool readDocHeader()
try to read the doc header zone
Definition: MacWrtProParser.cxx:792
shared_ptr< MacWrtProParserInternal::State > m_state
the state
Definition: MacWrtProParser.hxx:184
bool sendEmptyFrameZone(MWAWPosition const &pos, MWAWGraphicStyle const &style)
try to send an empty zone (can exist in MacWrtPro1.5)
Definition: MacWrtProParser.cxx:1338
Internal: the subdocument of a MacWrtProParser.
Definition: MacWrtProParser.cxx:242
float pageHeight() const
returns the page height, ie. paper size less margin (in inches)
bool sendTextZone(int blockId, bool mainZone=false)
send a text box
Definition: MacWrtProParser.cxx:1386
void init()
inits all internal variables
Definition: MacWrtProParser.cxx:321
bool createZones()
finds the different objects zones
Definition: MacWrtProParser.cxx:627
bool readTextIds(shared_ptr< MacWrtProParserInternal::Zone > zone, std::vector< MacWrtProParserInternal::TextZoneData > &res, int textLength, int type)
try to read the text id entries
Definition: MacWrtProParser.cxx:1136
shared_ptr< MacWrtProStructures > m_structures
the structures parser
Definition: MacWrtProParser.hxx:187
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:449
int findNumHardBreaks(int blockId)
compute the number of hard page break
Definition: MacWrtProParser.cxx:1350
bool parseTextZone(shared_ptr< MacWrtProParserInternal::Zone > zone)
parse a text zone
Definition: MacWrtProParser.cxx:1011
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:284
void parse(librevenge::RVNGTextInterface *documentInterface)
virtual function used to parse the input
Definition: MacWrtProParser.cxx:373
bool sendPictureZone(int blockId, MWAWPosition const &pictPos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
try to send a picture
Definition: MacWrtProParser.cxx:1629
bool readTextEntries(shared_ptr< MacWrtProParserInternal::Zone > zone, std::vector< MWAWEntry > &res, int textLength)
try to read the text block entries
Definition: MacWrtProParser.cxx:1061
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:439
an interface to transmit the info of MacWrtProStructures to a listener
Definition: MacWrtProStructures.hxx:70
int numColumns() const
returns the document number of columns ( filed in MWII)
Definition: MacWrtProParser.cxx:336
std::vector< int > const & getBlocksCalledByToken() const
return the list of blockid called by token.
Definition: MacWrtProParser.cxx:364
the main class to read a MacWrite II and MacWrite Pro file
Definition: MacWrtProParser.hxx:67
void newPage(int number, bool softBreak=false)
adds a new page
Definition: MacWrtProParser.cxx:345
bool sendPicture(shared_ptr< MacWrtProParserInternal::Zone > zone, MWAWPosition pictPos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
try to send a picture
Definition: MacWrtProParser.cxx:1642
Class to define the position of an object (textbox, picture, ..) in the document. ...
Definition: MWAWPosition.hxx:47
bool getZoneData(librevenge::RVNGBinaryData &data, int blockId)
retrieve the data which corresponds to a zone
Definition: MacWrtProParser.cxx:423
Internal: the structures of a MacWrtProParser.
Definition: MacWrtProParser.cxx:59
void checkUnparsed()
a debug function which can be used to save the unparsed block
Definition: MacWrtProParser.cxx:1789
bool getFreeZoneList(int blockId, std::vector< int > &blockLists)
return the chain list of block ( used to get free blocks)
Definition: MacWrtProParser.cxx:503
bool readPrintInfo()
read the print info zone
Definition: MacWrtProParser.cxx:739
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MacWrtProParser.cxx:557
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:204