LibreOffice Module oox (master)  1
Public Member Functions | Private Attributes | List of all members
oox::drawingml::chart::ChartDrawingFragment Class Referencefinal

Handler for a chart drawing fragment (c:userShapes root element). More...

#include <chartdrawingfragment.hxx>

Inheritance diagram for oox::drawingml::chart::ChartDrawingFragment:
[legend]
Collaboration diagram for oox::drawingml::chart::ChartDrawingFragment:
[legend]

Public Member Functions

 ChartDrawingFragment (::oox::core::XmlFilterBase &rFilter, const OUString &rFragmentPath, const css::uno::Reference< css::drawing::XShapes > &rxDrawPage, const css::awt::Size &rChartSize, const css::awt::Point &rShapesOffset, bool bOleSupport)
 
virtual ~ChartDrawingFragment () override
 
virtual ::oox::core::ContextHandlerRef onCreateContext (sal_Int32 nElement, const AttributeList &rAttribs) override
 Will be called to create a context handler for the passed element. More...
 
virtual void onCharacters (const OUString &rChars) override
 Will be called before a new child element starts, or if the current element is about to be left. More...
 
virtual void onEndElement () override
 Will be called when the current element is about to be left. More...
 
- Public Member Functions inherited from oox::core::FragmentHandler2
 FragmentHandler2 (XmlFilterBase &rFilter, const OUString &rFragmentPath, bool bEnableTrimSpace=true)
 
virtual ~FragmentHandler2 () override
 
 FragmentHandler2 (FragmentHandler2 const &)=default
 
 FragmentHandler2 (FragmentHandler2 &&)=default
 
FragmentHandler2operator= (FragmentHandler2 const &)=delete
 
FragmentHandler2operator= (FragmentHandler2 &&)=delete
 
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &rxAttribs) final override
 
virtual void SAL_CALL startFastElement (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &rxAttribs) final override
 
virtual void SAL_CALL characters (const OUString &rChars) final override
 
virtual void SAL_CALL endFastElement (sal_Int32 nElement) final override
 
virtual void SAL_CALL startDocument () override
 
virtual void SAL_CALL endDocument () override
 
virtual ContextHandlerRef createRecordContext (sal_Int32 nRecId, SequenceInputStream &rStrm) override
 
virtual void startRecord (sal_Int32 nRecId, SequenceInputStream &rStrm) override
 
virtual void endRecord (sal_Int32 nRecId) override
 
virtual void onStartElement (const AttributeList &rAttribs) override
 Will be called when a new element has been started. More...
 
virtual ContextHandlerRef onCreateRecordContext (sal_Int32 nRecId, SequenceInputStream &rStrm) override
 Will be called to create a context handler for the passed record. More...
 
virtual void onStartRecord (SequenceInputStream &rStrm) override
 Will be called when a new record block in a binary stream has been started. More...
 
virtual void onEndRecord () override
 Will be called when the current record block is about to be left. More...
 
virtual void initializeImport ()
 
virtual void finalizeImport ()
 
- Public Member Functions inherited from oox::core::FragmentHandler
 FragmentHandler (XmlFilterBase &rFilter, const OUString &rFragmentPath)
 
virtual ~FragmentHandler () override
 
 FragmentHandler (FragmentHandler const &)=default
 
 FragmentHandler (FragmentHandler &&)=default
 
FragmentHandleroperator= (FragmentHandler const &)=delete
 
FragmentHandleroperator= (FragmentHandler &&)=delete
 
css::uno::Reference< css::xml::sax::XFastContextHandler > getFastContextHandler ()
 Returns the com.sun.star.xml.sax.XFastContextHandler interface of this context. More...
 
virtual void SAL_CALL processingInstruction (const OUString &rTarget, const OUString &rData) override
 
virtual void SAL_CALL setDocumentLocator (const css::uno::Reference< css::xml::sax::XLocator > &rxLocator) override
 
virtual void SAL_CALL startFastElement (::sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual void SAL_CALL startUnknownElement (const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual void SAL_CALL endFastElement (::sal_Int32 Element) override
 
virtual void SAL_CALL endUnknownElement (const OUString &Namespace, const OUString &Name) override
 
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext (::sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createUnknownChildContext (const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual css::uno::Reference< css::io::XInputStream > openFragmentStream () const
 Opens the fragment stream referred by the own fragment path. More...
 
virtual const RecordInfogetRecordInfos () const
 
- Public Member Functions inherited from oox::core::ContextHandler2Helper
 ContextHandler2Helper (bool bEnableTrimSpace, XmlFilterBase &rFilter)
 
 ContextHandler2Helper (const ContextHandler2Helper &rParent)
 
virtual ~ContextHandler2Helper ()
 
sal_Int32 getCurrentElement () const
 Returns the identifier of the currently processed element. More...
 
sal_Int32 getCurrentElementWithMce () const
 Returns the identifier of the currently processed element - Including MCE root elements. More...
 
bool isCurrentElement (sal_Int32 nElement) const
 Returns true, if nElement contains the identifier of the currently processed element. More...
 
bool isCurrentElement (sal_Int32 nElement1, sal_Int32 nElement2) const
 Returns true, if either nElement1 or nElement2 contain the identifier of the currently processed element. More...
 
sal_Int32 getParentElement (sal_Int32 nCountBack=1) const
 Returns the identifier of the specified parent element. More...
 
bool isParentElement (sal_Int32 nElement, sal_Int32 nCountBack=1) const
 Returns true, if nElement contains the identifier of the specified parent element. More...
 
bool isRootElement () const
 Returns true, if the element currently processed is the root element of the context or fragment handler. More...
 

Private Attributes

css::uno::Reference< css::drawing::XShapes > mxDrawPage
 
::oox::drawingml::ShapePtr mxShape
 Drawing page of this sheet. More...
 
std::shared_ptr< ShapeAnchormxAnchor
 Current top-level shape. More...
 
EmuRectangle maChartRectEmu
 Current anchor of top-level shape. More...
 
bool mbOleSupport
 Position and size of the chart object for embedded shapes (in EMUs). More...
 

Additional Inherited Members

- Protected Types inherited from oox::core::ContextHandler2Helper
enum  MCE_STATE {
  MCE_STATE::Started,
  MCE_STATE::FoundChoice
}
 
- Protected Member Functions inherited from oox::core::FragmentHandler
 FragmentHandler (XmlFilterBase &rFilter, const OUString &rFragmentPath, RelationsRef xRelations)
 
- Protected Member Functions inherited from oox::core::ContextHandler2Helper
css::uno::Reference< css::xml::sax::XFastContextHandler > implCreateChildContext (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &rxAttribs)
 Must be called from createFastChildContext() in derived classes. More...
 
void implStartElement (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &rxAttribs)
 Must be called from startFastElement() in derived classes. More...
 
void implCharacters (std::u16string_view rChars)
 Must be called from characters() in derived classes. More...
 
void implEndElement (sal_Int32 nElement)
 Must be called from endFastElement() in derived classes. More...
 
ContextHandlerRef implCreateRecordContext (sal_Int32 nRecId, SequenceInputStream &rStrm)
 Must be called from createRecordContext() in derived classes. More...
 
void implStartRecord (sal_Int32 nRecId, SequenceInputStream &rStrm)
 Must be called from startRecord() in derived classes. More...
 
void implEndRecord (sal_Int32 nRecId)
 Must be called from endRecord() in derived classes. More...
 
bool prepareMceContext (sal_Int32 nElement, const AttributeList &rAttribs)
 
XmlFilterBasegetDocFilter () const
 
MCE_STATE getMCEState () const
 
void setMCEState (MCE_STATE aState)
 
void addMCEState (MCE_STATE aState)
 
void removeMCEState ()
 
bool isMCEStateEmpty () const
 
- Protected Attributes inherited from oox::core::ContextHandler2Helper
bool mbEnableTrimSpace
 True = trim whitespace in characters(). More...
 
XmlFilterBasemrFilter
 

Detailed Description

Handler for a chart drawing fragment (c:userShapes root element).

Definition at line 73 of file chartdrawingfragment.hxx.

Constructor & Destructor Documentation

oox::drawingml::chart::ChartDrawingFragment::ChartDrawingFragment ( ::oox::core::XmlFilterBase rFilter,
const OUString &  rFragmentPath,
const css::uno::Reference< css::drawing::XShapes > &  rxDrawPage,
const css::awt::Size &  rChartSize,
const css::awt::Point &  rShapesOffset,
bool  bOleSupport 
)
explicit
oox::drawingml::chart::ChartDrawingFragment::~ChartDrawingFragment ( )
overridevirtual

Definition at line 127 of file chartdrawingfragment.cxx.

Member Function Documentation

void oox::drawingml::chart::ChartDrawingFragment::onCharacters ( const OUString &  rChars)
overridevirtual

Will be called before a new child element starts, or if the current element is about to be left.

This helper function collects all text fragments received by the characters() function (such as encoded characters which are passed in separate calls to the characters() function), and passes the concatenated and trimmed string.

The current element identifier can be accessed with getCurrentElement() or isCurrentElement(). Used by OOXML import only.

Reimplemented from oox::core::FragmentHandler2.

Definition at line 196 of file chartdrawingfragment.cxx.

References oox::core::ContextHandler2Helper::getCurrentElement(), oox::core::ContextHandler2Helper::getParentElement(), oox::core::ContextHandler2Helper::isCurrentElement(), mxAnchor, x, and y.

ContextHandlerRef oox::drawingml::chart::ChartDrawingFragment::onCreateContext ( sal_Int32  nElement,
const AttributeList rAttribs 
)
overridevirtual

Will be called to create a context handler for the passed element.

Usually 'this' can be returned to improve performance by reusing the same instance to process several elements. Used by OOXML import only.

Reimplemented from oox::core::FragmentHandler2.

Definition at line 131 of file chartdrawingfragment.cxx.

References from, oox::core::ContextHandler2Helper::getCurrentElement(), mbOleSupport, mxAnchor, mxShape, to, x, oox::core::XML_ROOT_CONTEXT, and y.

void oox::drawingml::chart::ChartDrawingFragment::onEndElement ( )
overridevirtual

Will be called when the current element is about to be left.

The current element identifier can be accessed with getCurrentElement() or isCurrentElement(). Used by OOXML import only.

Reimplemented from oox::core::FragmentHandler2.

Definition at line 202 of file chartdrawingfragment.cxx.

References oox::drawingml::EmuSize::Height, oox::core::ContextHandler2Helper::isCurrentElement(), maChartRectEmu, mxAnchor, mxDrawPage, mxShape, oox::drawingml::PER_DEGREE, SAL_MAX_INT32, oox::drawingml::EmuSize::Width, oox::drawingml::EmuPoint::X, and oox::drawingml::EmuPoint::Y.

Member Data Documentation

EmuRectangle oox::drawingml::chart::ChartDrawingFragment::maChartRectEmu
private

Current anchor of top-level shape.

Definition at line 94 of file chartdrawingfragment.hxx.

Referenced by ChartDrawingFragment(), and onEndElement().

bool oox::drawingml::chart::ChartDrawingFragment::mbOleSupport
private

Position and size of the chart object for embedded shapes (in EMUs).

Definition at line 95 of file chartdrawingfragment.hxx.

Referenced by onCreateContext().

std::shared_ptr< ShapeAnchor > oox::drawingml::chart::ChartDrawingFragment::mxAnchor
private

Current top-level shape.

Definition at line 93 of file chartdrawingfragment.hxx.

Referenced by onCharacters(), onCreateContext(), and onEndElement().

css::uno::Reference< css::drawing::XShapes > oox::drawingml::chart::ChartDrawingFragment::mxDrawPage
private

Definition at line 91 of file chartdrawingfragment.hxx.

Referenced by onEndElement().

::oox::drawingml::ShapePtr oox::drawingml::chart::ChartDrawingFragment::mxShape
private

Drawing page of this sheet.

Definition at line 92 of file chartdrawingfragment.hxx.

Referenced by onCreateContext(), and onEndElement().


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