diff options
Diffstat (limited to 'oox/source/helper/containerhelper.cxx')
-rw-r--r-- | oox/source/helper/containerhelper.cxx | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/oox/source/helper/containerhelper.cxx b/oox/source/helper/containerhelper.cxx index 4d41d9924326..e7f322ff10e3 100644 --- a/oox/source/helper/containerhelper.cxx +++ b/oox/source/helper/containerhelper.cxx @@ -160,62 +160,4 @@ OUString ContainerHelper::insertByUnusedName( // ============================================================================ -ObjectContainer::ObjectContainer( const Reference< XMultiServiceFactory >& rxFactory, const OUString& rServiceName ) : - mxFactory( rxFactory ), - maServiceName( rServiceName ), - mnIndex( 0 ) -{ - OSL_ENSURE( mxFactory.is(), "ObjectContainer::ObjectContainer - missing service factory" ); -} - -ObjectContainer::~ObjectContainer() -{ -} - -bool ObjectContainer::hasObject( const OUString& rObjName ) const -{ - createContainer(); - return mxContainer.is() && mxContainer->hasByName( rObjName ); -} - -Any ObjectContainer::getObject( const OUString& rObjName ) const -{ - createContainer(); - if( mxContainer.is() ) try - { - return mxContainer->getByName( rObjName ); - } - catch( Exception& ) - { - } - return Any(); -} - -OUString ObjectContainer::insertObject( const OUString& rObjName, const Any& rObj, bool bInsertByUnusedName ) -{ - createContainer(); - if( mxContainer.is() ) - { - if( bInsertByUnusedName ) - return ContainerHelper::insertByUnusedName( mxContainer, rObjName + OUString::valueOf( ++mnIndex ), ' ', rObj ); - if( ContainerHelper::insertByName( mxContainer, rObjName, rObj ) ) - return rObjName; - } - return OUString(); -} - -void ObjectContainer::createContainer() const -{ - if( !mxContainer.is() && mxFactory.is() ) try - { - mxContainer.set( mxFactory->createInstance( maServiceName ), UNO_QUERY_THROW ); - } - catch( Exception& ) - { - } - OSL_ENSURE( mxContainer.is(), "ObjectContainer::createContainer - container not found" ); -} - -// ============================================================================ - } // namespace oox |