Go to the documentation of this file.
37 #ifndef MS_WRD_MWAW_PARSER
38 # define MS_WRD_MWAW_PARSER
110 void parse(librevenge::RVNGTextInterface *documentInterface);
117 void createDocument(librevenge::RVNGTextInterface *documentInterface);
198 shared_ptr<MsWrdParserInternal::State>
m_state;
int m_pictCPos
the picture char position
Definition: MsWrdParser.cxx:243
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
@ CharBaseLine
Definition: MWAWPosition.hxx:51
int m_id
the subdocument id
Definition: MsWrdParser.cxx:237
Internal: the picture of a MsWrdParser.
Definition: MsWrdParser.cxx:128
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:296
MWAWEntry m_zone
if valid the zone to parse
Definition: MWAWSubDocument.hxx:79
ReadResult
an enum to defined the result of a parsing use by some picture's classes which can read their data
Definition: MWAWPict.hxx:73
@ PORTRAIT
Definition: MWAWPageSpan.hxx:99
shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:519
long m_textPos
the text position
Definition: MsWrdParser.cxx:102
SubDocument(MsWrdParser &pars, MWAWInputStreamPtr input, MWAWEntry entry, libmwaw::SubDocumentType type)
constructor for header/footer
Definition: MsWrdParser.cxx:215
a note
Definition: libmwaw_internal.hxx:406
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:262
State()
constructor
Definition: MsWrdParser.cxx:177
MsWrdEntry getEntry() const
Definition: MsWrdParser.cxx:71
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: MsWrdParser.cxx:687
friend std::ostream & operator<<(std::ostream &o, MsWrdEntry const &entry)
operator<<
Definition: MsWrdParser.cxx:288
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
void newPage(int number)
adds a new page
Definition: MsWrdParser.cxx:327
AnchorTo
a list of enum used to defined the anchor
Definition: MWAWPosition.hxx:51
friend std::ostream & operator<<(std::ostream &o, Picture const &pict)
operator<<
Definition: MsWrdParser.cxx:134
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:221
std::string m_extra
some extra data
Definition: MsWrdParser.cxx:123
bool readDocumentInfo(MsWrdEntry &entry)
read the page dimensions + ?
Definition: MsWrdParser.cxx:1011
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:110
bool readStringsZone(MsWrdEntry &entry, std::vector< std::string > &list)
read a zone which consists in a list of string
Definition: MsWrdParser.cxx:1261
@ DOC_COMMENT_ANNOTATION
Definition: libmwaw_internal.hxx:178
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
void parse(librevenge::RVNGTextInterface *documentInterface)
the main parse function
Definition: MsWrdParser.cxx:410
libmwaw::SubDocumentType m_type
the subdocument type
Definition: MsWrdParser.cxx:239
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
int id() const
returns the id
Definition: MWAWEntry.hxx:153
@ WBackground
Definition: MWAWPosition.hxx:53
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:202
@ YCenter
Definition: MWAWPosition.hxx:57
the class to store a color
Definition: libmwaw_internal.hxx:182
void init()
inits all internal variables
Definition: MsWrdParser.cxx:311
small class use to define a embedded object
Definition: libmwaw_internal.hxx:425
int pictType() const
returns the text id
Definition: MsWrdParser.hxx:74
bool readZoneList()
read the list of zones
Definition: MsWrdParser.cxx:557
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
bool readObjectList(MsWrdEntry &entry)
read the object list
Definition: MsWrdParser.cxx:1368
void sendFieldComment(int id)
try to send a bookmark field id
Definition: MsWrdParser.cxx:383
std::multimap< std::string, MsWrdEntry > m_entryMap
the list of entries
Definition: MsWrdParser.hxx:201
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
int m_idsFlag[2]
some flags link to m_ids
Definition: MsWrdParser.cxx:117
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
std::map< long, Picture > m_picturesMap
the map filePos -> Picture
Definition: MsWrdParser.cxx:190
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
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
void setPictType(int newId)
sets the picture id
Definition: MsWrdParser.hxx:79
Object()
Definition: MsWrdParser.cxx:62
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
Internal: the object of MsWrdParser.
Definition: MsWrdParser.cxx:61
std::vector< int > m_footersId
the list of footer id which corresponds to each page
Definition: MsWrdParser.cxx:202
bool m_endNote
a flag to know if we must place the note at the end or in the foot part
Definition: MsWrdParser.cxx:188
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MsWrdParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: MsWrdParser.cxx:301
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:172
Internal: the subdocument of a MsWrdParser.
Definition: MsWrdParser.cxx:209
int m_flag
an unknown flag
Definition: MsWrdParser.cxx:146
static ReadResult check(MWAWInputStreamPtr input, int size, MWAWBox2f &box)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:100
SubDocumentType
Definition: libmwaw_internal.hxx:178
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:85
Internal: the state of a MsWrdParser.
Definition: MsWrdParser.cxx:175
int m_headerHeight
the header height if known
Definition: MsWrdParser.cxx:197
@ MWAW_T_MICROSOFTWORD
Microsoft Word (v1-v5)
Definition: MWAWDocument.hxx:132
int m_id
an identificator
Definition: MWAWEntry.hxx:193
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:146
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:121
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
int m_id
the id
Definition: MsWrdParser.cxx:111
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
int m_flags[3]
three unknown flags
Definition: MsWrdParser.cxx:168
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:177
bool readObjects()
read the objects
Definition: MsWrdParser.cxx:1318
void setSize(MWAWVec2f const &sz)
sets the frame size
Definition: MWAWPosition.hxx:199
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:66
@ Object
Definition: MsWrdText.hxx:71
T x() const
first element
Definition: libmwaw_internal.hxx:615
Internal: the plc.
Definition: MsWrdText.hxx:70
MWAWBox2i m_dim
the dimension
Definition: MsWrdParser.cxx:142
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type)
the parser function
Definition: MsWrdParser.cxx:246
virtual bool operator!=(MWAWSubDocument const &doc) const
operator!=
Definition: MsWrdParser.cxx:268
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
std::ostream & operator<<(std::ostream &o, MsWrdEntry const &entry)
Definition: MsWrdParser.cxx:288
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
int m_id
the identificator
Definition: MsWrdText.hxx:91
MWAWEntry m_pos
the position in file
Definition: MsWrdParser.cxx:164
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
Wrapping m_wrapping
Wrapping.
Definition: MWAWPosition.hxx:262
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
@ DOC_HEADER_FOOTER
Definition: libmwaw_internal.hxx:178
bool readObjectFlags(MsWrdEntry &entry)
read the object flags
Definition: MsWrdParser.cxx:1441
@ PageBreak
Definition: MWAWListener.hxx:58
@ MWAW_R_BAD
Definition: MWAWPict.hxx:73
bool getColor(int id, MWAWColor &col) const
returns the color corresponding to an id
Definition: MsWrdParser.cxx:340
Definition: libmwaw_internal.hxx:142
void setOrigin(MWAWVec2f const &orig)
sets the frame origin
Definition: MWAWPosition.hxx:194
SubDocument(MsWrdParser &pars, MWAWInputStreamPtr input, int id, libmwaw::SubDocumentType type)
constructor for footnote, comment
Definition: MsWrdParser.cxx:212
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
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
bool readDocSum(MsWrdEntry &entry)
read the document sumary
Definition: MsWrdParser.cxx:1206
void sendFootnote(int id)
try to send a footnote id
Definition: MsWrdParser.cxx:374
the main class to read the text part of Microsoft Word file
Definition: MsWrdText.hxx:65
virtual ~SubDocument()
destructor
Definition: MsWrdParser.cxx:222
shared_ptr< MsWrdParserInternal::State > m_state
the state
Definition: MsWrdParser.hxx:198
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:158
std::vector< Object > m_objectList[2]
the list of object ( mainZone, other zone)
Definition: MsWrdParser.cxx:193
int m_footerHeight
the footer height if known
Definition: MsWrdParser.cxx:198
bool checkPicturePos(long pos, int type)
check if a position corresponds or not to a picture entry
Definition: MsWrdParser.cxx:1675
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:197
SubDocument(MsWrdParser &pars, MWAWInputStreamPtr input, long fPos, int cPos)
constructor for picture
Definition: MsWrdParser.cxx:218
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:218
shared_ptr< MsWrdText > m_textParser
the text parser
Definition: MsWrdParser.hxx:204
friend std::ostream & operator<<(std::ostream &o, Zone const &pict)
operator<<
Definition: MsWrdParser.cxx:155
@ Char
Definition: MWAWPosition.hxx:51
long m_pictFPos
the picture file position
Definition: MsWrdParser.cxx:241
std::vector< int > m_headersId
the list of header id which corresponds to each page
Definition: MsWrdParser.cxx:200
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
virtual bool operator==(MWAWSubDocument const &doc) const
operator!==
Definition: MsWrdParser.cxx:227
MWAWBox2i m_dim
the dimension
Definition: MsWrdParser.cxx:166
long m_bot
the begin of the text
Definition: MsWrdParser.cxx:184
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
bool readPrintInfo(MsWrdEntry &entry)
read the print info zone
Definition: MsWrdParser.cxx:1849
std::vector< Zone > m_picturesList
the list of picture
Definition: MsWrdParser.cxx:144
long m_eot
end of the text
Definition: MsWrdParser.cxx:186
friend std::ostream & operator<<(std::ostream &o, Object const &obj)
operator<<
Definition: MsWrdParser.cxx:82
std::string m_name
the object name
Definition: MsWrdParser.cxx:108
@ DOC_NOTE
Definition: libmwaw_internal.hxx:178
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1132
MsWrdEntry readEntry(std::string type, int id=-1)
read a file entry
Definition: MsWrdParser.cxx:970
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
~MsWrdEntry()
destructor
Definition: MsWrdParser.cxx:284
the main class to read/store the text font, paragraph, section stylesread
Definition: MsWrdTextStyles.hxx:67
Internal: the structures of a MsWrdParser.
Definition: MsWrdParser.cxx:58
the main class to read a Microsoft Word file
Definition: MsWrdParser.hxx:95
@ Page
Definition: MWAWPosition.hxx:51
bool readObject(MsWrdParserInternal::Object &obj)
read an object
Definition: MsWrdParser.cxx:1498
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
friend class MsWrdText
Definition: MsWrdParser.hxx:96
void send(int id, libmwaw::SubDocumentType type)
try to send a footnote, a field to the textParser
Definition: MsWrdParser.cxx:396
void sendPicture(long fPos, int cPos, MWAWPosition::AnchorTo anchor=MWAWPosition::Char)
send a picture
Definition: MsWrdParser.cxx:1789
Zone()
Definition: MsWrdParser.cxx:150
MWAWVec2< T > const & min() const
the minimum 2D point (in x and in y)
Definition: libmwaw_internal.hxx:980
virtual ~MsWrdParser()
destructor
Definition: MsWrdParser.cxx:307
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
MWAWVec2f const & origin() const
return the frame origin
Definition: MWAWPosition.hxx:114
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:192
Picture()
Definition: MsWrdParser.cxx:130
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
@ YTop
Definition: MWAWPosition.hxx:57
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
int m_flags[2]
some flags
Definition: MsWrdParser.cxx:120
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1008
@ Frame
Definition: MWAWPosition.hxx:51
bool readPrinter(MsWrdEntry &entry)
read the printer name
Definition: MsWrdParser.cxx:1159
@ FootNote
Definition: libmwaw_internal.hxx:408
@ XLeft
Definition: MWAWPosition.hxx:55
namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usa...
Definition: libmwaw_internal.cxx:51
bool readHeaderEndV3()
finish reading the header (v3)
Definition: MsWrdParser.cxx:828
int m_pictType
the picture identificator
Definition: MsWrdParser.hxx:86
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:207
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MsWrdParser.cxx:445
Definition: MsWrdParser.cxx:149
shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:517
@ EndNote
Definition: libmwaw_internal.hxx:408
the entry of MsWrdParser
Definition: MsWrdParser.hxx:63
@ DOC_NONE
Definition: libmwaw_internal.hxx:178
int m_actPage
the actual page
Definition: MsWrdParser.cxx:195
@ LANDSCAPE
Definition: MWAWPageSpan.hxx:99
int m_numPages
the number of page of the final document
Definition: MsWrdParser.cxx:195
MWAWEntry m_pos
the object entry
Definition: MsWrdParser.cxx:105
MsWrdEntry()
constructor
Definition: MsWrdParser.hxx:65
bool readPicture(MsWrdEntry &entry)
read a picture data
Definition: MsWrdParser.cxx:1710
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
int m_ids[2]
some others id?
Definition: MsWrdParser.cxx:114
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
static MWAWPictData * get(MWAWInputStreamPtr input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
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
bool readZone17(MsWrdEntry &entry)
read the zone 17( some bdbox + text position ?)
Definition: MsWrdParser.cxx:1082
bool createZones()
finds the different zones
Definition: MsWrdParser.cxx:495
Generated on Wed Jun 17 2020 06:30:11 for libmwaw by
doxygen 1.8.18