Go to the documentation of this file.
28 #include <librevenge/librevenge.h>
97 void send(
int strsId);
#define WPS_N_ELEMENTS(m)
Definition: libwps_internal.h:124
std::deque< int > & m_stack
Definition: WPS8.cpp:322
~SubDocument() final
destructor
Definition: WPS8.cpp:60
bool hasName(std::string const &nam) const
checks if the entry name is equal to name
Definition: WPSEntry.h:152
WPSColor m_backgroundColor
the border's color
Definition: WPS8.cpp:169
void setName(std::string const &nam)
sets the name of the entry
Definition: WPSEntry.h:142
bool sendTable(Vec2f const &size, int objectId)
sends a table as a character with given size ( via its WPS8Table )
Definition: WPS8.cpp:494
static std::string str()
Definition: WPSDebug.h:200
static bool open(std::string const &)
Definition: WPSDebug.h:215
bool operator==(std::shared_ptr< WPSSubDocument > const &doc) const final
operator==
Definition: WPS8.cpp:63
void sendPageFrames()
send the frames which corresponds to a given page to the listener
Definition: WPS8.cpp:750
@ Footer
Definition: WPS8.cpp:152
static void addPos(long)
Definition: WPSDebug.h:220
friend class WPS8Table
Definition: WPS8.h:53
long end() const
returns the end offset
Definition: WPSEntry.h:78
Internal: the subdocument of a WPS8Parser.
Definition: WPS8.cpp:51
void setExtra(std::string const &s)
sets the extra string
Definition: WPSEntry.h:174
bool dumpFile(librevenge::RVNGBinaryData &, char const *)
Definition: WPSDebug.h:180
State()
Definition: WPS8.cpp:233
AnchorTo m_anchorTo
anchor position
Definition: WPSPosition.h:241
std::map< int, int > m_frameTypes
the frame type
Definition: WPS8.cpp:270
double getFormLength() const
Definition: WPSPageSpan.h:59
void setLength(long l)
sets the zone size
Definition: WPSEntry.h:62
int m_numPages
Definition: WPS8.cpp:272
the main class to read/store table in a Pc MS Works document v5-8
Definition: WPS8Table.h:58
WPSEntry m_idBorder
the border: an entry to some complex border (if sets)
Definition: WPS8.cpp:167
bool readWNPR(WPSEntry const &entry)
parses the WNPR zone : a zone which seems to contain the printer preferences.
Definition: WPS8.cpp:1888
void setVersion(int vers)
Definition: WPSParser.h:60
the main class to read/store pictures in a Pc MS Works document v5-8
Definition: WPS8Graph.h:54
std::vector< FileData > m_recursData
the list of children
Definition: WPS8Struct.h:145
std::map< int, WPSEmbeddedObject > const & getObjectsMap() const
returns the list of data positions which have been read
Definition: WPSOLEParser.cpp:281
@ LANDSCAPE
Definition: WPSPageSpan.h:41
std::shared_ptr< WPSContentListener > WPSContentListenerPtr
shared pointer to WPSContentListener
Definition: libwps_internal.h:107
bool sendObject(Vec2f const &size, int objectId, bool ole)
sends an object as a character with given size (via its WPS8Graph )
Definition: WPS8.cpp:485
Frame()
constructor
Definition: WPS8.cpp:135
WPSPageSpan m_pageSpan
the actual document size
Definition: WPS8.cpp:254
bool readBlockData(RVNGInputStreamPtr input, long endPos, FileData &dt, std::string &error)
tries to read a block zone as a list of Data
Definition: WPS8Struct.cpp:168
friend class WPS8Text
Definition: WPS8.h:54
WPSEntry m_background
an identificator to design a background picture
Definition: WPS8.cpp:258
@ DbField
Definition: WPS8.cpp:152
std::vector< std::string > const & getNotParse() const
returns the list of unknown ole
Definition: WPSOLEParser.cpp:276
WPSParser * m_parser
Definition: WPSTextSubDocument.h:62
std::shared_ptr< WPS8Table > m_tableParser
the table parser
Definition: WPS8.h:163
std::shared_ptr< WPSContentListener > m_listener
Definition: WPS8.h:159
the state of WPS8
Definition: WPS8.cpp:232
@ Text
Definition: WPS8.cpp:152
bool readFRAM(WPSEntry const &entry)
reads the FRAM zone: ie a zone which can contains textbox, picture, ...
Definition: WPS8.cpp:1277
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:86
Wrapping m_wrapping
Wrapping.
Definition: WPSPosition.h:249
void sendTextBox(WPSPosition const &pos, int strsid, librevenge::RVNGPropertyList frameExtras=librevenge::RVNGPropertyList())
creates a subdocument to send a textbox which correspond to the strsid text zone
Definition: WPS8.cpp:472
void setMarginRight(const double marginRight)
Definition: WPSPageSpan.h:134
@ ALL
Definition: WPSPageSpan.h:44
bool parseHeaderIndexEntry()
parses an index entry
Definition: WPS8.cpp:797
bool isWhite() const
return true if the color is white
Definition: libwps_internal.h:350
friend class WPS8Graph
Definition: WPS8.h:52
int m_type
the frame type
Definition: WPS8.cpp:157
bool m_parsed
a flag to know if the frame is already sent to the listener
Definition: WPS8.cpp:155
Definition: WPSContentListener.h:45
bool valid(bool checkId=false) const
returns true if the zone length is positive
Definition: WPSEntry.h:89
TableRecursionGuard(std::deque< int > &stack, const int id)
Definition: WPS8.cpp:310
std::vector< Frame > m_frameList
the frame's list
Definition: WPS8.cpp:261
@ UNKNOWN
Definition: WPS8.cpp:152
@ HEADER
Definition: WPSPageSpan.h:43
@ FOOTER
Definition: WPSPageSpan.h:43
basic class to store an entry in a file This contained :
Definition: WPSEntry.h:39
NameMultiMap & getNameEntryMap()
Definition: WPSParser.h:70
~TableRecursionGuard()
Definition: WPS8.cpp:316
std::string const & name() const
name of the entry
Definition: WPSEntry.h:147
Definition: WPSParser.h:36
@ CharBaseLine
Definition: WPSPosition.h:43
@ Unknown
Definition: WPS8.cpp:54
#define WPS_PAGE_BREAK
Definition: libwps_internal.h:519
Vec2f const & origin() const
return the frame origin
Definition: WPSPosition.h:118
double getFormWidth() const
Definition: WPSPageSpan.h:63
float pageWidth() const
returns the page width, ie. paper size less margin (in inches)
Definition: WPS8.cpp:355
std::map< int, int > m_docPropertyTypes
the document property type
Definition: WPS8.cpp:268
bool readDocProperties(WPSEntry const &entry, WPSPageSpan &page)
reads the DOP zone: the document properties
Definition: WPS8.cpp:1018
void sendTextInCell(int strsId, int cellId)
send the text of a cell to a listener (via WPS8Text)
Definition: WPS8.cpp:464
bool parseHeaderIndexEntryEnd(long endPos, WPSEntry &hie, std::string &mess)
function which is called, if some data remains after the basic content of an entry: by default does n...
Definition: WPS8.cpp:906
std::shared_ptr< WPS8Graph > m_graphParser
the graph parser
Definition: WPS8.h:161
void setId(int i)
sets the id
Definition: WPSEntry.h:163
Type
type of an entry
Definition: WPS8.cpp:54
std::string m_localeLanguage
the language
Definition: WPS8.cpp:256
void parse(std::shared_ptr< WPSContentListener > &listener, libwps::SubDocumentType subDocumentType) final
the parser function
Definition: WPS8.cpp:78
bool parse(RVNGInputStreamPtr fileInput)
tries to parse basic OLE (excepted mainName)
Definition: WPSOLEParser.cpp:318
Vec2< float > Vec2f
Vec2 of float.
Definition: libwps_internal.h:704
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: WPSPosition.h:214
RVNGInputStreamPtr getFileInput()
Definition: WPSParser.cpp:45
Definition: libwps_internal.h:152
std::string flattenFileName(std::string const &name)
Definition: WPSDebug.h:185
@ Table
Definition: WPS8.cpp:152
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
uint32_t readU32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:76
void setBegin(long off)
sets the begin offset
Definition: WPSEntry.h:57
long m_eof
the end of file
Definition: WPS8.cpp:252
T x() const
first element
Definition: libwps_internal.h:542
int32_t read32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:85
int m_columns
the number of columns for a textbox, ...
Definition: WPS8.cpp:165
void setFormWidth(const double formWidth)
Definition: WPSPageSpan.h:122
SubDocumentType
Definition: libwps_internal.h:248
bool parseHeaderIndex()
tries to find the beginning of the list of indices, then try to find all entries in this list.
Definition: WPS8.cpp:936
void setType(std::string const &tp)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: WPSEntry.h:126
std::map< int, int > m_table2FrameMap
a map m_idTable -> frame
Definition: WPS8.cpp:265
void setY(T yy)
resets the second element
Definition: libwps_internal.h:576
bool createOLEStructures()
tries to parse the different OLE zones ( except the main zone )
Definition: WPS8.cpp:703
std::shared_ptr< WPS8Text > m_textParser
the text parser
Definition: WPS8.h:165
int m_idOle
identifier corresponding to an ole
Definition: WPS8.cpp:163
bool checkInFile(long pos)
return true if the pos is in the file, update the file size if need
Definition: WPS8.cpp:365
static void addNote(char const *)
Definition: WPSDebug.h:221
RVNGInputStreamPtr & getInput()
Definition: WPSParser.h:47
int m_actPage
the actual page
Definition: WPS8.cpp:272
std::map< int, int > m_object2FrameMap
a map m_idObject -> frame
Definition: WPS8.cpp:263
@ DOC_HEADER_FOOTER
Definition: libwps_internal.h:248
long begin() const
returns the begin offset
Definition: WPSEntry.h:73
A recursif structure which seems generally used to store complex memory structures in a file.
Definition: WPS8Struct.h:64
std::shared_ptr< WPS8ParserInternal::State > m_state
the internal state
Definition: WPS8.h:167
int page() const
returns the frame page
Definition: WPSPosition.h:113
void newPage(int number)
adds a new page
Definition: WPS8.cpp:433
Internal: a frame, a zone which can contain text, picture, ...
Definition: WPS8.cpp:133
friend std::ostream & operator<<(std::ostream &o, Frame const &ft)
operator <<
Definition: WPS8.cpp:175
std::string const & type() const
returns the type of the entry
Definition: WPSEntry.h:131
int8_t read8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:59
bool readFRCD(WPSEntry const &entry)
reads the FRCD zone: ie a zone which can contains mailmerge data ?
Definition: WPS8.cpp:1654
std::shared_ptr< WPSSubDocument > WPSSubDocumentPtr
shared pointer to WPSSubDocument
Definition: libwps_internal.h:111
This class parses Works version 2000 through 8.
Definition: WPS8.h:50
Definition: WPS8Text.h:48
TableRecursionGuard & operator=(const TableRecursionGuard &)=delete
int id() const
returns the entry id
Definition: WPSEntry.h:158
std::string m_error
a string used to store the parsing errors
Definition: WPS8.cpp:171
void setMarginTop(const double marginTop)
Definition: WPSPageSpan.h:138
long length() const
returns the length of the zone
Definition: WPSEntry.h:83
std::shared_ptr< WPSHeader > WPSHeaderPtr
shared pointer to WPSHeader
Definition: libwps_internal.h:109
@ Header
Definition: WPS8.cpp:152
TableRecursionGuard(const TableRecursionGuard &)=delete
Definition: WPSDebug.h:192
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: WPSEntry.h:115
float pageHeight() const
returns the page height, ie. paper size less margin (in inches)
Definition: WPS8.cpp:350
void setFormOrientation(const FormOrientation formOrientation)
Definition: WPSPageSpan.h:126
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
int version() const
Definition: WPSParser.h:56
void setMarginBottom(const double marginBottom)
Definition: WPSPageSpan.h:142
void initTypeMaps()
initializes the type map
Definition: WPS8.cpp:275
libwps::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: WPSParser.h:65
Definition: WPSPageSpan.h:39
int numColumns() const
returns the number of columns
Definition: WPS8.cpp:360
void setHeaderFooter(const HeaderFooterType type, const HeaderFooterOccurrence occurrence, WPSSubDocumentPtr &subDocument)
Definition: WPSPageSpan.cpp:111
int m_numColumns
the number of columns
Definition: WPS8.cpp:271
@ Page
Definition: WPSPosition.h:43
std::deque< int > m_sendingTables
Definition: WPS8.h:170
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
int m_idTable
identifier corresponding to a table (MCLD)
Definition: WPS8.cpp:162
bool hasType(std::string const &tp) const
returns true if the type entry == type
Definition: WPSEntry.h:136
int m_idObject
identifier corresponding to an object zone (EOBJ)
Definition: WPS8.cpp:161
int getTableSTRSId(int tableId) const
retrieve the strsId corresponding to a table ( mainly for debug)
Definition: WPS8.cpp:531
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:36
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: WPSPosition.h:40
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
int16_t read16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:71
WPSEntry m_entry
the entry
Definition: WPS8.cpp:75
void setListener(std::shared_ptr< WPSContentListener > const &listener)
set the listener
Definition: WPS8.cpp:379
bool readSYID(WPSEntry const &entry, std::vector< int > &listId)
parses a SYID zone
Definition: WPS8.cpp:1839
the class to store a color
Definition: libwps_internal.h:281
static bool readSPELLING(RVNGInputStreamPtr input, std::string const &oleName)
finds the structures of the Ole zone "SPELLING"
Definition: WPS8.cpp:2043
std::ostream & operator<<(std::ostream &o, Frame const &ft)
operator<< for a Frame
Definition: WPS8.cpp:175
void send(WPSEntry const &entry)
sends text corresponding to the entry to the listener (via WPS8Text)
Definition: WPS8.cpp:451
void setX(T xx)
resets the first element
Definition: libwps_internal.h:571
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: WPSEntry.h:120
Definition: WPSOLEStream.h:34
void setMarginLeft(const double marginLeft)
Definition: WPSPageSpan.h:130
Definition: WPSDebug.h:208
@ TEXT
Definition: WPS8.cpp:54
WPSPosition m_pos
the frame position
Definition: WPS8.cpp:159
bool createStructures()
tries to parse the main zone, ...
Definition: WPS8.cpp:608
SubDocument(RVNGInputStreamPtr const &input, WPS8Parser &pars, WPSEntry const &entry)
constructor for a text entry
Definition: WPS8.cpp:56
void setFormLength(const double formLength)
Definition: WPSPageSpan.h:118
T y() const
second element
Definition: libwps_internal.h:547
@ Object
Definition: WPS8.cpp:152
int m_idStrs
identifier corresponding to a text zone (STRS)
Definition: WPS8.cpp:160
static void setStream(RVNGInputStreamPtr)
Definition: WPSDebug.h:212
~WPS8Parser() final
destructor
Definition: WPS8.cpp:345
@ WDynamic
Definition: WPSPosition.h:45
void setOrigin(Vec2f const &orig)
sets the frame origin
Definition: WPSPosition.h:187
void parse(librevenge::RVNGTextInterface *documentInterface) final
called by WPSDocument to parse the file
Definition: WPS8.cpp:547
void setPage(int pg) const
sets the page
Definition: WPSPosition.h:182
WPS8Parser(RVNGInputStreamPtr &input, WPSHeaderPtr &header)
constructor
Definition: WPS8.cpp:329
std::shared_ptr< WPSContentListener > createListener(librevenge::RVNGTextInterface *interface)
creates the main listener
Definition: WPS8.cpp:387
Generated on Sat Sep 12 2020 08:41:48 for libwps by
doxygen 1.8.19