36 # define MW_PRO_PARSER
50 namespace MWProParserInternal
84 void parse(WPXDocumentInterface *documentInterface);
109 bool parseTextZone(shared_ptr<MWProParserInternal::Zone> zone);
113 std::vector<MWAWEntry> &res,
int textLength);
115 bool readTextIds(shared_ptr<MWProParserInternal::Zone> zone,
116 std::vector<MWProParserInternal::TextZoneData> &res,
117 int textLength,
int type);
120 std::vector<MWProParserInternal::Token> &res,
133 void newPage(
int number,
bool softBreak=
false);
147 WPXPropertyList extras = WPXPropertyList());
151 WPXPropertyList extras = WPXPropertyList());
172 bool sendPicture(shared_ptr<MWProParserInternal::Zone> zone,
MWAWPosition pictPos, WPXPropertyList
const &extras);
175 bool sendText(shared_ptr<MWProParserInternal::TextZone> zone,
bool mainZone =
false);
188 shared_ptr<MWProParserInternal::State>
m_state;
an interface to transmit the info of MWProStructures to a listener
Definition: MWProStructures.hxx:72
Internal: the subdocument of a MWProParser.
Definition: MWProParser.cxx:233
the main class to read the structures part of MacWrite Pro file
Definition: MWProStructures.hxx:153
MWProParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: MWProParser.cxx:296
bool sendTextZone(int blockId, bool mainZone=false)
send a text box
Definition: MWProParser.cxx:1372
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: MWProParser.cxx:645
shared_ptr< MWProStructures > m_structures
the structures parser
Definition: MWProParser.hxx:191
bool sendText(shared_ptr< MWProParserInternal::TextZone > zone, bool mainZone=false)
try to send a text
Definition: MWProParser.cxx:1421
std::vector< int > const & getBlocksCalledByToken() const
return the list of blockid called by token.
Definition: MWProParser.cxx:349
bool parseTextZone(shared_ptr< MWProParserInternal::Zone > zone)
parse a text zone
Definition: MWProParser.cxx:996
bool readTextIds(shared_ptr< MWProParserInternal::Zone > zone, std::vector< MWProParserInternal::TextZoneData > &res, int textLength, int type)
try to read the text id entries
Definition: MWProParser.cxx:1121
void newPage(int number, bool softBreak=false)
adds a new page
Definition: MWProParser.cxx:330
bool sendEmptyFrameZone(MWAWPosition const &pos, WPXPropertyList extras)
try to send an empty zone (can exist in MWPro1.5)
Definition: MWProParser.cxx:1323
bool getZoneData(WPXBinaryData &data, int blockId)
retrieve the data which corresponds to a zone
Definition: MWProParser.cxx:409
the main class to read a MacWrite II and MacWrite Pro file
Definition: MWProParser.hxx:68
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:354
int numColumns() const
returns the document number of columns ( filed in MWII)
Definition: MWProParser.cxx:321
bool createZones()
finds the different objects zones
Definition: MWProParser.cxx:614
void checkUnparsed()
a debug function which can be used to save the unparsed block
Definition: MWProParser.cxx:1772
bool sendPictureZone(int blockId, MWAWPosition const &pictPos, WPXPropertyList extras=WPXPropertyList())
try to send a picture
Definition: MWProParser.cxx:1611
bool readDocHeader()
try to read the doc header zone
Definition: MWProParser.cxx:780
bool getFreeZoneList(int blockId, std::vector< int > &blockLists)
return the chain list of block ( used to get free blocks)
Definition: MWProParser.cxx:489
int findNumHardBreaks(int blockId)
compute the number of hard page break
Definition: MWProParser.cxx:1336
shared_ptr< MWProParserInternal::State > m_state
the state
Definition: MWProParser.hxx:188
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:348
bool parseDataZone(int blockId, int type)
parse a data zone
Definition: MWProParser.cxx:953
void parse(WPXDocumentInterface *documentInterface)
virtual function used to parse the input
Definition: MWProParser.cxx:358
void init()
inits all internal variables
Definition: MWProParser.cxx:306
bool readTextEntries(shared_ptr< MWProParserInternal::Zone > zone, std::vector< MWAWEntry > &res, int textLength)
try to read the text block entries
Definition: MWProParser.cxx:1046
bool sendPicture(shared_ptr< MWProParserInternal::Zone > zone, MWAWPosition pictPos, WPXPropertyList const &extras)
try to send a picture
Definition: MWProParser.cxx:1624
virtual class which defines the ancestor of all main zone parser
Definition: MWAWParser.hxx:89
Class to define the position of an object (textbox, picture, ..) in the document. ...
Definition: MWAWPosition.hxx:47
bool sendTextBoxZone(int blockId, MWAWPosition const &pos, WPXPropertyList extras=WPXPropertyList())
send a textbox zone
Definition: MWProParser.cxx:1384
bool readPrintInfo()
read the print info zone
Definition: MWProParser.cxx:727
virtual ~MWProParser()
destructor
Definition: MWProParser.cxx:302
void createDocument(WPXDocumentInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MWProParser.cxx:544
float pageHeight() const
returns the page height, ie. paper size less margin (in inches)
bool readTextTokens(shared_ptr< MWProParserInternal::Zone > zone, std::vector< MWProParserInternal::Token > &res, int textLength)
try to read the text token entries
Definition: MWProParser.cxx:1185