LibreOffice Module xmloff (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
comphelper::UnoInterfaceToUniqueIdentifierMapper Class Reference

#include <unointerfacetouniqueidentifiermapper.hxx>

Public Member Functions

 UnoInterfaceToUniqueIdentifierMapper ()
 
const OUString & registerReference (const css::uno::Reference< css::uno::XInterface > &rInterface)
 returns a unique identifier for the given uno object. More...
 
bool registerReference (const OUString &rIdentifier, const css::uno::Reference< css::uno::XInterface > &rInterface)
 registers the given uno object with the given identifier. More...
 
void registerReferenceAlways (const OUString &rIdentifier, const css::uno::Reference< css::uno::XInterface > &rInterface)
 always registers the given uno object with the given identifier. More...
 
const OUString & getIdentifier (const css::uno::Reference< css::uno::XInterface > &rInterface) const
 
const css::uno::Reference< css::uno::XInterface > & getReference (const OUString &rIdentifier) const
 

Private Member Functions

bool findReference (const css::uno::Reference< css::uno::XInterface > &rInterface, IdMap_t::const_iterator &rIter) const
 
bool findIdentifier (const OUString &rIdentifier, IdMap_t::const_iterator &rIter) const
 
void insertReference (const OUString &rIdentifier, const css::uno::Reference< css::uno::XInterface > &rInterface)
 

Private Attributes

IdMap_t maEntries
 
sal_uInt32 mnNextId
 

Detailed Description

Definition at line 36 of file unointerfacetouniqueidentifiermapper.hxx.

Constructor & Destructor Documentation

comphelper::UnoInterfaceToUniqueIdentifierMapper::UnoInterfaceToUniqueIdentifierMapper ( )

Definition at line 32 of file unointerfacetouniqueidentifiermapper.cxx.

Member Function Documentation

bool comphelper::UnoInterfaceToUniqueIdentifierMapper::findIdentifier ( const OUString &  rIdentifier,
IdMap_t::const_iterator &  rIter 
) const
private

Definition at line 132 of file unointerfacetouniqueidentifiermapper.cxx.

References maEntries.

Referenced by getReference().

bool comphelper::UnoInterfaceToUniqueIdentifierMapper::findReference ( const css::uno::Reference< css::uno::XInterface > &  rInterface,
IdMap_t::const_iterator &  rIter 
) const
private

Definition at line 116 of file unointerfacetouniqueidentifiermapper.cxx.

References maEntries.

Referenced by getIdentifier().

const OUString & comphelper::UnoInterfaceToUniqueIdentifierMapper::getIdentifier ( const css::uno::Reference< css::uno::XInterface > &  rInterface) const
Returns
the identifier for the given uno object. If this uno object is not already registered, an empty string is returned

Definition at line 88 of file unointerfacetouniqueidentifiermapper.cxx.

References findReference().

Referenced by XMLAnimationsExporter::exportAnimations(), SdXMLExport::ExportContent_(), XMLTextParagraphExport::exportParagraph(), XMLShapeExport::exportShape(), and XMLShapeExport::ImpExportConnectorShape().

const Reference< XInterface > & comphelper::UnoInterfaceToUniqueIdentifierMapper::getReference ( const OUString &  rIdentifier) const
Returns
the uno object that is registered with the given identifier. If no uno object is registered with the given identifier, an empty reference is returned.

Definition at line 102 of file unointerfacetouniqueidentifiermapper.cxx.

References findIdentifier().

Referenced by xmloff::AnimationsImportHelperImpl::convertTarget(), xmloff::AnimationsImportHelperImpl::convertTiming(), XMLShapeImportHelper::restoreConnections(), and SdXMLGenericPageContext::SetNavigationOrder().

void comphelper::UnoInterfaceToUniqueIdentifierMapper::insertReference ( const OUString &  rIdentifier,
const css::uno::Reference< css::uno::XInterface > &  rInterface 
)
private
const OUString& comphelper::UnoInterfaceToUniqueIdentifierMapper::registerReference ( const css::uno::Reference< css::uno::XInterface > &  rInterface)

returns a unique identifier for the given uno object.

If a UNO object is registered more than once, the returned identifier is always the same.

Referenced by XMLAnimationsExporter::collect(), XMLShapeExport::collectShapeAutoStyles(), XMLParaContext::EndElement(), xmloff::AnimationNodeContext::init_node(), and SdXMLDrawPageContext::SdXMLDrawPageContext().

bool comphelper::UnoInterfaceToUniqueIdentifierMapper::registerReference ( const OUString &  rIdentifier,
const css::uno::Reference< css::uno::XInterface > &  rInterface 
)

registers the given uno object with the given identifier.

Returns
false, if the given identifier already exists and is not associated with the given interface
void comphelper::UnoInterfaceToUniqueIdentifierMapper::registerReferenceAlways ( const OUString &  rIdentifier,
const css::uno::Reference< css::uno::XInterface > &  rInterface 
)

always registers the given uno object with the given identifier.

In contrast to registerReference(), this here overwrites any earlier registration of the same identifier

Definition at line 79 of file unointerfacetouniqueidentifiermapper.cxx.

References insertReference().

Referenced by SdXMLFrameShapeContext::EndElement().

Member Data Documentation

IdMap_t comphelper::UnoInterfaceToUniqueIdentifierMapper::maEntries
private
sal_uInt32 comphelper::UnoInterfaceToUniqueIdentifierMapper::mnNextId
private

Definition at line 78 of file unointerfacetouniqueidentifiermapper.hxx.

Referenced by insertReference().


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