summaryrefslogtreecommitdiff
path: root/ucb/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'ucb/source/core')
-rw-r--r--ucb/source/core/ucbstore.cxx39
-rw-r--r--ucb/source/core/ucbstore.hxx6
2 files changed, 10 insertions, 35 deletions
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 9500db4f45b6..76f7d8ea762d 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -274,8 +274,9 @@ UcbStore::createPropertySetRegistry( const OUString& )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
if ( !m_pImpl->m_xTheRegistry.is() )
- m_pImpl->m_xTheRegistry = new PropertySetRegistry( m_xSMgr, *this );
+ m_pImpl->m_xTheRegistry = new PropertySetRegistry( m_xSMgr, getInitArgs() );
}
+
return m_pImpl->m_xTheRegistry;
}
@@ -294,22 +295,6 @@ void SAL_CALL UcbStore::initialize( const Sequence< Any >& aArguments )
}
//=========================================================================
-//
-// New methods.
-//
-//=========================================================================
-
-void UcbStore::removeRegistry()
-{
- if ( m_pImpl->m_xTheRegistry.is() )
- {
- osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
- if ( m_pImpl->m_xTheRegistry.is() )
- m_pImpl->m_xTheRegistry = 0;
- }
-}
-
-//=========================================================================
const Sequence< Any >& UcbStore::getInitArgs() const
{
return m_pImpl->m_aInitArgs;
@@ -323,7 +308,7 @@ const Sequence< Any >& UcbStore::getInitArgs() const
struct PropertySetRegistry_Impl
{
- UcbStore* m_pCreator;
+ const Sequence< Any > m_aInitArgs;
PropertySetMap_Impl m_aPropSets;
Reference< XMultiServiceFactory > m_xConfigProvider;
Reference< XInterface > m_xRootReadAccess;
@@ -332,18 +317,11 @@ struct PropertySetRegistry_Impl
sal_Bool m_bTriedToGetRootReadAccess; // #82494#
sal_Bool m_bTriedToGetRootWriteAccess; // #82494#
- PropertySetRegistry_Impl( UcbStore& rCreator )
- : m_pCreator( &rCreator ),
+ PropertySetRegistry_Impl( const Sequence< Any > &rInitArgs )
+ : m_aInitArgs( rInitArgs ),
m_bTriedToGetRootReadAccess( sal_False ),
m_bTriedToGetRootWriteAccess( sal_False )
{
- m_pCreator->acquire();
- }
-
- ~PropertySetRegistry_Impl()
- {
- m_pCreator->removeRegistry();
- m_pCreator->release();
}
};
@@ -359,9 +337,9 @@ struct PropertySetRegistry_Impl
PropertySetRegistry::PropertySetRegistry(
const Reference< XMultiServiceFactory >& rXSMgr,
- UcbStore& rCreator )
+ const Sequence< Any > &rInitArgs )
: m_xSMgr( rXSMgr ),
- m_pImpl( new PropertySetRegistry_Impl( rCreator ) )
+ m_pImpl( new PropertySetRegistry_Impl( rInitArgs ) )
{
}
@@ -1094,8 +1072,7 @@ Reference< XMultiServiceFactory > PropertySetRegistry::getConfigProvider()
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
if ( !m_pImpl->m_xConfigProvider.is() )
{
- const Sequence< Any >& rInitArgs
- = m_pImpl->m_pCreator->getInitArgs();
+ const Sequence< Any >& rInitArgs = m_pImpl->m_aInitArgs;
if ( rInitArgs.getLength() > 0 )
{
diff --git a/ucb/source/core/ucbstore.hxx b/ucb/source/core/ucbstore.hxx
index 8c339337f890..f7d90173b448 100644
--- a/ucb/source/core/ucbstore.hxx
+++ b/ucb/source/core/ucbstore.hxx
@@ -93,9 +93,6 @@ public:
throw( ::com::sun::star::uno::Exception,
::com::sun::star::uno::RuntimeException );
- // New
- void removeRegistry();
-
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >&
getInitArgs() const;
};
@@ -132,7 +129,8 @@ public:
PropertySetRegistry(
const com::sun::star::uno::Reference<
com::sun::star::lang::XMultiServiceFactory >& rXSMgr,
- UcbStore& rCreator );
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Any >& rInitArgs);
virtual ~PropertySetRegistry();
// XInterface