libqxp::QXPContentCollector Class Reference

#include <QXPContentCollector.h>

Inheritance diagram for libqxp::QXPContentCollector:
libqxp::QXPCollector

Classes

class  CollectedObject
 
class  CollectedObjectInterface
 
struct  CollectedPage
 

Public Member Functions

 QXPContentCollector (librevenge::RVNGDrawingInterface *painter)
 
 ~QXPContentCollector ()
 
void startDocument () override
 
void endDocument () override
 
void startPage (const Page &page) override
 
void endPage () override
 
void collectDocumentProperties (const QXPDocumentProperties &props) override
 
void collectLine (const std::shared_ptr< Line > &line) override
 
void collectBox (const std::shared_ptr< Box > &box) override
 
void collectTextBox (const std::shared_ptr< TextBox > &box) override
 
void collectTextPath (const std::shared_ptr< TextPath > &textPath) override
 
void collectGroup (const std::shared_ptr< Group > &group) override
 
void collectText (const std::shared_ptr< Text > &text, const unsigned linkId) override
 
- Public Member Functions inherited from libqxp::QXPCollector
 QXPCollector ()=default
 
virtual ~QXPCollector ()=default
 
virtual void startDocument ()
 
virtual void endDocument ()
 
virtual void startPage (const Page &)
 
virtual void endPage ()
 
virtual void collectDocumentProperties (const QXPDocumentProperties &)
 
virtual void collectLine (const std::shared_ptr< Line > &)
 
virtual void collectBox (const std::shared_ptr< Box > &)
 
virtual void collectTextBox (const std::shared_ptr< TextBox > &)
 
virtual void collectTextPath (const std::shared_ptr< TextPath > &)
 
virtual void collectGroup (const std::shared_ptr< Group > &)
 
virtual void collectText (const std::shared_ptr< Text > &, const unsigned)
 

Private Types

template<typename T >
using ObjectHandler = std::function< void(const std::shared_ptr< T > &obj, const CollectedPage &)>
 
template<typename T , typename TThis >
using ObjectHandlerMember = std::function< void(TThis *, const std::shared_ptr< T > &obj, const CollectedPage &)>
 

Private Member Functions

 QXPContentCollector (const QXPContentCollector &other)=delete
 
QXPContentCollectoroperator= (const QXPContentCollector &other)=delete
 
CollectedPagegetInsertionPage (const std::shared_ptr< Object > &obj)
 
template<typename T >
std::shared_ptr< CollectedObject< T > > addObject (const std::shared_ptr< T > &obj, const ObjectHandlerMember< T, QXPContentCollector > &handler)
 
void draw (bool force=false)
 
void collectTextObject (const std::shared_ptr< TextObject > &textObj, CollectedPage &page)
 
void updateLinkedTexts ()
 
bool hasUnfinishedLinkedTexts ()
 
void drawLine (const std::shared_ptr< Line > &line, const CollectedPage &page)
 
void drawBox (const std::shared_ptr< Box > &box, const CollectedPage &page)
 
void drawRectangle (const std::shared_ptr< Box > &box, const CollectedPage &page)
 
void drawOval (const std::shared_ptr< Box > &oval, const CollectedPage &page)
 
void drawPolygon (const std::shared_ptr< Box > &polygon, const CollectedPage &page)
 
void drawBezierBox (const std::shared_ptr< Box > &box, const CollectedPage &page)
 
void drawTextBox (const std::shared_ptr< TextBox > &textbox, const CollectedPage &page)
 
void drawTextPath (const std::shared_ptr< TextPath > &textPath, const CollectedPage &page)
 
void drawText (const std::shared_ptr< Text > &text, const LinkedTextSettings &linkSettings)
 
void drawGroup (const std::shared_ptr< Group > &group, const CollectedPage &page)
 
void writeFill (librevenge::RVNGPropertyList &propList, const boost::optional< Fill > &fill)
 
void writeFrame (librevenge::RVNGPropertyList &propList, const Frame &frame, const bool runaround, const bool allowHairline=false)
 

Private Attributes

librevenge::RVNGDrawingInterface * m_painter
 
bool m_isDocumentStarted
 
bool m_isCollectingFacingPage
 
unsigned m_currentObjectIndex
 
std::vector< CollectedPagem_unprocessedPages
 
std::unordered_map< unsigned, std::shared_ptr< Text > > m_linkTextMap
 
std::unordered_map< unsigned, std::unordered_map< unsigned, std::shared_ptr< TextObject > > > m_linkIndexedTextObjectsMap
 
QXPDocumentProperties m_docProps
 

Member Typedef Documentation

◆ ObjectHandler

template<typename T >
using libqxp::QXPContentCollector::ObjectHandler = std::function<void(const std::shared_ptr<T> &obj, const CollectedPage &)>
private

◆ ObjectHandlerMember

template<typename T , typename TThis >
using libqxp::QXPContentCollector::ObjectHandlerMember = std::function<void(TThis *, const std::shared_ptr<T> &obj, const CollectedPage &)>
private

Constructor & Destructor Documentation

◆ QXPContentCollector() [1/2]

libqxp::QXPContentCollector::QXPContentCollector ( const QXPContentCollector other)
privatedelete

◆ QXPContentCollector() [2/2]

libqxp::QXPContentCollector::QXPContentCollector ( librevenge::RVNGDrawingInterface *  painter)

◆ ~QXPContentCollector()

libqxp::QXPContentCollector::~QXPContentCollector ( )

Member Function Documentation

◆ addObject()

template<typename T >
std::shared_ptr< CollectedObject< T > > libqxp::QXPContentCollector::addObject ( const std::shared_ptr< T > &  obj,
const ObjectHandlerMember< T, QXPContentCollector > &  handler 
)
inlineprivate

◆ collectBox()

void libqxp::QXPContentCollector::collectBox ( const std::shared_ptr< Box > &  box)
overridevirtual

Reimplemented from libqxp::QXPCollector.

◆ collectDocumentProperties()

void libqxp::QXPContentCollector::collectDocumentProperties ( const QXPDocumentProperties props)
overridevirtual

Reimplemented from libqxp::QXPCollector.

◆ collectGroup()

void libqxp::QXPContentCollector::collectGroup ( const std::shared_ptr< Group > &  group)
overridevirtual

Reimplemented from libqxp::QXPCollector.

◆ collectLine()

void libqxp::QXPContentCollector::collectLine ( const std::shared_ptr< Line > &  line)
overridevirtual

Reimplemented from libqxp::QXPCollector.

◆ collectText()

void libqxp::QXPContentCollector::collectText ( const std::shared_ptr< Text > &  text,
const unsigned  linkId 
)
overridevirtual

Reimplemented from libqxp::QXPCollector.

◆ collectTextBox()

void libqxp::QXPContentCollector::collectTextBox ( const std::shared_ptr< TextBox > &  box)
overridevirtual

Reimplemented from libqxp::QXPCollector.

◆ collectTextObject()

void libqxp::QXPContentCollector::collectTextObject ( const std::shared_ptr< TextObject > &  textObj,
CollectedPage page 
)
private

Referenced by collectTextBox(), and collectTextPath().

◆ collectTextPath()

void libqxp::QXPContentCollector::collectTextPath ( const std::shared_ptr< TextPath > &  textPath)
overridevirtual

Reimplemented from libqxp::QXPCollector.

◆ draw()

void libqxp::QXPContentCollector::draw ( bool  force = false)
private

Referenced by endDocument(), and endPage().

◆ drawBezierBox()

void libqxp::QXPContentCollector::drawBezierBox ( const std::shared_ptr< Box > &  box,
const CollectedPage page 
)
private

Referenced by drawBox().

◆ drawBox()

void libqxp::QXPContentCollector::drawBox ( const std::shared_ptr< Box > &  box,
const CollectedPage page 
)
private

Referenced by collectBox(), and drawTextBox().

◆ drawGroup()

void libqxp::QXPContentCollector::drawGroup ( const std::shared_ptr< Group > &  group,
const CollectedPage page 
)
private

Referenced by collectGroup().

◆ drawLine()

void libqxp::QXPContentCollector::drawLine ( const std::shared_ptr< Line > &  line,
const CollectedPage page 
)
private

Referenced by collectLine(), and drawTextPath().

◆ drawOval()

void libqxp::QXPContentCollector::drawOval ( const std::shared_ptr< Box > &  oval,
const CollectedPage page 
)
private

Referenced by drawBox().

◆ drawPolygon()

void libqxp::QXPContentCollector::drawPolygon ( const std::shared_ptr< Box > &  polygon,
const CollectedPage page 
)
private

Referenced by drawBox().

◆ drawRectangle()

void libqxp::QXPContentCollector::drawRectangle ( const std::shared_ptr< Box > &  box,
const CollectedPage page 
)
private

Referenced by drawBox().

◆ drawText()

void libqxp::QXPContentCollector::drawText ( const std::shared_ptr< Text > &  text,
const LinkedTextSettings linkSettings 
)
private

Referenced by drawTextBox(), and drawTextPath().

◆ drawTextBox()

void libqxp::QXPContentCollector::drawTextBox ( const std::shared_ptr< TextBox > &  textbox,
const CollectedPage page 
)
private

Referenced by collectTextBox().

◆ drawTextPath()

void libqxp::QXPContentCollector::drawTextPath ( const std::shared_ptr< TextPath > &  textPath,
const CollectedPage page 
)
private

Referenced by collectTextPath().

◆ endDocument()

void libqxp::QXPContentCollector::endDocument ( )
overridevirtual

◆ endPage()

void libqxp::QXPContentCollector::endPage ( )
overridevirtual

Reimplemented from libqxp::QXPCollector.

Referenced by endDocument().

◆ getInsertionPage()

QXPContentCollector::CollectedPage & libqxp::QXPContentCollector::getInsertionPage ( const std::shared_ptr< Object > &  obj)
private

◆ hasUnfinishedLinkedTexts()

bool libqxp::QXPContentCollector::hasUnfinishedLinkedTexts ( )
private

Referenced by draw().

◆ operator=()

QXPContentCollector & libqxp::QXPContentCollector::operator= ( const QXPContentCollector other)
privatedelete

◆ startDocument()

void libqxp::QXPContentCollector::startDocument ( )
overridevirtual

Reimplemented from libqxp::QXPCollector.

Referenced by libqxp::QXPParser::parse().

◆ startPage()

void libqxp::QXPContentCollector::startPage ( const Page page)
overridevirtual

Reimplemented from libqxp::QXPCollector.

◆ updateLinkedTexts()

void libqxp::QXPContentCollector::updateLinkedTexts ( )
private

Referenced by draw().

◆ writeFill()

void libqxp::QXPContentCollector::writeFill ( librevenge::RVNGPropertyList &  propList,
const boost::optional< Fill > &  fill 
)
private

◆ writeFrame()

void libqxp::QXPContentCollector::writeFrame ( librevenge::RVNGPropertyList &  propList,
const Frame frame,
const bool  runaround,
const bool  allowHairline = false 
)
private

Member Data Documentation

◆ m_currentObjectIndex

unsigned libqxp::QXPContentCollector::m_currentObjectIndex
private

Referenced by addObject(), and startPage().

◆ m_docProps

QXPDocumentProperties libqxp::QXPContentCollector::m_docProps
private

◆ m_isCollectingFacingPage

bool libqxp::QXPContentCollector::m_isCollectingFacingPage
private

Referenced by getInsertionPage(), and startPage().

◆ m_isDocumentStarted

bool libqxp::QXPContentCollector::m_isDocumentStarted
private

◆ m_linkIndexedTextObjectsMap

std::unordered_map<unsigned, std::unordered_map<unsigned, std::shared_ptr<TextObject> > > libqxp::QXPContentCollector::m_linkIndexedTextObjectsMap
private

◆ m_linkTextMap

std::unordered_map<unsigned, std::shared_ptr<Text> > libqxp::QXPContentCollector::m_linkTextMap
private

Referenced by collectText(), and collectTextObject().

◆ m_painter

librevenge::RVNGDrawingInterface* libqxp::QXPContentCollector::m_painter
private

◆ m_unprocessedPages

std::vector<CollectedPage> libqxp::QXPContentCollector::m_unprocessedPages
private

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

Generated for libqxp by doxygen 1.9.6