20 #ifndef INCLUDED_SDEXT_SOURCE_PDFIMPORT_INC_GENERICELEMENTS_HXX
21 #define INCLUDED_SDEXT_SOURCE_PDFIMPORT_INC_GENERICELEMENTS_HXX
26 #include <com/sun/star/task/XStatusIndicator.hpp>
27 #include <com/sun/star/uno/XComponentContext.hpp>
29 #include <rtl/ustring.hxx>
30 #include <rtl/ustrbuf.hxx>
50 const css::uno::Reference<
51 css::task::XStatusIndicator>& _xStatusIndicator,
52 css::uno::Reference< css::uno::XComponentContext >
const & xContext)
79 pParent->
Children.emplace_back(
this );
95 #if OSL_DEBUG_LEVEL > 0
102 static void setParent( std::list<std::unique_ptr<Element>>::iterator
const & el,
Element* pNewParent );
219 #if OSL_DEBUG_LEVEL > 0
250 bool resolveHyperlink(
const std::list<std::unique_ptr<Element>>::iterator& link_it, std::list<std::unique_ptr<Element>>& rElements );
291 {
return new TextElement( pParent, nGCId, nFontId ); }
310 {
return std::make_shared<DocumentElement>(); }
virtual void visitedBy(ElementTreeVisitor &, const std::list< std::unique_ptr< Element > >::const_iterator &) override
To be implemented by every tree node that needs to be visitable.
virtual void visitedBy(ElementTreeVisitor &, const std::list< std::unique_ptr< Element > >::const_iterator &) override
To be implemented by every tree node that needs to be visitable.
basegfx::B2DPolyPolygon PolyPoly
virtual void emitStructure(int nLevel)
HyperlinkElement(Element *pParent, const OUString &rURI)
bool isSingleLined(PDFIProcessor const &rProc) const
ParagraphElement(Element *pParent)
void applyToChildren(ElementTreeVisitor &)
Apply visitor to all children.
static ParagraphElement * createParagraphElement(Element *pParent)
GraphicalElement(Element *pParent, sal_Int32 nGCId)
virtual void visitedBy(ElementTreeVisitor &, const std::list< std::unique_ptr< Element > >::const_iterator &) override
To be implemented by every tree node that needs to be visitable.
Main entry from the parser.
virtual void visitedBy(ElementTreeVisitor &, const std::list< std::unique_ptr< Element > >::const_iterator &rParentIt)=0
To be implemented by every tree node that needs to be visitable.
PolyPolyElement(Element *pParent, sal_Int32 nGCId, const basegfx::B2DPolyPolygon &rPolyPoly, sal_Int8 nAction)
virtual void visitedBy(ElementTreeVisitor &, const std::list< std::unique_ptr< Element > >::const_iterator &) override
To be implemented by every tree node that needs to be visitable.
virtual void emitStructure(int nLevel) override
PageElement(Element *pParent, sal_Int32 nPageNr)
static TextElement * createTextElement(Element *pParent, sal_Int32 nGCId, sal_Int32 nFontId)
PDFIProcessor & rProcessor
std::unique_ptr< Element > HeaderElement
TextElement * getFirstTextChild() const
virtual ~DocumentElement() override
DrawElement(Element *pParent, sal_Int32 nGCId)
std::unique_ptr< Element > FooterElement
ImageElement(Element *pParent, sal_Int32 nGCId, ImageId nImage)
virtual void visitedBy(ElementTreeVisitor &, const std::list< std::unique_ptr< Element > >::const_iterator &) override
To be implemented by every tree node that needs to be visitable.
To be visited by all tree element types.
virtual void visitedBy(ElementTreeVisitor &, const std::list< std::unique_ptr< Element > >::const_iterator &rParentIt) override
To be implemented by every tree node that needs to be visitable.
static PageElement * createPageElement(Element *pParent, sal_Int32 nPageNr)
css::uno::Reference< css::task::XStatusIndicator > xStatusIndicator
std::list< std::unique_ptr< Element > > Children
Element(Element *pParent)
virtual ~PageElement() override
static FrameElement * createFrameElement(Element *pParent, sal_Int32 nGCId)
void resolveFontStyles(PDFIProcessor const &rProc)
bool resolveHyperlink(const std::list< std::unique_ptr< Element >>::iterator &link_it, std::list< std::unique_ptr< Element >> &rElements)
virtual void visitedBy(ElementTreeVisitor &, const std::list< std::unique_ptr< Element > >::const_iterator &rParentIt) override
To be implemented by every tree node that needs to be visitable.
void updateGeometryWith(const Element *pMergeFrom)
Union element geometry with given element.
static PolyPolyElement * createPolyPolyElement(Element *pParent, sal_Int32 nGCId, const basegfx::B2DPolyPolygon &rPolyPoly, sal_Int8 nAction)
void resolveUnderlines(PDFIProcessor const &rProc)
static void setParent(std::list< std::unique_ptr< Element >>::iterator const &el, Element *pNewParent)
el must be a valid dereferenceable iterator of el->Parent->Children pNewParent must not be NULL ...
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual void visitedBy(ElementTreeVisitor &, const std::list< std::unique_ptr< Element > >::const_iterator &rParentIt) override
To be implemented by every tree node that needs to be visitable.
FrameElement(Element *pParent, sal_Int32 nGCId)
static ImageElement * createImageElement(Element *pParent, sal_Int32 nGCId, ImageId nImage)
double getLineHeight(PDFIProcessor &rProc) const
virtual void visitedBy(ElementTreeVisitor &, const std::list< std::unique_ptr< Element > >::const_iterator &) override
To be implemented by every tree node that needs to be visitable.
EmitContext(XmlEmitter &_rEmitter, StyleContainer &_rStyles, ImageContainer &_rImages, PDFIProcessor &_rProcessor, const css::uno::Reference< css::task::XStatusIndicator > &_xStatusIndicator, css::uno::Reference< css::uno::XComponentContext > const &xContext)
static HyperlinkElement * createHyperlinkElement(Element *pParent, const OUString &rURI)
static std::shared_ptr< DocumentElement > createDocumentElement()
TextElement(Element *pParent, sal_Int32 nGCId, sal_Int32 nFontId)