diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2006-03-31 10:56:18 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2006-03-31 10:56:18 +0000 |
commit | de4ff2b3ec651bd1faeb6b5379b3b57063d9d404 (patch) | |
tree | ff95bec2c6dbed75e4a3aaac4b206f7fabae8232 /cppuhelper/source | |
parent | 84a7712d5995b16e1b8b063fb95996cd7a86d984 (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/source')
-rw-r--r-- | cppuhelper/source/factory.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index 165691b777a1..bd16b1239109 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; |