LibreOffice Module oox (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
oox::ObjectContainer Class Reference

This helper manages named objects in a container, which is created on demand. More...

#include <modelobjecthelper.hxx>

Public Member Functions

 ObjectContainer (const css::uno::Reference< css::lang::XMultiServiceFactory > &rxModelFactory, OUString aServiceName)
 
 ~ObjectContainer ()
 
bool hasObject (const OUString &rObjName) const
 Returns true, if the object with the passed name exists in the container. More...
 
css::uno::Any getObject (const OUString &rObjName) const
 
OUString insertObject (const OUString &rObjName, const css::uno::Any &rObj, bool bInsertByUnusedName)
 Inserts the passed object into the container, returns its final name. More...
 

Private Member Functions

void createContainer () const
 

Private Attributes

css::uno::Reference< css::lang::XMultiServiceFactory > mxModelFactory
 Factory to create the container. More...
 
css::uno::Reference< css::container::XNameContainer > mxContainer
 Container for the objects. More...
 
OUString maServiceName
 Service name to create the container. More...
 
sal_Int32 mnIndex
 Index to create unique identifiers. More...
 

Detailed Description

This helper manages named objects in a container, which is created on demand.

Definition at line 46 of file modelobjecthelper.hxx.

Constructor & Destructor Documentation

◆ ObjectContainer()

oox::ObjectContainer::ObjectContainer ( const css::uno::Reference< css::lang::XMultiServiceFactory > &  rxModelFactory,
OUString  aServiceName 
)
explicit

Definition at line 41 of file modelobjecthelper.cxx.

References maServiceName, and mxModelFactory.

◆ ~ObjectContainer()

oox::ObjectContainer::~ObjectContainer ( )

Definition at line 49 of file modelobjecthelper.cxx.

Member Function Documentation

◆ createContainer()

void oox::ObjectContainer::createContainer ( ) const
private

Definition at line 79 of file modelobjecthelper.cxx.

References Exception, maServiceName, mxContainer, and mxModelFactory.

Referenced by hasObject(), and insertObject().

◆ getObject()

Any oox::ObjectContainer::getObject ( const OUString &  rObjName) const

Definition at line 59 of file modelobjecthelper.cxx.

References Any, hasObject(), and mxContainer.

Referenced by oox::ModelObjectHelper::getFillBitmap().

◆ hasObject()

bool oox::ObjectContainer::hasObject ( const OUString &  rObjName) const

Returns true, if the object with the passed name exists in the container.

Definition at line 53 of file modelobjecthelper.cxx.

References createContainer(), and mxContainer.

Referenced by getObject(), and oox::ModelObjectHelper::hasLineMarker().

◆ insertObject()

OUString oox::ObjectContainer::insertObject ( const OUString &  rObjName,
const css::uno::Any &  rObj,
bool  bInsertByUnusedName 
)

Member Data Documentation

◆ maServiceName

OUString oox::ObjectContainer::maServiceName
private

Service name to create the container.

Definition at line 73 of file modelobjecthelper.hxx.

Referenced by createContainer().

◆ mnIndex

sal_Int32 oox::ObjectContainer::mnIndex
private

Index to create unique identifiers.

Definition at line 74 of file modelobjecthelper.hxx.

Referenced by insertObject().

◆ mxContainer

css::uno::Reference< css::container::XNameContainer > oox::ObjectContainer::mxContainer
mutableprivate

Container for the objects.

Definition at line 72 of file modelobjecthelper.hxx.

Referenced by createContainer(), getObject(), hasObject(), and insertObject().

◆ mxModelFactory

css::uno::Reference< css::lang::XMultiServiceFactory > oox::ObjectContainer::mxModelFactory
mutableprivate

Factory to create the container.

Definition at line 70 of file modelobjecthelper.hxx.

Referenced by createContainer(), and ObjectContainer().


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