LibreOffice Module xmloff (master)  1
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Attributes | List of all members
XMLShapeImportHelper Class Reference

#include <shapeimport.hxx>

Inheritance diagram for XMLShapeImportHelper:
[legend]
Collaboration diagram for XMLShapeImportHelper:
[legend]

Public Member Functions

 XMLShapeImportHelper (SvXMLImport &rImporter, const css::uno::Reference< css::frame::XModel > &rModel, SvXMLImportPropertyMapper *pExtMapper=nullptr)
 
virtual ~XMLShapeImportHelper () override
 
SvXMLStylesContextGetStylesContext () const
 
void SetStylesContext (SvXMLStylesContext *pNew)
 
SvXMLStylesContextGetAutoStylesContext () const
 
void SetAutoStylesContext (SvXMLStylesContext *pNew)
 
SvXMLImportPropertyMapperGetPropertySetMapper () const
 
SvXMLImportPropertyMapperGetPresPagePropsMapper () const
 
virtual void addShape (css::uno::Reference< css::drawing::XShape > &rShape, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > &rShapes)
 this function is called whenever the implementation classes like to add this new shape to the given XShapes. More...
 
virtual void finishShape (css::uno::Reference< css::drawing::XShape > &rShape, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > &rShapes)
 this function is called whenever the implementation classes have finished importing a shape to the given XShapes. More...
 
void addShapeEvents (SdXMLEventContextData &rData)
 
void pushGroupForPostProcessing (css::uno::Reference< css::drawing::XShapes > &rShapes)
 
void popGroupAndPostProcess ()
 
void shapeWithZIndexAdded (css::uno::Reference< css::drawing::XShape > const &rShape, sal_Int32 nZIndex)
 
void shapeRemoved (const css::uno::Reference< css::drawing::XShape > &rShape)
 Updates the z-order of other shapes to be consistent again, needed due to the removal of rShape. More...
 
void addShapeConnection (css::uno::Reference< css::drawing::XShape > const &rConnectorShape, bool bStart, const OUString &rDestShapeId, sal_Int32 nDestGlueId)
 
void addGluePointMapping (css::uno::Reference< css::drawing::XShape > const &xShape, sal_Int32 nSourceId, sal_Int32 nDestinnationId)
 adds a mapping for a gluepoint identifier from an xml file to the identifier created after inserting the new gluepoint into the core. More...
 
void moveGluePointMapping (const css::uno::Reference< css::drawing::XShape > &xShape, const sal_Int32 n)
 moves all current DestinationId's for rXShape by n More...
 
sal_Int32 getGluePointId (const css::uno::Reference< css::drawing::XShape > &xShape, sal_Int32 nSourceId)
 retrieves a mapping for a gluepoint identifier from the current xml file to the identifier created after inserting the new gluepoint into the core. More...
 
void startPage (css::uno::Reference< css::drawing::XShapes > const &rShapes)
 this method must be calling before the first shape is imported for the given page. More...
 
void endPage (css::uno::Reference< css::drawing::XShapes > const &rShapes)
 this method must be calling after the last shape is imported for the given page Calls to this method can be nested More...
 
void restoreConnections ()
 
void enableHandleProgressBar ()
 defines if the import should increment the progress bar or not More...
 
bool IsHandleProgressBarEnabled () const
 
bool IsPresentationShapesSupported () const
 queries the capability of the current model to create presentation shapes More...
 
XMLSdPropHdlFactoryGetSdPropHdlFactory () const
 
const rtl::Reference< XMLTableImport > & GetShapeTableImport ()
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Static Public Member Functions

static SvXMLShapeContextCreateGroupChildContext (SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > const &rShapes, bool bTemporaryShape=false)
 
static SvXMLShapeContextCreateFrameChildContext (SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > const &rShapes, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xFrameAttrList)
 
static css::uno::Reference< css::xml::sax::XFastContextHandler > CreateFrameChildContext (SvXMLImportContext *pThisContext, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
 
static SvXMLShapeContextCreate3DSceneChildContext (SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > const &rShapes)
 
static SvXMLImportPropertyMapperCreateShapePropMapper (const css::uno::Reference< css::frame::XModel > &rModel, SvXMLImport &rImport)
 creates a property mapper for external chaining More...
 
- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static voidoperator new (std::size_t nSize)
 
static voidoperator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 

Protected Attributes

SvXMLImportmrImporter
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Private Attributes

std::unique_ptr< XMLShapeImportHelperImplmpImpl
 
std::shared_ptr< XMLShapeImportPageContextImplmpPageContext
 
rtl::Reference< XMLSdPropHdlFactorympSdPropHdlFactory
 
rtl::Reference< SvXMLImportPropertyMappermpPropertySetMapper
 
rtl::Reference< SvXMLImportPropertyMappermpPresPagePropsMapper
 
rtl::Reference< SvXMLStylesContextmxStylesContext
 
rtl::Reference< SvXMLStylesContextmxAutoStylesContext
 
rtl::Reference< XMLTableImportmxShapeTableImport
 

Additional Inherited Members

- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 

Detailed Description

Definition at line 132 of file shapeimport.hxx.

Constructor & Destructor Documentation

XMLShapeImportHelper::XMLShapeImportHelper ( SvXMLImport rImporter,
const css::uno::Reference< css::frame::XModel > &  rModel,
SvXMLImportPropertyMapper pExtMapper = nullptr 
)
XMLShapeImportHelper::~XMLShapeImportHelper ( )
overridevirtual

Member Function Documentation

void XMLShapeImportHelper::addGluePointMapping ( css::uno::Reference< css::drawing::XShape > const &  xShape,
sal_Int32  nSourceId,
sal_Int32  nDestinnationId 
)

adds a mapping for a gluepoint identifier from an xml file to the identifier created after inserting the new gluepoint into the core.

The saved mappings can be retrieved by getGluePointId()

Definition at line 852 of file shapeimport.cxx.

References mpPageContext.

void XMLShapeImportHelper::addShape ( css::uno::Reference< css::drawing::XShape > &  rShape,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  xAttrList,
css::uno::Reference< css::drawing::XShapes > &  rShapes 
)
virtual

this function is called whenever the implementation classes like to add this new shape to the given XShapes.

Reimplemented in XMLTextShapeImportHelper.

Definition at line 457 of file shapeimport.cxx.

Referenced by XMLTextShapeImportHelper::addShape().

void XMLShapeImportHelper::addShapeConnection ( css::uno::Reference< css::drawing::XShape > const &  rConnectorShape,
bool  bStart,
const OUString &  rDestShapeId,
sal_Int32  nDestGlueId 
)

Definition at line 777 of file shapeimport.cxx.

References mpImpl.

void XMLShapeImportHelper::addShapeEvents ( SdXMLEventContextData rData)
SvXMLShapeContext * XMLShapeImportHelper::Create3DSceneChildContext ( SvXMLImport rImport,
sal_Int32  nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  xAttrList,
css::uno::Reference< css::drawing::XShapes > const &  rShapes 
)
static
static SvXMLShapeContext* XMLShapeImportHelper::CreateFrameChildContext ( SvXMLImport rImport,
sal_Int32  nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  xAttrList,
css::uno::Reference< css::drawing::XShapes > const &  rShapes,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  xFrameAttrList 
)
static
static css::uno::Reference< css::xml::sax::XFastContextHandler > XMLShapeImportHelper::CreateFrameChildContext ( SvXMLImportContext pThisContext,
sal_Int32  nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  xAttrList 
)
static
SvXMLShapeContext * XMLShapeImportHelper::CreateGroupChildContext ( SvXMLImport rImport,
sal_Int32  nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  xAttrList,
css::uno::Reference< css::drawing::XShapes > const &  rShapes,
bool  bTemporaryShape = false 
)
static
SvXMLImportPropertyMapper * XMLShapeImportHelper::CreateShapePropMapper ( const css::uno::Reference< css::frame::XModel > &  rModel,
SvXMLImport rImport 
)
static
void XMLShapeImportHelper::enableHandleProgressBar ( )

defines if the import should increment the progress bar or not

Definition at line 916 of file shapeimport.cxx.

References mpImpl.

void XMLShapeImportHelper::endPage ( css::uno::Reference< css::drawing::XShapes > const &  rShapes)

this method must be calling after the last shape is imported for the given page Calls to this method can be nested

this method must be calling after the last shape is imported for the given page

Definition at line 904 of file shapeimport.cxx.

References mpPageContext, restoreConnections(), and SAL_WARN_IF.

void XMLShapeImportHelper::finishShape ( css::uno::Reference< css::drawing::XShape > &  rShape,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  xAttrList,
css::uno::Reference< css::drawing::XShapes > &  rShapes 
)
virtual

this function is called whenever the implementation classes have finished importing a shape to the given XShapes.

The shape is already inserted into its XShapes and all properties and styles are set.

Definition at line 478 of file shapeimport.cxx.

References SvXMLImport::IsShapePositionInHoriL2R(), and mrImporter.

SvXMLStylesContext* XMLShapeImportHelper::GetAutoStylesContext ( ) const
inline

Definition at line 182 of file shapeimport.hxx.

sal_Int32 XMLShapeImportHelper::getGluePointId ( const css::uno::Reference< css::drawing::XShape > &  xShape,
sal_Int32  nSourceId 
)

retrieves a mapping for a gluepoint identifier from the current xml file to the identifier created after inserting the new gluepoint into the core.

The mapping must be initialized first with addGluePointMapping()

Definition at line 878 of file shapeimport.cxx.

References mpPageContext.

Referenced by restoreConnections().

SvXMLImportPropertyMapper* XMLShapeImportHelper::GetPresPagePropsMapper ( ) const
inline

Definition at line 187 of file shapeimport.hxx.

SvXMLImportPropertyMapper* XMLShapeImportHelper::GetPropertySetMapper ( ) const
inline

Definition at line 186 of file shapeimport.hxx.

XMLSdPropHdlFactory* XMLShapeImportHelper::GetSdPropHdlFactory ( ) const
inline

Definition at line 256 of file shapeimport.hxx.

const rtl::Reference< XMLTableImport > & XMLShapeImportHelper::GetShapeTableImport ( )

Definition at line 932 of file shapeimport.cxx.

References SvXMLImport::GetModel(), mrImporter, mxShapeTableImport, and xFactory.

SvXMLStylesContext* XMLShapeImportHelper::GetStylesContext ( ) const
inline

Definition at line 180 of file shapeimport.hxx.

bool XMLShapeImportHelper::IsHandleProgressBarEnabled ( ) const

Definition at line 921 of file shapeimport.cxx.

References mpImpl.

bool XMLShapeImportHelper::IsPresentationShapesSupported ( ) const

queries the capability of the current model to create presentation shapes

Definition at line 927 of file shapeimport.cxx.

References mpImpl.

void XMLShapeImportHelper::moveGluePointMapping ( const css::uno::Reference< css::drawing::XShape > &  xShape,
const sal_Int32  n 
)

moves all current DestinationId's for rXShape by n

moves all current DestinationId's by n

Definition at line 860 of file shapeimport.cxx.

References mpPageContext.

void XMLShapeImportHelper::popGroupAndPostProcess ( )
void XMLShapeImportHelper::pushGroupForPostProcessing ( css::uno::Reference< css::drawing::XShapes > &  rShapes)

Definition at line 687 of file shapeimport.cxx.

References mpImpl.

Referenced by XMLTextShapeImportHelper::XMLTextShapeImportHelper().

void XMLShapeImportHelper::restoreConnections ( )
void XMLShapeImportHelper::SetAutoStylesContext ( SvXMLStylesContext pNew)

Definition at line 235 of file shapeimport.cxx.

References mxAutoStylesContext.

void XMLShapeImportHelper::SetStylesContext ( SvXMLStylesContext pNew)

Definition at line 230 of file shapeimport.cxx.

References mxStylesContext.

void XMLShapeImportHelper::shapeRemoved ( const css::uno::Reference< css::drawing::XShape > &  rShape)

Updates the z-order of other shapes to be consistent again, needed due to the removal of rShape.

Definition at line 746 of file shapeimport.cxx.

References mpImpl.

void XMLShapeImportHelper::shapeWithZIndexAdded ( css::uno::Reference< css::drawing::XShape > const &  rShape,
sal_Int32  nZIndex 
)

Definition at line 724 of file shapeimport.cxx.

References mpImpl.

void XMLShapeImportHelper::startPage ( css::uno::Reference< css::drawing::XShapes > const &  rShapes)

this method must be calling before the first shape is imported for the given page.

this method must be calling before the first shape is imported for the given page

Calls to this method can be nested

Definition at line 895 of file shapeimport.cxx.

References mpPageContext.

Member Data Documentation

std::unique_ptr<XMLShapeImportHelperImpl> XMLShapeImportHelper::mpImpl
private
std::shared_ptr<XMLShapeImportPageContextImpl> XMLShapeImportHelper::mpPageContext
private
rtl::Reference<SvXMLImportPropertyMapper> XMLShapeImportHelper::mpPresPagePropsMapper
private

Definition at line 141 of file shapeimport.hxx.

Referenced by XMLShapeImportHelper(), and ~XMLShapeImportHelper().

rtl::Reference<SvXMLImportPropertyMapper> XMLShapeImportHelper::mpPropertySetMapper
private

Definition at line 140 of file shapeimport.hxx.

Referenced by XMLShapeImportHelper(), and ~XMLShapeImportHelper().

rtl::Reference<XMLSdPropHdlFactory> XMLShapeImportHelper::mpSdPropHdlFactory
private

Definition at line 139 of file shapeimport.hxx.

Referenced by XMLShapeImportHelper(), and ~XMLShapeImportHelper().

SvXMLImport& XMLShapeImportHelper::mrImporter
protected

Definition at line 150 of file shapeimport.hxx.

Referenced by finishShape(), GetShapeTableImport(), and restoreConnections().

rtl::Reference<SvXMLStylesContext> XMLShapeImportHelper::mxAutoStylesContext
private

Definition at line 145 of file shapeimport.hxx.

Referenced by SetAutoStylesContext(), and ~XMLShapeImportHelper().

rtl::Reference< XMLTableImport > XMLShapeImportHelper::mxShapeTableImport
private

Definition at line 147 of file shapeimport.hxx.

Referenced by GetShapeTableImport().

rtl::Reference<SvXMLStylesContext> XMLShapeImportHelper::mxStylesContext
private

Definition at line 144 of file shapeimport.hxx.

Referenced by SetStylesContext(), and ~XMLShapeImportHelper().


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