WPS8Graph Class Reference

the main class to read/store pictures in a Pc MS Works document v5-8 More...

#include <WPS8Graph.h>

Public Member Functions

 WPS8Graph (WPS8Parser &parser)
 constructor More...
 
 ~WPS8Graph ()
 destructor More...
 
void setListener (WPSContentListenerPtr &listen)
 sets the listener More...
 
void computePositions () const
 computes the final position of all found figures. More...
 
int numPages () const
 returns the number page where we find a picture. In practice, 0/1 More...
 
bool sendObject (WPSPosition const &pos, int id, bool ole)
 sends an object More...
 
bool sendIBGF (WPSPosition const &pos, int ibgfId)
 sends data corresponding to a ibgf entry on a given pos position More...
 
void sendObjects (int page, int pageToIgnore=-2)
 send all the objects of a given page: More...
 

Protected Member Functions

int version () const
 returns the file version More...
 
void sendBorder (int borderId)
 sends the border frames. More...
 
void storeObjects (std::map< int, WPSEmbeddedObject > const &objectsMap)
 adds a list of object More...
 
bool readStructures (RVNGInputStreamPtr const &input)
 finds all entries which correspond to some pictures, parses them and stores data More...
 
bool readPICT (RVNGInputStreamPtr const &input, WPSEntry const &entry)
 reads a PICT/MEF4 entry : reads uncompressed picture of sx*sy of rgb More...
 
bool readIBGF (RVNGInputStreamPtr const &input, WPSEntry const &entry)
 reads a IBGF zone: an entry to a background picture More...
 
bool readBDR (RVNGInputStreamPtr const &input, WPSEntry const &entry)
 parsed BDR/WBDR zone: a complex border formed with 8 pictures More...
 
libwps::DebugFileascii ()
 returns the debug file More...
 

Protected Attributes

WPSContentListenerPtr m_listener
 the listener More...
 
WPS8Parserm_mainParser
 the main parser More...
 
std::shared_ptr< WPS8GraphInternal::Statem_state
 the state More...
 
libwps::DebugFilem_asciiFile
 the ascii file More...
 

Private Member Functions

 WPS8Graph (WPS8Graph const &orig)=delete
 
WPS8Graphoperator= (WPS8Graph const &orig)=delete
 

Friends

class WPS8Parser
 

Detailed Description

the main class to read/store pictures in a Pc MS Works document v5-8

This class must be associated with a WPS8Parser. It contains code to read the BDR/WBDR, PICT/MEF4, IBGF entries and to store the pictures which are found in the other ole parts.

Note
As the pictures seems always be given with characters positions, many functions which exists to maintain the same structures that exist in the other WPS*MNGraph classes do almost nothing.

Constructor & Destructor Documentation

◆ WPS8Graph() [1/2]

WPS8Graph::WPS8Graph ( WPS8Parser parser)
explicit

constructor

◆ ~WPS8Graph()

WPS8Graph::~WPS8Graph ( )

destructor

◆ WPS8Graph() [2/2]

WPS8Graph::WPS8Graph ( WPS8Graph const &  orig)
privatedelete

Member Function Documentation

◆ ascii()

libwps::DebugFile& WPS8Graph::ascii ( )
inlineprotected

returns the debug file

Referenced by readBDR(), readIBGF(), and readPICT().

◆ computePositions()

void WPS8Graph::computePositions ( ) const

computes the final position of all found figures.

In reality, as all the pictures seemed to be given with characters positions, it does nothing

◆ numPages()

int WPS8Graph::numPages ( ) const

returns the number page where we find a picture. In practice, 0/1

◆ operator=()

WPS8Graph& WPS8Graph::operator= ( WPS8Graph const &  orig)
privatedelete

◆ readBDR()

bool WPS8Graph::readBDR ( RVNGInputStreamPtr const &  input,
WPSEntry const &  entry 
)
protected

parsed BDR/WBDR zone: a complex border formed with 8 pictures

Referenced by readStructures().

◆ readIBGF()

bool WPS8Graph::readIBGF ( RVNGInputStreamPtr const &  input,
WPSEntry const &  entry 
)
protected

reads a IBGF zone: an entry to a background picture

This small entry seems to contain only an identificator which pointed to a PICT Zone

Referenced by readStructures().

◆ readPICT()

bool WPS8Graph::readPICT ( RVNGInputStreamPtr const &  input,
WPSEntry const &  entry 
)
protected

reads a PICT/MEF4 entry : reads uncompressed picture of sx*sy of rgb

This kind of entry seems mainly used to store a background picture

Referenced by readStructures().

◆ readStructures()

bool WPS8Graph::readStructures ( RVNGInputStreamPtr const &  input)
protected

finds all entries which correspond to some pictures, parses them and stores data

◆ sendBorder()

void WPS8Graph::sendBorder ( int  borderId)
protected

sends the border frames.

Actually, sends the eight consecutive pictures which form a border on 3 consecutive lines

Referenced by sendObjects().

◆ sendIBGF()

bool WPS8Graph::sendIBGF ( WPSPosition const &  pos,
int  ibgfId 
)

sends data corresponding to a ibgf entry on a given pos position

◆ sendObject()

bool WPS8Graph::sendObject ( WPSPosition const &  pos,
int  id,
bool  ole 
)

sends an object

Parameters
posthe object position in the document
idthe object identificator
oleindicated if we look for objects coming from a ole zone or objects coming from a Pict zone

Referenced by sendIBGF().

◆ sendObjects()

void WPS8Graph::sendObjects ( int  page,
int  pageToIgnore = -2 
)

send all the objects of a given page:

Parameters
pageif page < 0, sends all the pictures which have not been used,
pageToIgnorepictures on this pages are not send

As all the pictures seemed to be given with characters positions, this function only does something if page < 0.

◆ setListener()

void WPS8Graph::setListener ( WPSContentListenerPtr listen)
inline

sets the listener

◆ storeObjects()

void WPS8Graph::storeObjects ( std::map< int, WPSEmbeddedObject > const &  objectsMap)
protected

adds a list of object

◆ version()

int WPS8Graph::version ( ) const
protected

returns the file version

Friends And Related Function Documentation

◆ WPS8Parser

friend class WPS8Parser
friend

Member Data Documentation

◆ m_asciiFile

libwps::DebugFile& WPS8Graph::m_asciiFile
protected

the ascii file

Referenced by ascii().

◆ m_listener

WPSContentListenerPtr WPS8Graph::m_listener
protected

the listener

Referenced by sendBorder(), sendObject(), sendObjects(), and setListener().

◆ m_mainParser

WPS8Parser& WPS8Graph::m_mainParser
protected

the main parser

Referenced by readStructures(), and version().

◆ m_state


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

Generated on Fri May 27 2022 03:07:01 for libwps by doxygen 1.8.14