37 #ifndef MARINER_WRT_PARSER
38 # define MARINER_WRT_PARSER
44 #include <librevenge/librevenge.h>
52 namespace MarinerWrtParserInternal
70 std::string
name()
const;
76 if (ent.
m_N) o <<
"N=" << ent.
m_N <<
",";
102 return int(
m_data.size());
110 long value(
int i)
const;
142 void parse(librevenge::RVNGTextInterface *documentInterface);
149 void createDocument(librevenge::RVNGTextInterface *documentInterface);
154 bool readZone(
int &actZone,
bool onlyTest=
false);
167 int getZoneId(uint32_t fileId,
bool &endNote);
175 void sendToken(
int zoneId,
long tokenId);
184 bool decodeZone(std::vector<MarinerWrtStruct> &dataList,
long numData=999999);
213 shared_ptr<MarinerWrtParserInternal::State>
m_state;
float getPatternPercent(int id) const
return the pattern percent which corresponds to an id (or -1)
Definition: MarinerWrtParser.cxx:317
bool readZone(int &actZone, bool onlyTest=false)
try to read a zone
Definition: MarinerWrtParser.cxx:468
shared_ptr< MarinerWrtText > m_textParser
the text parser
Definition: MarinerWrtParser.hxx:222
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MarinerWrtParser.cxx:368
bool readZone13(MarinerWrtEntry const &entry, int zoneId)
try to read a unknown zone of 23 int
Definition: MarinerWrtParser.cxx:1162
virtual ~MarinerWrtParser()
destructor
Definition: MarinerWrtParser.cxx:243
the main class to read a Mariner Write file
Definition: MarinerWrtParser.hxx:126
shared_ptr< MarinerWrtParserInternal::State > m_state
the state
Definition: MarinerWrtParser.hxx:213
bool readZoneb(MarinerWrtEntry const &entry, int zoneId)
try to read a unknown zone : one by separator?, borderdim?
Definition: MarinerWrtParser.cxx:1071
bool readZoneHeader(MarinerWrtEntry const &entry, int zoneId, bool onlyTest)
try to read the zone header
Definition: MarinerWrtParser.cxx:630
void sendText(int zoneId)
ask the text parser to send a zone
Definition: MarinerWrtParser.cxx:309
the main class to read the text part of Mariner Write file
Definition: MarinerWrtText.hxx:60
int getZoneId(uint32_t fileId, bool &endNote)
return a zoneid corresponding to a fileId (or -1) and set the endnote flag
Definition: MarinerWrtParser.cxx:296
bool readPrintInfo(MarinerWrtEntry const &entry)
try to read a printinfo zone
Definition: MarinerWrtParser.cxx:1283
a entry to store a zone structure
Definition: MarinerWrtParser.hxx:62
bool m_pageMarginsSpanSet
a flag to know if page margins span are set
Definition: MarinerWrtParser.hxx:216
the main class to read the graphic part of a Mariner Write file
Definition: MarinerWrtGraph.hxx:68
MWAWSection getSection(int zoneId) const
returns the section information corresponding to a zone
Definition: MarinerWrtParser.cxx:270
virtual ~MarinerWrtEntry()
destructor
Definition: MarinerWrtParser.cxx:1522
Internal: a struct used to read some field.
Definition: MarinerWrtParser.hxx:92
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:513
int m_fileType
the entry type
Definition: MarinerWrtParser.hxx:84
bool readEntryHeader(MarinerWrtEntry &entry)
try to read an entry header
Definition: MarinerWrtParser.cxx:1342
bool isBasic() const
returns true if this corresponds to a simple container
Definition: MarinerWrtParser.hxx:105
void init()
inits all internal variables
Definition: MarinerWrtParser.cxx:247
std::string name() const
returns the entry name;
Definition: MarinerWrtParser.cxx:1526
void sendToken(int zoneId, long tokenId)
ask the graph parser to send a token
Definition: MarinerWrtParser.cxx:322
int m_type
the data type
Definition: MarinerWrtParser.hxx:116
MWAWVec2f getPageLeftTop() const
returns the page left top point ( in inches)
Definition: MarinerWrtParser.cxx:264
shared_ptr< MarinerWrtGraph > m_graphParser
the graph parser
Definition: MarinerWrtParser.hxx:219
std::string m_extra
an extra string
Definition: MWAWEntry.hxx:191
bool readZoneDim(MarinerWrtEntry const &entry, int zoneId)
try to read the zone dimension ( normal and with margin )
Definition: MarinerWrtParser.cxx:837
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:295
friend std::ostream & operator<<(std::ostream &o, MarinerWrtStruct const &dt)
operator<<
Definition: MarinerWrtParser.cxx:1589
int m_N
the number of value
Definition: MarinerWrtParser.hxx:86
void parse(librevenge::RVNGTextInterface *documentInterface)
virtual function used to parse the input
Definition: MarinerWrtParser.cxx:333
bool readNumbersString(int num, std::vector< long > &res)
try to read a number or a list of number entries
Definition: MarinerWrtParser.cxx:1367
bool readSeparator(MarinerWrtEntry const &entry)
try to read the separator of differents part
Definition: MarinerWrtParser.cxx:601
MWAWEntry m_pos
the file data position (for type=0 data )
Definition: MarinerWrtParser.hxx:114
long m_filePos
the file position where the field description begin
Definition: MarinerWrtParser.hxx:112
MarinerWrtParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: MarinerWrtParser.cxx:237
a class which stores section properties
Definition: MWAWSection.hxx:45
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
bool readCPRT(MarinerWrtEntry const &entry)
try to read a xml printinfo zone
Definition: MarinerWrtParser.cxx:1257
int m_value
a unknown value
Definition: MarinerWrtParser.hxx:88
bool readZonec(MarinerWrtEntry const &entry, int zoneId)
try to read a unknown zone of 9 int
Definition: MarinerWrtParser.cxx:1112
MarinerWrtStruct()
constructor
Definition: MarinerWrtParser.hxx:94
std::vector< long > m_data
the data block
Definition: MarinerWrtParser.hxx:118
friend std::ostream & operator<<(std::ostream &o, MarinerWrtEntry const &ent)
operator<<
Definition: MarinerWrtParser.hxx:72
int numValues() const
returns the number of values
Definition: MarinerWrtParser.hxx:100
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: MarinerWrtParser.cxx:1492
bool readDocInfo(MarinerWrtEntry const &entry, int zoneId)
try to read the doc info zone
Definition: MarinerWrtParser.cxx:921
MarinerWrtEntry()
constructor
Definition: MarinerWrtParser.hxx:64
long value(int i) const
returns the ith value (or 0 if it does not exists )
Definition: MarinerWrtParser.cxx:1579
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
bool createZones()
finds the different objects zones
Definition: MarinerWrtParser.cxx:456
bool decodeZone(std::vector< MarinerWrtStruct > &dataList, long numData=999999)
try to decode a zone
Definition: MarinerWrtParser.cxx:1425
Internal: the subdocument of a MarinerWrtParser.
Definition: MarinerWrtParser.cxx:184
void newPage(int number)
adds a new page
Definition: MarinerWrtParser.cxx:280