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
 

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

template<typename T >
using libqxp::QXPContentCollector::ObjectHandler = std::function<void(const std::shared_ptr<T> &obj, const CollectedPage &)>
private
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

libqxp::QXPContentCollector::QXPContentCollector ( const QXPContentCollector other)
privatedelete
libqxp::QXPContentCollector::QXPContentCollector ( librevenge::RVNGDrawingInterface *  painter)
libqxp::QXPContentCollector::~QXPContentCollector ( )

Member Function Documentation

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

Reimplemented from libqxp::QXPCollector.

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

Reimplemented from libqxp::QXPCollector.

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

Reimplemented from libqxp::QXPCollector.

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

Reimplemented from libqxp::QXPCollector.

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

Reimplemented from libqxp::QXPCollector.

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

Reimplemented from libqxp::QXPCollector.

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

Referenced by collectTextBox(), and collectTextPath().

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

Reimplemented from libqxp::QXPCollector.

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

Referenced by endDocument(), and endPage().

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

Referenced by drawBox().

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

Referenced by collectBox(), and drawTextBox().

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

Referenced by collectGroup().

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

Referenced by collectLine(), and drawTextPath().

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

Referenced by drawBox().

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

Referenced by drawBox().

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

Referenced by drawBox().

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

Referenced by drawTextBox(), and drawTextPath().

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

Referenced by collectTextBox().

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

Referenced by collectTextPath().

void libqxp::QXPContentCollector::endDocument ( )
overridevirtual
void libqxp::QXPContentCollector::endPage ( )
overridevirtual

Reimplemented from libqxp::QXPCollector.

Referenced by endDocument().

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

Referenced by draw().

QXPContentCollector& libqxp::QXPContentCollector::operator= ( const QXPContentCollector other)
privatedelete
void libqxp::QXPContentCollector::startDocument ( )
overridevirtual

Reimplemented from libqxp::QXPCollector.

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

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

Reimplemented from libqxp::QXPCollector.

void libqxp::QXPContentCollector::updateLinkedTexts ( )
private

Referenced by draw().

void libqxp::QXPContentCollector::writeFill ( librevenge::RVNGPropertyList &  propList,
const boost::optional< Fill > &  fill 
)
private
void libqxp::QXPContentCollector::writeFrame ( librevenge::RVNGPropertyList &  propList,
const Frame frame,
const bool  runaround,
const bool  allowHairline = false 
)
private

Member Data Documentation

unsigned libqxp::QXPContentCollector::m_currentObjectIndex
private

Referenced by addObject(), and startPage().

QXPDocumentProperties libqxp::QXPContentCollector::m_docProps
private
bool libqxp::QXPContentCollector::m_isCollectingFacingPage
private

Referenced by getInsertionPage(), and startPage().

bool libqxp::QXPContentCollector::m_isDocumentStarted
private
std::unordered_map<unsigned, std::unordered_map<unsigned, std::shared_ptr<TextObject> > > libqxp::QXPContentCollector::m_linkIndexedTextObjectsMap
private
std::unordered_map<unsigned, std::shared_ptr<Text> > libqxp::QXPContentCollector::m_linkTextMap
private

Referenced by collectText(), and collectTextObject().

librevenge::RVNGDrawingInterface* libqxp::QXPContentCollector::m_painter
private
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.8.10