summaryrefslogtreecommitdiff
path: root/ucb/source/core/ucb.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sb@openoffice.org>2000-11-09 12:31:21 +0000
committerStephan Bergmann <sb@openoffice.org>2000-11-09 12:31:21 +0000
commit5ea202522ab68cfae59ae22ce05261674c52ad47 (patch)
tree4cd49c5a7ea336eabfa5f0dcdfc840361a9f3602 /ucb/source/core/ucb.cxx
parent255481db92614a0ddc77b5d8c192a3add993ff91 (diff)
Adapted UniversalContentBroker::initialize() to the redesigned UCB
configuration mechanism.
Diffstat (limited to 'ucb/source/core/ucb.cxx')
-rw-r--r--ucb/source/core/ucb.cxx34
1 files changed, 12 insertions, 22 deletions
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index d7182400452d..4f3df2917fc4 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ucb.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: kso $ $Date: 2000-10-16 14:52:48 $
+ * last change: $Author: sb $ $Date: 2000-11-09 13:31:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -148,6 +148,8 @@ UniversalContentBroker::UniversalContentBroker(
m_pDisposeEventListeners( NULL ),
m_nInitCount( 0 ) //@@@ see initialize() method
{
+ VOS_ENSURE( m_xSMgr.is(),
+ "UniversalContentBroker ctor: No service manager" );
}
//=========================================================================
@@ -261,27 +263,15 @@ void SAL_CALL UniversalContentBroker::initialize(
throw( com::sun::star::uno::Exception,
com::sun::star::uno::RuntimeException )
{
- // If exactly one boolean argument of value 'true' is supplied, the UCB is
- // configured:
- sal_Bool bConfigure;
- if (aArguments.getLength() == 1
- && (aArguments[0] >>= bConfigure)
- && bConfigure)
- {
- //@@@ At the moment, there's a problem when one (non-one-instance)
- // factory 'wraps' another (one-instance) factory, causing this method
- // to be called several times:
- oslInterlockedCount nCount
- = osl_incrementInterlockedCount(&m_nInitCount);
- if (nCount == 1)
- ucb::configureUcb(this,
- m_xSMgr,
- OUString::createFromAscii(
- UCBHELPER_CONFIGURATION_KEY_STANDARD));
- else
- osl_decrementInterlockedCount(&m_nInitCount);
+ //@@@ At the moment, there's a problem when one (non-one-instance) factory
+ // 'wraps' another (one-instance) factory, causing this method to be
+ // called several times:
+ oslInterlockedCount nCount = osl_incrementInterlockedCount(&m_nInitCount);
+ if (nCount == 1)
+ ::ucb::configureUcb(this, m_xSMgr, aArguments, 0);
+ else
+ osl_decrementInterlockedCount(&m_nInitCount);
// make the possibility of overflow less likely...
- }
}
//=========================================================================