Go to the documentation of this file.
38 #ifndef WRITE_NOW_PARSER
39 # define WRITE_NOW_PARSER
bool checkIfPositionValid(long pos)
check if a position is inside the file
Definition: WriteNowParser.cxx:989
std::shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:567
long m_endPos
the last position
Definition: WriteNowParser.cxx:76
void init()
inits all internal variables
Definition: WriteNowParser.cxx:159
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:299
bool readDocEntriesV2()
try to read the document entries zone v2
Definition: WriteNowParser.cxx:478
a note
Definition: libmwaw_internal.hxx:445
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
WriteNowParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: WriteNowParser.cxx:146
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: WriteNowParser.cxx:132
WriteNowEntry readEntry()
read a file entry
Definition: WriteNowParser.cxx:1003
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:121
std::vector< WriteNowEntry > m_picturesList
the list of picture entries
Definition: WriteNowParser.cxx:80
bool readDocEntries()
try to read the document entries zone v3-v4
Definition: WriteNowParser.cxx:389
void newPage(int number)
adds a new page
Definition: WriteNowParser.cxx:185
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
bool readColorMap(WriteNowEntry const &entry)
try to read the colormap zone
Definition: WriteNowParser.cxx:722
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
int m_footerHeight
the footer height if known
Definition: WriteNowParser.cxx:85
int id() const
returns the id
Definition: MWAWEntry.hxx:164
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: WriteNowParser.cxx:281
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
std::shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:565
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:137
class to store entry in a WriteNow document
Definition: WriteNowEntry.hxx:48
int m_numColumns
the number of columns
Definition: WriteNowParser.cxx:87
std::vector< MWAWColor > m_colorMap
the color map
Definition: WriteNowParser.cxx:78
bool sendPicture(WriteNowEntry const &entry, MWAWBox2i const &bdbox)
try to send a picture to the listener
Definition: WriteNowParser.cxx:635
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
the manager of the entries
Definition: WriteNowEntry.hxx:106
std::shared_ptr< WriteNowEntryManager > m_entryManager
the list of entry
Definition: WriteNowParser.hxx:161
static MWAWPictData * get(MWAWInputStreamPtr const &input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
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:126
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
Internal: the state of a WriteNowParser.
Definition: WriteNowParser.cxx:60
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 setNaturalSize(MWAWVec2f const &naturalSz)
sets the natural size (if known)
Definition: MWAWPosition.hxx:220
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
SubDocument(WriteNowParser &pars, MWAWInputStreamPtr const &input, WriteNowEntry const &pos)
Definition: WriteNowParser.cxx:95
bool readGenericUnkn(WriteNowEntry const &entry)
try to read the last generic zones
Definition: WriteNowParser.cxx:905
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
State()
constructor
Definition: WriteNowParser.cxx:62
void getColumnInfo(int &numColumns, int &width) const
returns the columns information
Definition: WriteNowParser.cxx:176
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
bool sendGraphic(int gId, MWAWBox2i const &bdbox)
try to send the graphic zone
Definition: WriteNowParser.cxx:220
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: WriteNowParser.cxx:115
@ MWAW_T_WRITENOW
WriteNow.
Definition: MWAWDocument.hxx:156
SubDocumentType
Definition: libmwaw_internal.hxx:188
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
int m_fileType
the file entry id
Definition: WriteNowEntry.hxx:100
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:132
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:158
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:113
T y() const
second element
Definition: libmwaw_internal.hxx:673
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:193
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
T x() const
first element
Definition: libmwaw_internal.hxx:668
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
bool parseGraphicZone(WriteNowEntry const &entry)
try to read the graphic zone (unknown + list of entries ) and to create the graphic data zone
Definition: WriteNowParser.cxx:555
int m_actPage
the actual page
Definition: WriteNowParser.cxx:82
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
bool readPrintInfo(WriteNowEntry const &entry)
try to read the print info zone
Definition: WriteNowParser.cxx:829
the main class to read a WriteNow file
Definition: WriteNowParser.hxx:69
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
@ PageBreak
Definition: MWAWListener.hxx:58
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
Definition: libmwaw_internal.hxx:144
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
friend class WriteNowText
Definition: WriteNowParser.hxx:70
bool isZoneType() const
returns true if this entry store a zone
Definition: WriteNowEntry.hxx:62
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
bool createZones()
finds the different objects zones
Definition: WriteNowParser.cxx:329
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
@ Char
Definition: MWAWPosition.hxx:51
int m_val[4]
other values
Definition: WriteNowEntry.hxx:102
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
bool getColor(int colId, MWAWColor &col) const
returns the color which corresponds to colId
Definition: WriteNowParser.cxx:198
int m_headerHeight
the header height if known
Definition: WriteNowParser.cxx:84
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
Defines MWAWTextListener: the libmwaw word processor listener.
std::shared_ptr< WriteNowText > m_textParser
the text parser
Definition: WriteNowParser.hxx:164
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
void send(WriteNowEntry const &entry)
try to send an entry
Definition: WriteNowParser.cxx:215
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
WriteNowEntry m_pos
the subdocument file position
Definition: WriteNowParser.cxx:112
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
@ FootNote
Definition: libmwaw_internal.hxx:447
int m_numPages
the number of page of the final document
Definition: WriteNowParser.cxx:82
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: WriteNowParser.cxx:1029
Definition: MWAWDocument.hxx:57
Internal: the subdocument of a WriteNowParser.
Definition: WriteNowParser.cxx:93
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
void sendFootnote(WriteNowEntry const &entry)
try to send a footnote entry
Definition: WriteNowParser.cxx:207
~WriteNowParser() final
destructor
Definition: WriteNowParser.cxx:155
Internal: the structures of a WriteNowParser.
Definition: WriteNowParser.cxx:57
int m_columnWidth
the columns size
Definition: WriteNowParser.cxx:87
bool isZone() const
returns true if this is a zone
Definition: WriteNowEntry.hxx:67
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: WriteNowParser.cxx:239
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
std::shared_ptr< WriteNowParserInternal::State > m_state
the state
Definition: WriteNowParser.hxx:158
the main class to read the text part of writenow file
Definition: WriteNowText.hxx:82
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
~SubDocument() final
destructor
Definition: WriteNowParser.cxx:102
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20