WNText Class Reference

the main class to read the text part of writenow file More...

#include <WNText.hxx>

Public Member Functions

 WNText (WNParser &parser)
 constructor More...
 
virtual ~WNText ()
 destructor More...
 
int version () const
 returns the file version More...
 
int numPages () const
 returns the number of pages More...
 
WNEntry getHeader () const
 returns the header entry (if defined) More...
 
WNEntry getFooter () const
 returns the footer entry (if defined) More...
 

Protected Member Functions

bool createZones ()
 finds the different text zones More...
 
void flushExtra ()
 sends the data which have not yet been sent to the listener More...
 
bool parseZone (WNEntry const &entry, std::vector< WNEntry > &listData)
 try to read the text zone ( list of entries ) and to create the text data zone More...
 
shared_ptr
< WNTextInternal::ContentZones
parseContent (WNEntry const &entry)
 parse a text data zone ( and create the associated structure ) More...
 
void sendZone (int id)
 send all the content zone of a zone defined by id 0: main, 1 header/footer, 2: footnote More...
 
bool send (WNEntry const &entry)
 send the text to the listener More...
 
bool send (std::vector< WNTextInternal::ContentZone > &listZones, std::vector< shared_ptr< WNTextInternal::ContentZones > > &footnoteList, WNTextInternal::Paragraph &ruler)
 send the text to the listener More...
 
void setProperty (WNTextInternal::Paragraph const &ruler)
 sends a paragraph property to the listener More...
 
bool readFontNames (WNEntry const &entry)
 try to read the fonts zone More...
 
bool readFont (MWAWInputStream &input, bool inStyle, WNTextInternal::Font &font)
 read a font More...
 
bool readParagraph (MWAWInputStream &input, WNTextInternal::Paragraph &ruler)
 read a paragraph format More...
 
bool readToken (MWAWInputStream &input, WNTextInternal::Token &token)
 read a token More...
 
bool readTokenV2 (MWAWInputStream &input, WNTextInternal::Token &token)
 read a token (v2) More...
 
bool readTable (MWAWInputStream &input, WNTextInternal::TableData &table)
 read a table frame (checkme) More...
 
bool readStyles (WNEntry const &entry)
 try to read the styles zone More...
 

Protected Attributes

MWAWParserStatePtr m_parserState
 the parser state More...
 
shared_ptr< WNTextInternal::Statem_state
 the state More...
 
shared_ptr< WNEntryManagerm_entryManager
 the list of entry More...
 
WNParserm_mainParser
 the main parser; More...
 

Private Member Functions

 WNText (WNText const &orig)
 
WNTextoperator= (WNText const &orig)
 

Friends

class WNParser
 
struct WNTextInternal::Cell
 

Detailed Description

the main class to read the text part of writenow file

Constructor & Destructor Documentation

WNText::WNText ( WNParser parser)

constructor

WNText::~WNText ( )
virtual

destructor

WNText::WNText ( WNText const &  orig)
private

Member Function Documentation

bool WNText::createZones ( )
protected

finds the different text zones

we can now create the content zone and type them

void WNText::flushExtra ( )
protected

sends the data which have not yet been sent to the listener

WNEntry WNText::getFooter ( ) const

returns the footer entry (if defined)

WNEntry WNText::getHeader ( ) const

returns the header entry (if defined)

int WNText::numPages ( ) const

returns the number of pages

WNText& WNText::operator= ( WNText const &  orig)
private
shared_ptr< WNTextInternal::ContentZones > WNText::parseContent ( WNEntry const &  entry)
protected

parse a text data zone ( and create the associated structure )

Referenced by createZones().

bool WNText::parseZone ( WNEntry const &  entry,
std::vector< WNEntry > &  listData 
)
protected

try to read the text zone ( list of entries ) and to create the text data zone

Referenced by createZones().

bool WNText::readFont ( MWAWInputStream input,
bool  inStyle,
WNTextInternal::Font font 
)
protected

read a font

Referenced by send().

bool WNText::readFontNames ( WNEntry const &  entry)
protected

try to read the fonts zone

Referenced by createZones().

bool WNText::readParagraph ( MWAWInputStream input,
WNTextInternal::Paragraph ruler 
)
protected

read a paragraph format

Referenced by send().

bool WNText::readStyles ( WNEntry const &  entry)
protected

try to read the styles zone

Referenced by createZones().

bool WNText::readTable ( MWAWInputStream input,
WNTextInternal::TableData table 
)
protected

read a table frame (checkme)

Referenced by send().

bool WNText::readToken ( MWAWInputStream input,
WNTextInternal::Token token 
)
protected

read a token

Referenced by send().

bool WNText::readTokenV2 ( MWAWInputStream input,
WNTextInternal::Token token 
)
protected

read a token (v2)

Referenced by send().

bool WNText::send ( WNEntry const &  entry)
protected

send the text to the listener

send data to the listener

Referenced by WNTextInternal::Cell::sendContent(), and sendZone().

bool WNText::send ( std::vector< WNTextInternal::ContentZone > &  listZones,
std::vector< shared_ptr< WNTextInternal::ContentZones > > &  footnoteList,
WNTextInternal::Paragraph ruler 
)
protected

send the text to the listener

void WNText::sendZone ( int  id)
protected

send all the content zone of a zone defined by id 0: main, 1 header/footer, 2: footnote

Referenced by flushExtra().

void WNText::setProperty ( WNTextInternal::Paragraph const &  ruler)
protected

sends a paragraph property to the listener

Referenced by send().

int WNText::version ( ) const

returns the file version

Referenced by parseContent(), parseZone(), readFont(), readParagraph(), and send().

Friends And Related Function Documentation

friend class WNParser
friend
friend struct WNTextInternal::Cell
friend

Member Data Documentation

shared_ptr<WNEntryManager> WNText::m_entryManager
protected

the list of entry

Referenced by createZones().

WNParser* WNText::m_mainParser
protected
MWAWParserStatePtr WNText::m_parserState
protected

The documentation for this class was generated from the following files:

Generated on Tue Mar 10 2015 17:32:10 for libmwaw by doxygen 1.8.5