summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-03-31 10:56:18 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-03-31 10:56:18 +0000
commit2c1230f835eda35954ae4d0542c05f34576c619b (patch)
tree8deb2fd0668ce3a3af86d9639a9338e4c8b37257 /cppuhelper
parentcc9e95876f1b43f6791ea97e9ac27ba6329842f7 (diff)
INTEGRATION: CWS dba203b (1.23.30); FILE MERGED
2006/03/27 08:24:54 fs 1.23.30.1: #i63511# createInstanceWithArgumentsAndContext: always call initialize, even if the arguments sequence is empty (approved by SB)
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/factory.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx
index 86d712d57..cb93dda2b 100644
--- a/cppuhelper/source/factory.cxx
+++ b/cppuhelper/source/factory.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: factory.cxx,v $
*
- * $Revision: 1.23 $
+ * $Revision: 1.24 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 09:26:13 $
+ * last change: $Author: vg $ $Date: 2006-03-31 11:56:18 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -245,19 +245,19 @@ Reference< XInterface > OSingleFactoryHelper::createInstanceWithArgumentsAndCont
{
Reference< XInterface > xRet( createInstanceWithContext( xContext ) );
- if (rArguments.getLength())
+ Reference< lang::XInitialization > xInit( xRet, UNO_QUERY );
+ // always call initialize, even if there are no arguments.
+ // #i63511# / 2006-03-27 / frank.schoenheit@sun.com
+ if (xInit.is())
{
- Reference< lang::XInitialization > xInit( xRet, UNO_QUERY );
- if (xInit.is())
- {
- xInit->initialize( rArguments );
- }
- else
- {
+ xInit->initialize( rArguments );
+ }
+ else
+ {
+ if ( rArguments.getLength() )
throw lang::IllegalArgumentException(
OUString( RTL_CONSTASCII_USTRINGPARAM("cannot pass arguments to component => no XInitialization implemented!") ),
Reference< XInterface >(), 0 );
- }
}
return xRet;