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 void * operator new (std::size_t nSize)
 
static void * operator 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

SvXMLImport & mrImporter
 
- 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::XMLShapeImportHelper ( SvXMLImport &  rImporter,
const css::uno::Reference< css::frame::XModel > &  rModel,
SvXMLImportPropertyMapper pExtMapper = nullptr 
)

◆ ~XMLShapeImportHelper()

XMLShapeImportHelper::~XMLShapeImportHelper ( )
overridevirtual

Member Function Documentation

◆ addGluePointMapping()

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 854 of file shapeimport.cxx.

References mpPageContext.

◆ addShape()

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 455 of file shapeimport.cxx.

References u.

Referenced by XMLTextShapeImportHelper::addShape().

◆ addShapeConnection()

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

Definition at line 779 of file shapeimport.cxx.

References mpImpl.

◆ addShapeEvents()

void XMLShapeImportHelper::addShapeEvents ( SdXMLEventContextData rData)

◆ Create3DSceneChildContext()

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

◆ CreateFrameChildContext() [1/2]

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

◆ CreateFrameChildContext() [2/2]

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

◆ CreateGroupChildContext()

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

◆ CreateShapePropMapper()

SvXMLImportPropertyMapper * XMLShapeImportHelper::CreateShapePropMapper ( const css::uno::Reference< css::frame::XModel > &  rModel,
SvXMLImport &  rImport 
)
static

◆ enableHandleProgressBar()

void XMLShapeImportHelper::enableHandleProgressBar ( )

defines if the import should increment the progress bar or not

Definition at line 918 of file shapeimport.cxx.

References mpImpl.

◆ endPage()

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 906 of file shapeimport.cxx.

References mpPageContext, restoreConnections(), and SAL_WARN_IF.

◆ finishShape()

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 477 of file shapeimport.cxx.

References mrImporter.

◆ GetAutoStylesContext()

SvXMLStylesContext * XMLShapeImportHelper::GetAutoStylesContext ( ) const
inline

Definition at line 182 of file shapeimport.hxx.

◆ getGluePointId()

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 880 of file shapeimport.cxx.

References mpPageContext.

Referenced by restoreConnections().

◆ GetPresPagePropsMapper()

SvXMLImportPropertyMapper * XMLShapeImportHelper::GetPresPagePropsMapper ( ) const
inline

Definition at line 187 of file shapeimport.hxx.

◆ GetPropertySetMapper()

SvXMLImportPropertyMapper * XMLShapeImportHelper::GetPropertySetMapper ( ) const
inline

Definition at line 186 of file shapeimport.hxx.

◆ GetSdPropHdlFactory()

XMLSdPropHdlFactory * XMLShapeImportHelper::GetSdPropHdlFactory ( ) const
inline

Definition at line 256 of file shapeimport.hxx.

◆ GetShapeTableImport()

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

Definition at line 934 of file shapeimport.cxx.

References mrImporter, mxShapeTableImport, and xFactory.

◆ GetStylesContext()

SvXMLStylesContext * XMLShapeImportHelper::GetStylesContext ( ) const
inline

Definition at line 180 of file shapeimport.hxx.

◆ IsHandleProgressBarEnabled()

bool XMLShapeImportHelper::IsHandleProgressBarEnabled ( ) const

Definition at line 923 of file shapeimport.cxx.

References mpImpl.

◆ IsPresentationShapesSupported()

bool XMLShapeImportHelper::IsPresentationShapesSupported ( ) const

queries the capability of the current model to create presentation shapes

Definition at line 929 of file shapeimport.cxx.

References mpImpl.

◆ moveGluePointMapping()

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 862 of file shapeimport.cxx.

References mpPageContext, and n.

◆ popGroupAndPostProcess()

void XMLShapeImportHelper::popGroupAndPostProcess ( )

◆ pushGroupForPostProcessing()

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

Definition at line 689 of file shapeimport.cxx.

References mpImpl.

Referenced by XMLTextShapeImportHelper::XMLTextShapeImportHelper().

◆ restoreConnections()

void XMLShapeImportHelper::restoreConnections ( )

◆ SetAutoStylesContext()

void XMLShapeImportHelper::SetAutoStylesContext ( SvXMLStylesContext pNew)

Definition at line 233 of file shapeimport.cxx.

References mxAutoStylesContext.

◆ SetStylesContext()

void XMLShapeImportHelper::SetStylesContext ( SvXMLStylesContext pNew)

Definition at line 228 of file shapeimport.cxx.

References mxStylesContext.

◆ shapeRemoved()

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 748 of file shapeimport.cxx.

References mpImpl.

◆ shapeWithZIndexAdded()

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

Definition at line 726 of file shapeimport.cxx.

References mpImpl.

◆ startPage()

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 897 of file shapeimport.cxx.

References mpPageContext.

Member Data Documentation

◆ mpImpl

std::unique_ptr<XMLShapeImportHelperImpl> XMLShapeImportHelper::mpImpl
private

◆ mpPageContext

std::shared_ptr<XMLShapeImportPageContextImpl> XMLShapeImportHelper::mpPageContext
private

◆ mpPresPagePropsMapper

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

Definition at line 141 of file shapeimport.hxx.

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

◆ mpPropertySetMapper

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

Definition at line 140 of file shapeimport.hxx.

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

◆ mpSdPropHdlFactory

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

Definition at line 139 of file shapeimport.hxx.

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

◆ mrImporter

SvXMLImport& XMLShapeImportHelper::mrImporter
protected

Definition at line 150 of file shapeimport.hxx.

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

◆ mxAutoStylesContext

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

Definition at line 145 of file shapeimport.hxx.

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

◆ mxShapeTableImport

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

Definition at line 147 of file shapeimport.hxx.

Referenced by GetShapeTableImport().

◆ mxStylesContext

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: