Go to the documentation of this file.
37 #ifndef MARINER_WRT_PARSER
38 # define MARINER_WRT_PARSER
44 #include <librevenge/librevenge.h>
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;
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
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:296
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
shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:519
bool m_firstPageFooter
a flag to know if we have a first page footer
Definition: MarinerWrtParser.cxx:175
friend class MarinerWrtGraph
Definition: MarinerWrtParser.hxx:128
Internal: the struct used to store the zone of a MarinerWrtParser.
Definition: MarinerWrtParser.cxx:69
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:262
bool readNumbersString(int num, std::vector< long > &res)
try to read a number or a list of number entries
Definition: MarinerWrtParser.cxx:1367
shared_ptr< MarinerWrtGraph > m_graphParser
the graph parser
Definition: MarinerWrtParser.hxx:219
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type)
the parser function
Definition: MarinerWrtParser.cxx:217
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
int m_numPages
the number of page of the final document
Definition: MarinerWrtParser.cxx:173
@ Z_Footer
Definition: MarinerWrtParser.cxx:71
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
std::vector< Zone > m_zonesList
the list of zone
Definition: MarinerWrtParser.cxx:170
void init()
inits all internal variables
Definition: MarinerWrtParser.cxx:247
std::string name() const
returns the entry name;
Definition: MarinerWrtParser.cxx:1526
long value(int i) const
returns the ith value (or 0 if it does not exists )
Definition: MarinerWrtParser.cxx:1579
MWAWSection m_section
the section
Definition: MarinerWrtParser.cxx:98
void sendToken(int zoneId, long tokenId)
ask the graph parser to send a token
Definition: MarinerWrtParser.cxx:322
@ Z_Unknown
Definition: MarinerWrtParser.cxx:71
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
MWAWBorder m_columnSeparator
the vertical separator between columns
Definition: MWAWSection.hxx:104
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: MarinerWrtParser.cxx:1492
void parse(librevenge::RVNGTextInterface *documentInterface)
virtual function used to parse the input
Definition: MarinerWrtParser.cxx:333
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:202
int m_headerHeight
the header height if known
Definition: MarinerWrtParser.cxx:178
bool readSeparator(MarinerWrtEntry const &entry)
try to read the separator of differents part
Definition: MarinerWrtParser.cxx:601
MarinerWrtEntry()
constructor
Definition: MarinerWrtParser.hxx:64
the class to store a color
Definition: libmwaw_internal.hxx:182
int m_fileType
the entry type
Definition: MarinerWrtParser.hxx:84
@ MWAW_T_MARINERWRITE
Mariner Write (only v1.6-v3.5 Mac Classic)
Definition: MWAWDocument.hxx:127
MWAWBox2< long > MWAWBox2l
MWAWBox2 of long.
Definition: libmwaw_internal.hxx:1136
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:187
virtual ~MarinerWrtEntry()
destructor
Definition: MarinerWrtParser.cxx:1522
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
int m_footerHeight
the footer height if known
Definition: MarinerWrtParser.cxx:179
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
friend std::ostream & operator<<(std::ostream &o, MarinerWrtEntry const &ent)
operator<<
Definition: MarinerWrtParser.hxx:72
MarinerWrtParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: MarinerWrtParser.cxx:237
MWAWSection getSection(int zoneId) const
returns the section information corresponding to a zone
Definition: MarinerWrtParser.cxx:270
bool readDocInfo(MarinerWrtEntry const &entry, int zoneId)
try to read the doc info zone
Definition: MarinerWrtParser.cxx:921
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
Internal: the structures of a MarinerWrtParser.
Definition: MarinerWrtParser.cxx:66
State()
constructor
Definition: MarinerWrtParser.cxx:164
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
MWAWBox2l m_dim
the zone total position
Definition: MarinerWrtParser.cxx:92
Type m_type
the zone type
Definition: MarinerWrtParser.cxx:84
bool readZonec(MarinerWrtEntry const &entry, int zoneId)
try to read a unknown zone of 9 int
Definition: MarinerWrtParser.cxx:1112
float getPatternPercent(int id) const
return the pattern percent which corresponds to an id (or -1)
Definition: MarinerWrtParser.cxx:317
friend class MarinerWrtText
Definition: MarinerWrtParser.hxx:129
virtual bool operator==(MWAWSubDocument const &doc) const
operator!==
Definition: MarinerWrtParser.cxx:204
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MWAWBox2i m_pageDim
the page dimension (?)
Definition: MarinerWrtParser.cxx:94
SubDocument(MarinerWrtParser &pars, MWAWInputStreamPtr input, int zoneId)
Definition: MarinerWrtParser.cxx:187
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:172
int getPageSpan() const
Definition: MWAWPageSpan.hxx:164
bool m_endNote
a flag to know if this an endnote
Definition: MarinerWrtParser.cxx:86
bool createZones()
finds the different objects zones
Definition: MarinerWrtParser.cxx:456
uint32_t m_fileId
the file zone id
Definition: MarinerWrtParser.cxx:82
std::ostream & operator<<(std::ostream &o, Zone const &zone)
Definition: MarinerWrtParser.cxx:105
SubDocumentType
Definition: libmwaw_internal.hxx:178
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
bool decodeZone(std::vector< MarinerWrtStruct > &dataList, long numData=999999)
try to decode a zone
Definition: MarinerWrtParser.cxx:1425
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:146
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:105
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
@ Z_Header
Definition: MarinerWrtParser.cxx:71
long m_height
height of the zone
Definition: MarinerWrtParser.cxx:88
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:177
T x() const
first element
Definition: libmwaw_internal.hxx:615
MWAWColor m_backgroundColor
the background color
Definition: MarinerWrtParser.cxx:100
friend std::ostream & operator<<(std::ostream &o, MarinerWrtStruct const &dt)
operator<<
Definition: MarinerWrtParser.cxx:1589
the main class to read the graphic part of a Mariner Write file
Definition: MarinerWrtGraph.hxx:69
int m_actPage
the actual page
Definition: MarinerWrtParser.cxx:173
@ Z_Footnote
Definition: MarinerWrtParser.cxx:71
a border
Definition: libmwaw_internal.hxx:314
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:265
std::vector< Column > m_columns
the different column
Definition: MWAWSection.hxx:100
void newPage(int number)
adds a new page
Definition: MarinerWrtParser.cxx:280
MWAWBox2i m_pageTextDim
the zone of text dimension ( ie page less margins)
Definition: MarinerWrtParser.cxx:96
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
double m_width
the columns width
Definition: MWAWSection.hxx:141
struct to store the columns properties
Definition: MWAWSection.hxx:112
@ PageBreak
Definition: MWAWListener.hxx:58
MWAWVec2f getPageLeftTop() const
returns the page left top point ( in inches)
Definition: MarinerWrtParser.cxx:264
MWAWVec2l m_RBpos
right/bottom position
Definition: MarinerWrtParser.cxx:90
a class which stores section properties
Definition: MWAWSection.hxx:46
Definition: libmwaw_internal.hxx:142
bool readZoneb(MarinerWrtEntry const &entry, int zoneId)
try to read a unknown zone : one by separator?, borderdim?
Definition: MarinerWrtParser.cxx:1071
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
int m_id
the zone id
Definition: MarinerWrtParser.cxx:80
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
MWAWEntry m_pos
the file data position (for type=0 data )
Definition: MarinerWrtParser.hxx:114
the main class to read a Mariner Write file
Definition: MarinerWrtParser.hxx:127
Type
a enum to define the diffent zone type
Definition: MarinerWrtParser.cxx:71
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
int m_type
the data type
Definition: MarinerWrtParser.hxx:116
Zone()
constructor
Definition: MarinerWrtParser.cxx:73
shared_ptr< MarinerWrtText > m_textParser
the text parser
Definition: MarinerWrtParser.hxx:222
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:197
long m_filePos
the file position where the field description begin
Definition: MarinerWrtParser.hxx:112
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:218
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MarinerWrtParser.cxx:368
bool m_hasOddEvenHeaderFooter
a flag to know if we have odd/even header footer
Definition: MarinerWrtParser.cxx:177
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
std::string m_extra
extra data
Definition: MarinerWrtParser.cxx:102
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
std::string m_extra
an extra string
Definition: MWAWEntry.hxx:191
a entry to store a zone structure
Definition: MarinerWrtParser.hxx:62
long end() const
returns the end offset
Definition: MWAWEntry.hxx:77
int numValues() const
returns the number of values
Definition: MarinerWrtParser.hxx:100
friend std::ostream & operator<<(std::ostream &o, Zone const &zone)
operator<<
Definition: MarinerWrtParser.cxx:105
void sendText(int zoneId)
ask the text parser to send a zone
Definition: MarinerWrtParser.cxx:309
bool isBasic() const
returns true if this corresponds to a simple container
Definition: MarinerWrtParser.hxx:105
shared_ptr< MarinerWrtParserInternal::State > m_state
the state
Definition: MarinerWrtParser.hxx:213
Internal: the subdocument of a MarinerWrtParser.
Definition: MarinerWrtParser.cxx:185
the main class to read the text part of Mariner Write file
Definition: MarinerWrtText.hxx:61
@ Z_Main
Definition: MarinerWrtParser.cxx:71
Internal: a struct used to read some field.
Definition: MarinerWrtParser.hxx:92
librevenge::RVNGUnit m_widthUnit
the width unit (default inches)
Definition: MWAWSection.hxx:143
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
void checkMargins()
check if the page margins are consistent with the page dimension, if not update them
Definition: MWAWPageSpan.cxx:266
bool readZone(int &actZone, bool onlyTest=false)
try to read a zone
Definition: MarinerWrtParser.cxx:468
bool readPrintInfo(MarinerWrtEntry const &entry)
try to read a printinfo zone
Definition: MarinerWrtParser.cxx:1283
@ Right
Definition: libmwaw_internal.hxx:166
MWAWVec2< long > MWAWVec2l
MWAWVec2 of long.
Definition: libmwaw_internal.hxx:783
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
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
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
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
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:223
@ Left
Definition: libmwaw_internal.hxx:166
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1008
std::map< uint32_t, int > m_fileToZoneMap
a map fileZoneId -> localZoneId
Definition: MarinerWrtParser.cxx:172
MarinerWrtStruct()
constructor
Definition: MarinerWrtParser.hxx:94
std::vector< long > m_data
the data block
Definition: MarinerWrtParser.hxx:118
bool readZoneHeader(MarinerWrtEntry const &entry, int zoneId, bool onlyTest)
try to read the zone header
Definition: MarinerWrtParser.cxx:630
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:270
int m_N
the number of value
Definition: MarinerWrtParser.hxx:86
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:207
virtual bool operator!=(MWAWSubDocument const &doc) const
operator!=
Definition: MarinerWrtParser.cxx:194
Internal: the state of a MarinerWrtParser.
Definition: MarinerWrtParser.cxx:162
std::ostream & operator<<(std::ostream &o, MarinerWrtStruct const &dt)
Definition: MarinerWrtParser.cxx:1589
bool readEntryHeader(MarinerWrtEntry &entry)
try to read an entry header
Definition: MarinerWrtParser.cxx:1342
virtual ~SubDocument()
destructor
Definition: MarinerWrtParser.cxx:191
bool m_pageMarginsSpanSet
a flag to know if page margins span are set
Definition: MarinerWrtParser.hxx:216
int m_id
the subdocument id
Definition: MarinerWrtParser.cxx:214
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
shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:505
shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:96
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:151
double m_margins[4]
the margins in inches using libmwaw::Position orders
Definition: MWAWSection.hxx:145
Generated on Wed Jun 17 2020 06:30:11 for libmwaw by
doxygen 1.8.18