diff options
author | Frank Schönheit <fs@openoffice.org> | 2002-05-02 08:10:47 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2002-05-02 08:10:47 +0000 |
commit | 9b42d9ec4f00ee86fb97a5ac292c22ec157226c2 (patch) | |
tree | a40186f88804a6483951e23404f0483ca09c4e1c /comphelper/source/processfactory | |
parent | cb8ce0e2a2b84f82318f278e1266a2593c83d2bb (diff) |
#98750# +createProcessComponent
Diffstat (limited to 'comphelper/source/processfactory')
-rw-r--r-- | comphelper/source/processfactory/processfactory.cxx | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/comphelper/source/processfactory/processfactory.cxx b/comphelper/source/processfactory/processfactory.cxx index 8a4324c9d6e3..12d71714bd21 100644 --- a/comphelper/source/processfactory/processfactory.cxx +++ b/comphelper/source/processfactory/processfactory.cxx @@ -2,9 +2,9 @@ * * $RCSfile: processfactory.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: hjs $ $Date: 2001-01-17 16:02:51 $ + * last change: $Author: fs $ $Date: 2002-05-02 09:10:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -108,5 +108,28 @@ Reference< XMultiServiceFactory > getProcessServiceFactory() return xReturn; } +Reference< XInterface > createProcessComponent( const ::rtl::OUString& _rServiceSpecifier ) SAL_THROW( ( RuntimeException ) ) +{ + Reference< XInterface > xComponent; + + Reference< XMultiServiceFactory > xFactory( getProcessServiceFactory() ); + if ( xFactory.is() ) + xComponent = xFactory->createInstance( _rServiceSpecifier ); + + return xComponent; +} + +Reference< XInterface > createProcessComponentWithArguments( const ::rtl::OUString& _rServiceSpecifier, + const Sequence< Any >& _rArgs ) SAL_THROW( ( RuntimeException ) ) +{ + Reference< XInterface > xComponent; + + Reference< XMultiServiceFactory > xFactory( getProcessServiceFactory() ); + if ( xFactory.is() ) + xComponent = xFactory->createInstanceWithArguments( _rServiceSpecifier, _rArgs ); + + return xComponent; +} + } // namesapce comphelper |