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
 
SvXMLShapeContextCreateGroupChildContext (SvXMLImport &rImport, sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > const &rShapes, bool bTemporaryShape=false)
 
SvXMLShapeContextCreateFrameChildContext (SvXMLImport &rImport, sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > const &rShapes, const css::uno::Reference< css::xml::sax::XAttributeList > &xFrameAttrList)
 
SvXMLShapeContextCreate3DSceneChildContext (SvXMLImport &rImport, sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > const &rShapes)
 
const SvXMLTokenMapGetGroupShapeElemTokenMap ()
 
const SvXMLTokenMapGetFrameShapeElemTokenMap ()
 
const SvXMLTokenMapGet3DSceneShapeElemTokenMap ()
 
const SvXMLTokenMapGet3DObjectAttrTokenMap ()
 
const SvXMLTokenMapGet3DPolygonBasedAttrTokenMap ()
 
const SvXMLTokenMapGet3DCubeObjectAttrTokenMap ()
 
const SvXMLTokenMapGet3DSphereObjectAttrTokenMap ()
 
const SvXMLTokenMapGet3DLightAttrTokenMap ()
 
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::XAttributeList > &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::XAttributeList > &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 glue point identifier from an xml file to the identifier created after inserting the new glue point 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 glue point identifier from the current xml file to the identifier created after inserting the new glue point 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 SvXMLImportContextRef CreateFrameChildContext (SvXMLImportContext *pThisContext, sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
 
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
 
std::unique_ptr< SvXMLTokenMapmpGroupShapeElemTokenMap
 
std::unique_ptr< SvXMLTokenMapmpFrameShapeElemTokenMap
 
std::unique_ptr< SvXMLTokenMapmp3DSceneShapeElemTokenMap
 
std::unique_ptr< SvXMLTokenMapmp3DObjectAttrTokenMap
 
std::unique_ptr< SvXMLTokenMapmp3DPolygonBasedAttrTokenMap
 
std::unique_ptr< SvXMLTokenMapmp3DCubeObjectAttrTokenMap
 
std::unique_ptr< SvXMLTokenMapmp3DSphereObjectAttrTokenMap
 
std::unique_ptr< SvXMLTokenMapmp3DLightAttrTokenMap
 
rtl::Reference< XMLTableImportmxShapeTableImport
 

Additional Inherited Members

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

Detailed Description

Definition at line 220 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 glue point identifier from an xml file to the identifier created after inserting the new glue point into the core.

The saved mappings can be retrieved by getGluePointId()

Definition at line 1041 of file shapeimport.cxx.

References mpPageContext.

void XMLShapeImportHelper::addShape ( css::uno::Reference< css::drawing::XShape > &  rShape,
const css::uno::Reference< css::xml::sax::XAttributeList > &  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 658 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 972 of file shapeimport.cxx.

References mpImpl.

void XMLShapeImportHelper::addShapeEvents ( SdXMLEventContextData rData)
SvXMLShapeContext * XMLShapeImportHelper::Create3DSceneChildContext ( SvXMLImport rImport,
sal_uInt16  nPrefix,
const OUString &  rLocalName,
const css::uno::Reference< css::xml::sax::XAttributeList > &  xAttrList,
css::uno::Reference< css::drawing::XShapes > const &  rShapes 
)
SvXMLShapeContext* XMLShapeImportHelper::CreateFrameChildContext ( SvXMLImport rImport,
sal_uInt16  nPrefix,
const OUString &  rLocalName,
const css::uno::Reference< css::xml::sax::XAttributeList > &  xAttrList,
css::uno::Reference< css::drawing::XShapes > const &  rShapes,
const css::uno::Reference< css::xml::sax::XAttributeList > &  xFrameAttrList 
)
static SvXMLImportContextRef XMLShapeImportHelper::CreateFrameChildContext ( SvXMLImportContext pThisContext,
sal_uInt16  nPrefix,
const OUString &  rLocalName,
const css::uno::Reference< css::xml::sax::XAttributeList > &  xAttrList 
)
static
SvXMLShapeContext * XMLShapeImportHelper::CreateGroupChildContext ( SvXMLImport rImport,
sal_uInt16  nPrefix,
const OUString &  rLocalName,
const css::uno::Reference< css::xml::sax::XAttributeList > &  xAttrList,
css::uno::Reference< css::drawing::XShapes > const &  rShapes,
bool  bTemporaryShape = false 
)
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 1105 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 1093 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::XAttributeList > &  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 673 of file shapeimport.cxx.

References SvXMLImport::IsShapePositionInHoriL2R(), and mrImporter.

const SvXMLTokenMap & XMLShapeImportHelper::Get3DCubeObjectAttrTokenMap ( )
const SvXMLTokenMap & XMLShapeImportHelper::Get3DLightAttrTokenMap ( )
const SvXMLTokenMap & XMLShapeImportHelper::Get3DObjectAttrTokenMap ( )
const SvXMLTokenMap & XMLShapeImportHelper::Get3DPolygonBasedAttrTokenMap ( )
const SvXMLTokenMap & XMLShapeImportHelper::Get3DSceneShapeElemTokenMap ( )
const SvXMLTokenMap & XMLShapeImportHelper::Get3DSphereObjectAttrTokenMap ( )
SvXMLStylesContext* XMLShapeImportHelper::GetAutoStylesContext ( ) const
inline

Definition at line 289 of file shapeimport.hxx.

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

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

The mapping must be initialized first with addGluePointMapping()

Definition at line 1067 of file shapeimport.cxx.

References mpPageContext.

Referenced by restoreConnections().

const SvXMLTokenMap & XMLShapeImportHelper::GetGroupShapeElemTokenMap ( )
SvXMLImportPropertyMapper* XMLShapeImportHelper::GetPresPagePropsMapper ( ) const
inline

Definition at line 294 of file shapeimport.hxx.

SvXMLImportPropertyMapper* XMLShapeImportHelper::GetPropertySetMapper ( ) const
inline

Definition at line 293 of file shapeimport.hxx.

XMLSdPropHdlFactory* XMLShapeImportHelper::GetSdPropHdlFactory ( ) const
inline

Definition at line 363 of file shapeimport.hxx.

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

Definition at line 1121 of file shapeimport.cxx.

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

SvXMLStylesContext* XMLShapeImportHelper::GetStylesContext ( ) const
inline

Definition at line 287 of file shapeimport.hxx.

bool XMLShapeImportHelper::IsHandleProgressBarEnabled ( ) const

Definition at line 1110 of file shapeimport.cxx.

References mpImpl.

bool XMLShapeImportHelper::IsPresentationShapesSupported ( ) const

queries the capability of the current model to create presentation shapes

Definition at line 1116 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 1049 of file shapeimport.cxx.

References mpPageContext.

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

Definition at line 882 of file shapeimport.cxx.

References mpImpl.

Referenced by XMLTextShapeImportHelper::XMLTextShapeImportHelper().

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

Definition at line 415 of file shapeimport.cxx.

References mxAutoStylesContext.

void XMLShapeImportHelper::SetStylesContext ( SvXMLStylesContext pNew)

Definition at line 410 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 941 of file shapeimport.cxx.

References mpImpl.

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

Definition at line 919 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 1084 of file shapeimport.cxx.

References mpPageContext.

Member Data Documentation

std::unique_ptr<SvXMLTokenMap> XMLShapeImportHelper::mp3DCubeObjectAttrTokenMap
private

Definition at line 241 of file shapeimport.hxx.

Referenced by Get3DCubeObjectAttrTokenMap().

std::unique_ptr<SvXMLTokenMap> XMLShapeImportHelper::mp3DLightAttrTokenMap
private

Definition at line 243 of file shapeimport.hxx.

Referenced by Get3DLightAttrTokenMap().

std::unique_ptr<SvXMLTokenMap> XMLShapeImportHelper::mp3DObjectAttrTokenMap
private

Definition at line 239 of file shapeimport.hxx.

Referenced by Get3DObjectAttrTokenMap().

std::unique_ptr<SvXMLTokenMap> XMLShapeImportHelper::mp3DPolygonBasedAttrTokenMap
private

Definition at line 240 of file shapeimport.hxx.

Referenced by Get3DPolygonBasedAttrTokenMap().

std::unique_ptr<SvXMLTokenMap> XMLShapeImportHelper::mp3DSceneShapeElemTokenMap
private

Definition at line 238 of file shapeimport.hxx.

Referenced by Get3DSceneShapeElemTokenMap().

std::unique_ptr<SvXMLTokenMap> XMLShapeImportHelper::mp3DSphereObjectAttrTokenMap
private

Definition at line 242 of file shapeimport.hxx.

Referenced by Get3DSphereObjectAttrTokenMap().

std::unique_ptr<SvXMLTokenMap> XMLShapeImportHelper::mpFrameShapeElemTokenMap
private

Definition at line 237 of file shapeimport.hxx.

Referenced by GetFrameShapeElemTokenMap().

std::unique_ptr<SvXMLTokenMap> XMLShapeImportHelper::mpGroupShapeElemTokenMap
private

Definition at line 236 of file shapeimport.hxx.

Referenced by GetGroupShapeElemTokenMap().

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

Definition at line 229 of file shapeimport.hxx.

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

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

Definition at line 228 of file shapeimport.hxx.

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

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

Definition at line 227 of file shapeimport.hxx.

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

SvXMLImport& XMLShapeImportHelper::mrImporter
protected

Definition at line 248 of file shapeimport.hxx.

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

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

Definition at line 233 of file shapeimport.hxx.

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

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

Definition at line 245 of file shapeimport.hxx.

Referenced by GetShapeTableImport().

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

Definition at line 232 of file shapeimport.hxx.

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


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