Go to the documentation of this file.
27 #include <librevenge-stream/librevenge-stream.h>
void createNote(WPSEntry const &entry, librevenge::RVNGString const &label)
creates a document for a footnote entry with label and then send the data
Definition: WPS4.cpp:366
the state of WPS4
Definition: WPS4.cpp:128
int m_numPages
Definition: WPS4.cpp:156
bool operator==(std::shared_ptr< WPSSubDocument > const &doc) const final
operator==
Definition: WPS4.cpp:57
~SubDocument() final
destructor
Definition: WPS4.cpp:54
void setSizeFile(long sz)
sets the file size ( filled by WPS4Text )
Definition: WPS4.cpp:242
static std::string str()
Definition: WPSDebug.h:200
static bool open(std::string const &)
Definition: WPSDebug.h:215
bool m_noFirstPageHeader
Definition: WPS4.cpp:153
~WPS4Parser() final
destructor
Definition: WPS4.cpp:174
static void addPos(long)
Definition: WPSDebug.h:220
long end() const
returns the end offset
Definition: WPSEntry.h:76
bool getColor(int id, WPSColor &color) const
color
Definition: WPS4.cpp:206
bool dumpFile(librevenge::RVNGBinaryData &, char const *)
Definition: WPSDebug.h:180
void setLength(long l)
sets the zone size
Definition: WPSEntry.h:60
std::shared_ptr< WPSContentListener > createListener(librevenge::RVNGTextInterface *interface)
creates the main listener
Definition: WPS4.cpp:269
void setVersion(int vers)
Definition: WPSParser.h:60
libwps_tools_win::Font::Type m_OEMFontType
the OEM code page
Definition: WPS4.cpp:150
int numColumns() const
returns the number of columns
Definition: WPS4.cpp:189
Definition: WPSPageSpan.h:41
Definition: libwps_internal.cpp:38
float pageHeight() const
returns the page height, ie. paper size less margin (in inches)
Definition: WPS4.cpp:179
void newPage(int number)
adds a new page
Definition: WPS4.cpp:307
WPSParser * m_parser
Definition: WPSTextSubDocument.h:62
long m_eof
the last file position
Definition: WPS4.cpp:146
The class which parses text zones in a pc MS Works document v1-4.
Definition: WPS4Text.h:64
static void reset()
Definition: WPSDebug.h:224
a class used to parse some basic oles Tries to read the different ole parts and stores their contents...
Definition: WPSOLEParser.h:85
void setMarginRight(const double marginRight)
Definition: WPSPageSpan.h:132
const std::map< int, WPSEmbeddedObject > & getObjectsMap() const
returns the list of data positions which have been read
Definition: WPSOLEParser.cpp:281
std::shared_ptr< WPS4Graph > m_graphParser
the graph parser
Definition: WPS4.h:149
Definition: WPSPageSpan.h:44
float pageWidth() const
returns the page width, ie. paper size less margin (in inches)
Definition: WPS4.cpp:184
std::shared_ptr< WPS4ParserInternal::State > m_state
the internal state
Definition: WPS4.h:153
Definition: WPSContentListener.h:44
bool valid(bool checkId=false) const
returns true if the zone length is positive
Definition: WPSEntry.h:87
bool createOLEStructures()
tries to parse the different OLE zones ( except the main zone )
Definition: WPS4.cpp:462
bool readDocWindowsInfo(WPSEntry const &entry)
reads the additional windows info
Definition: WPS4.cpp:978
Definition: WPSPageSpan.h:43
Definition: WPSPageSpan.h:43
basic class to store an entry in a file This contained :
Definition: WPSEntry.h:38
bool m_isDosFile
flag to know if the file is or not a dos file
Definition: WPS4.cpp:144
NameMultiMap & getNameEntryMap()
Definition: WPSParser.h:70
WPS4Parser(RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN)
constructor
Definition: WPS4.cpp:161
Definition: WPSParser.h:35
#define WPS_PAGE_BREAK
Definition: libwps_internal.h:519
friend class WPS4Graph
Definition: WPS4.h:51
the main class to read/store picture in a Pc MS Works document v1-4
Definition: WPS4Graph.h:56
libwps_tools_win::Font::Type getDefaultFontType() const
returns the default font type, ie.
Definition: WPS4.cpp:194
const std::string & type() const
returns the type of the entry
Definition: WPSEntry.h:129
void setId(int i)
sets the id
Definition: WPSEntry.h:161
bool checkFilePosition(long pos)
return true if the pos is in the file, update the file size if need
Definition: WPS4.cpp:248
bool parse(RVNGInputStreamPtr fileInput)
tries to parse basic OLE (excepted mainName)
Definition: WPSOLEParser.cpp:318
void createDocument(WPSEntry const &entry, libwps::SubDocumentType type)
creates a document for a comment entry and then send the data
Definition: WPS4.cpp:353
RVNGInputStreamPtr getFileInput()
Definition: WPSParser.cpp:45
Definition: libwps_internal.h:151
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
uint32_t readU32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:76
#define WPS_FALLTHROUGH
fall through attributes
Definition: libwps_internal.h:82
void setBegin(long off)
sets the begin offset
Definition: WPSEntry.h:55
Definition: libwps_internal.h:248
int32_t read32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:85
void setFormWidth(const double formWidth)
Definition: WPSPageSpan.h:120
SubDocumentType
Definition: libwps_internal.h:248
Definition: WPSPageSpan.h:41
void setType(std::string const &tp)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: WPSEntry.h:124
bool checkHeader(WPSHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: WPS4.cpp:545
void parse(librevenge::RVNGTextInterface *documentInterface) final
called by WPSDocument to parse the file
Definition: WPS4.cpp:387
libwps_tools_win::Font::Type getOEMFontType() const
returns the document codepage ( given from the file OEM field )
Definition: WPS4.cpp:201
SubDocument(RVNGInputStreamPtr const &input, WPS4Parser &pars, WPSEntry const &entry)
constructor for a text entry
Definition: WPS4.cpp:51
static void addNote(char const *)
Definition: WPSDebug.h:221
RVNGInputStreamPtr & getInput()
Definition: WPSParser.h:47
WPSPageSpan m_pageSpan
the actual document size
Definition: WPS4.cpp:152
Definition: libwps_internal.h:248
long begin() const
returns the begin offset
Definition: WPSEntry.h:71
void send(WPSEntry const &entry, libwps::SubDocumentType type)
sends text corresponding to the entry to the listener (via WPS4Text)
Definition: WPS4.cpp:339
State(libwps_tools_win::Font::Type fontType)
Definition: WPS4.cpp:130
int8_t read8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:59
std::shared_ptr< WPSSubDocument > WPSSubDocumentPtr
shared pointer to WPSSubDocument
Definition: libwps_internal.h:111
void setMarginTop(const double marginTop)
Definition: WPSPageSpan.h:136
WPSEntry m_entry
the entry
Definition: WPS4.cpp:69
long length() const
returns the length of the zone
Definition: WPSEntry.h:81
std::shared_ptr< WPSHeader > WPSHeaderPtr
shared pointer to WPSHeader
Definition: libwps_internal.h:109
bool readDocDim()
tries to read the document dimension
Definition: WPS4.cpp:839
int m_actPage
the actual page
Definition: WPS4.cpp:156
Definition: WPSDebug.h:191
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: WPSEntry.h:113
void setFormOrientation(const FormOrientation formOrientation)
Definition: WPSPageSpan.h:124
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
int version() const
Definition: WPSParser.h:56
Type
type of an entry stored in textId
Definition: WPS4.cpp:49
bool createStructures()
tries to parse the main zone, ...
Definition: WPS4.cpp:445
void setMarginBottom(const double marginBottom)
Definition: WPSPageSpan.h:140
friend class WPS4Text
Definition: WPS4.h:52
libwps::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: WPSParser.h:65
int readObject(RVNGInputStreamPtr input, WPSEntry const &entry)
tries to read a picture ( via its WPS4Graph )
Definition: WPS4.cpp:326
Definition: WPSPageSpan.h:38
void setHeaderFooter(const HeaderFooterType type, const HeaderFooterOccurrence occurrence, WPSSubDocumentPtr &subDocument)
Definition: WPSPageSpan.cpp:111
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
bool hasType(std::string const &tp) const
returns true if the type entry == type
Definition: WPSEntry.h:134
This class parses Works version 2 through 4.
Definition: WPS4.h:48
bool m_noFirstPageFooter
Definition: WPS4.cpp:154
libwps_tools_win::Font::Type m_fontType
the user font type
Definition: WPS4.cpp:148
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
Basic class used to store a sub document.
Definition: WPSTextSubDocument.h:35
void parse(std::shared_ptr< WPSContentListener > &listener, libwps::SubDocumentType subDocumentType) final
the parser function
Definition: WPS4.cpp:72
int m_numColumns
the number of columns
Definition: WPS4.cpp:155
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: WPSPosition.h:39
bool readDataToEnd(RVNGInputStreamPtr &input, librevenge::RVNGBinaryData &data)
try to read the last bytes from input and store them in a librevenge::RVNGBinaryData
Definition: libwps_internal.cpp:346
bool findZones()
finds the different zones (text, print, ...) and updates nameMultiMap
Definition: WPS4.cpp:569
int16_t read16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:71
const std::vector< std::string > & getNotParse() const
returns the list of unknown ole
Definition: WPSOLEParser.cpp:276
the class to store a color
Definition: libwps_internal.h:280
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: WPSEntry.h:118
Definition: WPSOLEStream.h:33
std::shared_ptr< WPSContentListener > m_listener
Definition: WPS4.h:147
bool parseEntry(std::string const &name)
parses an entry
Definition: WPS4.cpp:509
void setMarginLeft(const double marginLeft)
Definition: WPSPageSpan.h:128
Internal: the subdocument of a WPS4Parser.
Definition: WPS4.cpp:45
bool readPrnt(WPSEntry const &entry)
tries to read the printer information
Definition: WPS4.cpp:906
void setFormLength(const double formLength)
Definition: WPSPageSpan.h:116
void setListener(std::shared_ptr< WPSContentListener > const &listener)
set the listener
Definition: WPS4.cpp:262
void createTextBox(WPSEntry const &entry, WPSPosition const &pos, librevenge::RVNGPropertyList &extras)
creates a textbox and then send the data
Definition: WPS4.cpp:374
void sendObject(WPSPosition const &position, int id)
sends an object with given id ( via its WPS4Graph )
Definition: WPS4.cpp:334
Definition: WPSContentListener.h:99
static void setStream(RVNGInputStreamPtr)
Definition: WPSDebug.h:212
std::shared_ptr< WPS4Text > m_textParser
the text parser
Definition: WPS4.h:151
Generated on Mon Dec 9 2019 20:01:28 for libwps by
doxygen 1.8.16