This class parses Works version 2000 through 8. More...
#include <WPS8.h>
Public Member Functions | |
WPS8Parser (RVNGInputStreamPtr &input, WPSHeaderPtr &header) | |
constructor More... | |
~WPS8Parser () | |
destructor More... | |
void | parse (librevenge::RVNGTextInterface *documentInterface) |
called by WPSDocument to parse the file More... | |
![]() | |
WPSParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header) | |
virtual | ~WPSParser () |
Protected Member Functions | |
bool | checkInFile (long pos) |
return true if the pos is in the file, update the file size if need More... | |
void | newPage (int number) |
adds a new page More... | |
void | setListener (shared_ptr< WPSContentListener > listener) |
set the listener More... | |
shared_ptr< WPSContentListener > | createListener (librevenge::RVNGTextInterface *interface) |
creates the main listener More... | |
bool | createStructures () |
tries to parse the main zone, ... More... | |
bool | createOLEStructures () |
tries to parse the different OLE zones ( except the main zone ) More... | |
float | pageHeight () const |
returns the page height, ie. paper size less margin (in inches) More... | |
float | pageWidth () const |
returns the page width, ie. paper size less margin (in inches) More... | |
int | numColumns () const |
returns the number of columns More... | |
void | sendPageFrames () |
send the frames which corresponds to a given page to the listener More... | |
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 More... | |
void | send (WPSEntry const &entry) |
sends text corresponding to the entry to the listener (via WPS8Text) More... | |
void | send (int strsId) |
sends text corresponding to the strsId to the listener (via WPS8Text) More... | |
void | sendTextInCell (int strsId, int cellId) |
send the text of a cell to a listener (via WPS8Text) More... | |
bool | sendTable (Vec2f const &size, int objectId) |
sends a table as a character with given size ( via its WPS8Table ) More... | |
int | getTableSTRSId (int tableId) const |
retrieve the strsId corresponding to a table ( mainly for debug) More... | |
bool | sendObject (Vec2f const &size, int objectId, bool ole) |
sends an object as a character with given size (via its WPS8Graph ) More... | |
bool | parseHeaderIndexEntry () |
parses an index entry More... | |
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 nothing More... | |
bool | parseHeaderIndex () |
tries to find the beginning of the list of indices, then try to find all entries in this list. More... | |
bool | readDocProperties (WPSEntry const &entry, WPSPageSpan &page) |
reads the DOP zone: the document properties More... | |
bool | readFRAM (WPSEntry const &entry) |
reads the FRAM zone: ie a zone which can contains textbox, picture, ... More... | |
bool | readFRCD (WPSEntry const &entry) |
reads the FRCD zone: ie a zone which can contains mailmerge data ? More... | |
bool | readSYID (WPSEntry const &entry, std::vector< int > &listId) |
parses a SYID zone More... | |
bool | readWNPR (WPSEntry const &entry) |
parses the WNPR zone : a zone which seems to contain the printer preferences. More... | |
bool | readSPELLING (RVNGInputStreamPtr input, std::string const &oleName) |
finds the structures of the Ole zone "SPELLING" More... | |
![]() | |
RVNGInputStreamPtr & | getInput () |
RVNGInputStreamPtr | getFileInput () |
WPSHeaderPtr & | getHeader () |
int | version () const |
void | setVersion (int vers) |
libwps::DebugFile & | ascii () |
a DebugFile used to write what we recognize when we parse the document More... | |
NameMultiMap & | getNameEntryMap () |
NameMultiMap const & | getNameEntryMap () const |
Protected Attributes | |
shared_ptr< WPSContentListener > | m_listener |
shared_ptr< WPS8Graph > | m_graphParser |
the graph parser More... | |
shared_ptr< WPS8Table > | m_tableParser |
the table parser More... | |
shared_ptr< WPS8Text > | m_textParser |
the text parser More... | |
shared_ptr < WPS8ParserInternal::State > | m_state |
the internal state More... | |
Private Attributes | |
std::deque< int > | m_sendingTables |
Friends | |
class | WPS8ParserInternal::SubDocument |
class | WPS8Graph |
class | WPS8Table |
class | WPS8Text |
Additional Inherited Members | |
![]() | |
typedef std::multimap < std::string, WPSEntry > | NameMultiMap |
a map to retrieve a file entry by name More... | |
This class parses Works version 2000 through 8.
WPS8Parser::WPS8Parser | ( | RVNGInputStreamPtr & | input, |
WPSHeaderPtr & | header | ||
) |
constructor
WPS8Parser::~WPS8Parser | ( | ) |
destructor
|
protected |
return true if the pos is in the file, update the file size if need
|
protected |
creates the main listener
Referenced by parse().
|
protected |
tries to parse the different OLE zones ( except the main zone )
Referenced by parse().
|
protected |
tries to parse the main zone, ...
Referenced by parse().
|
protected |
retrieve the strsId corresponding to a table ( mainly for debug)
Referenced by WPS8Table::flushExtra().
|
protected |
adds a new page
Referenced by WPS8Text::readText().
|
protected |
returns the number of columns
Referenced by WPS8Text::readText().
|
protected |
returns the page height, ie. paper size less margin (in inches)
|
protected |
returns the page width, ie. paper size less margin (in inches)
|
virtual |
called by WPSDocument to parse the file
Implements WPSParser.
|
protected |
tries to find the beginning of the list of indices, then try to find all entries in this list.
In the header, parse the index to the different sections of the CONTENTS stream.
Stores result in nameTable, offsetTable
Referenced by createStructures().
|
protected |
parses an index entry
Referenced by parseHeaderIndex().
|
protected |
function which is called, if some data remains after the basic content of an entry: by default does nothing
Referenced by parseHeaderIndexEntry().
|
protected |
reads the DOP zone: the document properties
Contains the page dimension, the background picture, ...
Referenced by createStructures().
|
protected |
reads the FRAM zone: ie a zone which can contains textbox, picture, ...
Frame zone: ie a zone which can contains text, picture, ...
and have some borders
and have some border
Referenced by createStructures().
|
protected |
reads the FRCD zone: ie a zone which can contains mailmerge data ?
try to read a frame XXX database
Referenced by createStructures().
|
protected |
finds the structures of the Ole zone "SPELLING"
Referenced by createOLEStructures().
|
protected |
parses a SYID zone
an unknown zone which seems to have the same number of entries than the text zones (STRS)
Referenced by createStructures().
|
protected |
parses the WNPR zone : a zone which seems to contain the printer preferences.
Referenced by createStructures().
|
protected |
sends text corresponding to the entry to the listener (via WPS8Text)
Referenced by WPS8ParserInternal::SubDocument::parse(), send(), and WPS8Table::sendTable().
|
protected |
sends text corresponding to the strsId to the listener (via WPS8Text)
|
protected |
sends an object as a character with given size (via its WPS8Graph )
size | the size of the object in the document pages |
objectId | the object identificator |
ole | indicated if we look for objects coming from a ole zone or objects coming from a Pict zone |
Referenced by WPS8Text::readText().
|
protected |
send the frames which corresponds to a given page to the listener
Referenced by parse().
|
protected |
sends a table as a character with given size ( via its WPS8Table )
Referenced by WPS8Text::readText().
|
protected |
creates a subdocument to send a textbox which correspond to the strsid text zone
Referenced by sendPageFrames(), WPS8Table::sendTable(), and sendTable().
|
protected |
send the text of a cell to a listener (via WPS8Text)
Referenced by WPS8Table::sendTextInCell().
|
protected |
set the listener
Referenced by parse().
|
friend |
Referenced by WPS8Parser().
|
friend |
|
friend |
Referenced by WPS8Parser().
|
friend |
Referenced by WPS8Parser().
|
protected |
the graph parser
Referenced by createListener(), createOLEStructures(), createStructures(), newPage(), parse(), sendObject(), sendPageFrames(), setListener(), and WPS8Parser().
|
protected |
Referenced by newPage(), parse(), sendPageFrames(), sendTextBox(), and setListener().
|
private |
Referenced by sendTable().
|
protected |
the internal state
Referenced by checkInFile(), createListener(), createStructures(), getTableSTRSId(), newPage(), numColumns(), pageHeight(), pageWidth(), readDocProperties(), readFRAM(), sendPageFrames(), sendTable(), and WPS8Parser().
|
protected |
the table parser
Referenced by createListener(), createStructures(), parse(), sendTable(), setListener(), and WPS8Parser().
|
protected |
the text parser
Referenced by createListener(), createStructures(), parse(), parseHeaderIndexEntryEnd(), readFRAM(), readFRCD(), send(), sendTextBox(), sendTextInCell(), setListener(), and WPS8Parser().