Go to the documentation of this file.
34 #ifndef NISUS_WRT_PARSER
35 # define NISUS_WRT_PARSER
40 #include <librevenge/librevenge.h>
74 void parse(librevenge::RVNGTextInterface *documentInterface);
81 void createDocument(librevenge::RVNGTextInterface *documentInterface);
101 std::string &content,
102 std::vector<int> &number)
const;
154 shared_ptr<NisusWrtParserInternal::State>
m_state;
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:296
bool readINFO(MWAWEntry const &entry)
read the INFO info zone, an unknown zone of size 0x23a: to doo
Definition: NisusWrtParser.cxx:2053
int m_majorVersion
the major number
Definition: MWAWRSRCParser.hxx:140
a public structure used to return the version
Definition: MWAWRSRCParser.hxx:133
shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:519
std::vector< Reference > m_referenceList
the list of reference
Definition: NisusWrtParser.cxx:278
void setName(std::string const &nam)
sets the name of the entry
Definition: MWAWEntry.hxx:137
@ NONE
Definition: libmwaw_internal.hxx:170
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:262
bool read(NisusWrtParser &parser, MWAWEntry const &entry)
read the data
Definition: NisusWrtStruct.cxx:77
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
std::string getDateFormat(NisusWrtStruct::ZoneType zoneId, int vId) const
returns the date format corresponding to a variable id or ""
Definition: NisusWrtParser.cxx:387
Zone m_zones[3]
the main zones : Main, Footnote, HeaderFooter
Definition: NisusWrtParser.cxx:300
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
std::string numberingValueToString(NumberingType type, int value)
Definition: libmwaw_internal.cxx:129
std::string m_suffix
the suffix
Definition: NisusWrtParser.cxx:123
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
@ V_Numbering
Definition: NisusWrtStruct.hxx:53
NumberingType
Definition: libmwaw_internal.hxx:170
float m_columnSep
the columns separator
Definition: NisusWrtParser.cxx:306
std::vector< Variable > m_versionList
the list of versions
Definition: NisusWrtParser.cxx:284
Internal: low level a structure helping to read recursifList.
Definition: NisusWrtStruct.hxx:138
int m_numColumns
the number of columns
Definition: NisusWrtParser.cxx:305
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: NisusWrtParser.cxx:780
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
bool createZones()
finds the different objects zones
Definition: NisusWrtParser.cxx:596
int m_type
the variable type
Definition: NisusWrtStruct.hxx:196
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
@ V_Version
Definition: NisusWrtStruct.hxx:53
MWAWInputStreamPtr rsrcInput()
return the input input
Definition: NisusWrtParser.cxx:342
void newPage(int number)
adds a new page
Definition: NisusWrtParser.cxx:492
int id() const
returns the id
Definition: MWAWEntry.hxx:153
@ UPPERCASE
Definition: libmwaw_internal.hxx:170
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:202
std::string numberingTypeToString(NumberingType type)
Definition: libmwaw_internal.cxx:105
ZoneType
the different zone
Definition: NisusWrtStruct.hxx:50
Type
Defines some basic type for field.
Definition: libmwaw_internal.hxx:371
std::vector< Node > m_childList
the list of data entry
Definition: NisusWrtStruct.hxx:169
int version() const
returns the works version
Definition: MWAWParser.hxx:108
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:126
@ LOWERCASE_ROMAN
Definition: libmwaw_internal.hxx:170
void setFormOrientation(const FormOrientation formOrientation)
set the form orientation
Definition: MWAWPageSpan.hxx:182
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:187
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:115
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
@ UPPERCASE_ROMAN
Definition: libmwaw_internal.hxx:170
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
NisusWrtStruct::FootnoteInfo m_footnoteInfo
the footnote placement
Definition: NisusWrtParser.cxx:308
bool readCNTR(MWAWEntry const &entry, int zoneId)
read the CNTR resource: a list of version controler ?
Definition: NisusWrtParser.cxx:1871
friend std::ostream & operator<<(std::ostream &o, Variable const &num)
operator<<
Definition: NisusWrtParser.cxx:132
bool isDate() const
returns true if this is a date
Definition: NisusWrtParser.cxx:71
shared_ptr< RecursifData > m_data
the recursif data
Definition: NisusWrtStruct.hxx:200
void parse(librevenge::RVNGTextInterface *documentInterface)
virtual function used to parse the input
Definition: NisusWrtParser.cxx:508
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
bool readABBR(MWAWEntry const &entry)
parse the ABBR resource: a list of abreviation?
Definition: NisusWrtParser.cxx:1913
@ PageCount
Definition: libmwaw_internal.hxx:371
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
int m_footerHeight
the footer height if known
Definition: NisusWrtParser.cxx:304
int m_increment
the increment
Definition: NisusWrtParser.cxx:119
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:172
bool readFTA2(MWAWEntry const &entry)
parse the FTA2 resource: a list of ? find in v6 document
Definition: NisusWrtParser.cxx:1966
the main class to read the text part of Nisus file
Definition: NisusWrtText.hxx:61
std::vector< Variable > m_variableList
the list of variable
Definition: NisusWrtParser.cxx:282
Reference()
constructor
Definition: NisusWrtParser.cxx:259
std::string m_extra
some extra debuging information
Definition: NisusWrtParser.cxx:129
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:85
Internal: the structures of a NisusWrtParser.
Definition: NisusWrtParser.cxx:58
bool readReference(NisusWrtStruct::RecursifData const &data)
parse the MRK7 resource
Definition: NisusWrtParser.cxx:1224
bool m_isTextDocument
a bool to know if we examine a text document or another thing glossary ...
Definition: NisusWrtParser.cxx:310
std::vector< Variable > m_numberingList
the list of numbering
Definition: NisusWrtParser.cxx:298
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:146
bool isLeaf() const
returns true if the node is a final node
Definition: NisusWrtStruct.hxx:190
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
internal structure used to stored some zone data
Definition: NisusWrtParser.cxx:272
shared_ptr< Info > m_info
zone information
Definition: NisusWrtStruct.hxx:165
bool readPrintInfo(MWAWEntry const &entry)
read the print info zone ( id=128 )
Definition: NisusWrtParser.cxx:1561
T y() const
second element
Definition: libmwaw_internal.hxx:620
MWAWRSRCParserPtr & getRSRCParser()
returns the rsrc parser
Definition: MWAWParser.hxx:190
std::vector< int > m_numberingResetList
the list of numbering reset id
Definition: NisusWrtParser.cxx:280
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:177
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:66
T x() const
first element
Definition: libmwaw_internal.hxx:615
int m_numPages
the number of page of the final document
Definition: NisusWrtParser.cxx:301
std::string m_prefix
the prefix
Definition: NisusWrtParser.cxx:121
Internal structure: use to store a numbering, a variable or a version.
Definition: NisusWrtParser.cxx:60
void getFootnoteInfo(NisusWrtStruct::FootnoteInfo &fInfo) const
returns the footnote information
Definition: NisusWrtParser.cxx:367
the data data
Definition: NisusWrtStruct.hxx:184
friend class NisusWrtGraph
Definition: NisusWrtParser.hxx:62
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
libmwaw::NumberingType m_numberingType
the numbering type
Definition: NisusWrtParser.cxx:115
MWAWEntry m_entry
the entry
Definition: NisusWrtStruct.hxx:198
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
int m_actPage
the actual page
Definition: NisusWrtParser.cxx:301
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: NisusWrtParser.cxx:541
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
int m_dateFormat
the date format
Definition: NisusWrtParser.cxx:125
std::string m_text
Definition: NisusWrtParser.cxx:268
bool sendPicture(int pictId, MWAWPosition const &pictPos)
try to send a picture
Definition: NisusWrtParser.cxx:375
Internal: the state of a NisusWrtParser.
Definition: NisusWrtParser.cxx:289
MWAWVec2f getPageLeftTop() const
returns the page left top point ( in inches)
Definition: NisusWrtParser.cxx:355
@ PageBreak
Definition: MWAWListener.hxx:58
@ None
Definition: libmwaw_internal.hxx:371
void getColumnInfo(int &numColumns, float &colSep) const
returns the columns information
Definition: NisusWrtParser.cxx:361
friend class NisusWrtText
Definition: NisusWrtParser.hxx:63
@ ARABIC
Definition: libmwaw_internal.hxx:170
Definition: libmwaw_internal.hxx:142
bool readVariable(NisusWrtStruct::RecursifData const &data)
parse the DSPL/VARI/VRS resource: numbering definition, variable or variable ?
Definition: NisusWrtParser.cxx:904
State()
constructor
Definition: NisusWrtParser.cxx:291
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
long m_fieldType
the variable type
Definition: NisusWrtParser.cxx:111
Internal structure: use to store a mark (reference)
Definition: NisusWrtParser.cxx:257
@ PageNumber
Definition: libmwaw_internal.hxx:371
VariableType
the different variable type
Definition: NisusWrtStruct.hxx:53
Variable(NisusWrtStruct::VariableType type=NisusWrtStruct::V_None)
Constructor.
Definition: NisusWrtParser.cxx:62
shared_ptr< NisusWrtGraph > m_graphParser
the graph parser
Definition: NisusWrtParser.hxx:157
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:197
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:218
@ V_None
Definition: NisusWrtStruct.hxx:53
bool readStringsList(MWAWEntry const &entry, std::vector< std::string > &list, bool simpleList)
read a list of strings
Definition: NisusWrtParser.cxx:822
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
NisusWrtParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: NisusWrtParser.cxx:318
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
long end() const
returns the end offset
Definition: MWAWEntry.hxx:77
MWAWEntry m_textPosition
Definition: NisusWrtParser.cxx:266
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1132
Zone()
constructor
Definition: NisusWrtParser.cxx:274
bool readCPRC(MWAWEntry const &entry)
read the CPRC info zone ( id=128 ), an unknown zone
Definition: NisusWrtParser.cxx:1833
int m_headerHeight
the header height if known
Definition: NisusWrtParser.cxx:303
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
@ V_Variable
Definition: NisusWrtStruct.hxx:53
bool readFnSc(MWAWEntry const &entry)
parse the FnSc resource: a unknown resource, find in v6 document
Definition: NisusWrtParser.cxx:2016
bool getReferenceData(NisusWrtStruct::ZoneType zoneId, int vId, MWAWField::Type &fType, std::string &content, std::vector< int > &number) const
returns the fieldtype or a string corresponding to a variable
Definition: NisusWrtParser.cxx:406
@ LOWERCASE
Definition: libmwaw_internal.hxx:170
std::string m_sample
a sample used in a dialog ?
Definition: NisusWrtParser.cxx:127
NisusWrtStruct::VariableType m_containerType
the container type
Definition: NisusWrtParser.cxx:109
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
the main class to read a Nisus Writer file
Definition: NisusWrtParser.hxx:60
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:223
void init()
inits all internal variables
Definition: NisusWrtParser.cxx:328
bool readPageLimit(MWAWEntry const &entry)
read the PGLY info zone ( id=128 )
Definition: NisusWrtParser.cxx:1628
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1008
std::ostream & operator<<(std::ostream &o, Variable const &num)
Definition: NisusWrtParser.cxx:132
bool readSGP1(NisusWrtStruct::RecursifData const &data)
parse the SGP1 resource: a unknown resource
Definition: NisusWrtParser.cxx:1420
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
int m_type
the main type
Definition: NisusWrtParser.cxx:107
namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usa...
Definition: libmwaw_internal.cxx:51
int m_id
Definition: NisusWrtParser.cxx:264
std::string getDateFormat() const
returns the date format
Definition: NisusWrtParser.cxx:76
shared_ptr< NisusWrtParserInternal::State > m_state
the state
Definition: NisusWrtParser.hxx:154
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:207
int m_refId
the reference id
Definition: NisusWrtParser.cxx:113
libmwaw::DebugFile & rsrcAscii()
a DebugFile used to write what we recognize when we parse the document in rsrc
Definition: NisusWrtParser.cxx:347
int m_startNumber
the start number
Definition: NisusWrtParser.cxx:117
virtual ~NisusWrtParser()
destructor
Definition: NisusWrtParser.cxx:324
@ MWAW_T_NISUSWRITER
Nisus Writer (v3.4-v6.5)
Definition: MWAWDocument.hxx:136
shared_ptr< NisusWrtText > m_textParser
the text parser
Definition: NisusWrtParser.hxx:160
@ LANDSCAPE
Definition: MWAWPageSpan.hxx:99
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
@ Z_Main
Definition: NisusWrtStruct.hxx:50
bool readNumberingReset(MWAWEntry const &entry, int zoneId)
parse the DPND resource: numbering reset ( one by zone ) : related to CNTR and VRS ?
Definition: NisusWrtParser.cxx:1186
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:96
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:151
the main class to read the graphic part of a Nisus file
Definition: NisusWrtGraph.hxx:68
Generated on Wed Jun 17 2020 06:30:12 for libmwaw by
doxygen 1.8.18