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

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

## Protected Attributes
WPSContentListenerPtr | m_listener
| the listener
WPS8Parser & | m_mainParser
| the main parser
std::shared_ptr< WPS8GraphInternal::State > | m_state
| the state
libwps::DebugFile & | m_asciiFile
| the ascii file

## Private Member Functions
| WPS8Graph (WPS8Graph const &orig)=delete
WPS8Graph & | operator= (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

Referenced by operator=(), and WPS8Graph().

## ◆ ~WPS8Graph()

WPS8Graph::~WPS8Graph | ( |  | ) |

destructor

## ◆ WPS8Graph() [2/2]

WPS8Graph::WPS8Graph | ( | WPS8Graph const & | orig | ) |
| private delete

## Member Function Documentation

## ◆ ascii()

libwps::DebugFile & WPS8Graph::ascii | ( |  | ) |
| inline protected

returns the debug file

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

## ◆ 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 | ) |
| private delete

## ◆ 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

  pos | the object position in the document
  id | the object identificator
  ole | indicated 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

  page | if page < 0, sends all the pictures which have not been used,
  pageToIgnore | pictures 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 Symbol Documentation

## ◆ WPS8Parser

friend class WPS8Parser
| friend

Referenced by WPS8Graph(), and WPS8Parser.

## Member Data Documentation

## ◆ m_asciiFile

libwps::DebugFile& WPS8Graph::m_asciiFile
| protected

the ascii file

Referenced by ascii(), and WPS8Graph().

## ◆ m_listener

WPSContentListenerPtr WPS8Graph::m_listener
| protected

the listener

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

## ◆ m_mainParser

WPS8Parser& WPS8Graph::m_mainParser
| protected

the main parser

Referenced by readStructures(), version(), and WPS8Graph().

## ◆ m_state

std::shared_ptr<WPS8GraphInternal::State> WPS8Graph::m_state
| mutable protected

the state

Referenced by computePositions(), numPages(), readBDR(), readIBGF(), readPICT(), sendBorder(), sendIBGF(), sendObject(), sendObjects(), storeObjects(), version(), and WPS8Graph().

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

- WPS8Graph.h
- WPS8Graph.cpp