summaryrefslogtreecommitdiff
path: root/comphelper/inc/comphelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-18 12:47:55 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-18 15:08:56 +0200
commit2a32bf29b98403872235f880e91b1c08cd3d7f68 (patch)
tree4c982e92c3220c2e0d918d1d4c7661006b920150 /comphelper/inc/comphelper
parentcccc6bcfa095121c91e8bbc396f5bcf7e95424b9 (diff)
Make getProcessComponentContext/ServiceFactory throw instead of returning null
...with the same rationale as recent 543158edba6678d3d76eee983a9d4edd2a422fee "Require XComponentContext.getServiceManager to throw instead of returning null" (this helps find problems like 065a758d0c2b66c6683d648347b7a6cdef4a80f7 "Enable experimental gtk3 plugin only via SAL_USE_VCLPLUGIN"). Removed comphelper::createProcessComponent[WithAguments] and replaced its few uses with direct calls to createInstance[WithArguments]. Change-Id: Ia44b8656f74de88ef6eab3eb6bd597729b08e1c8
Diffstat (limited to 'comphelper/inc/comphelper')
-rw-r--r--comphelper/inc/comphelper/processfactory.hxx30
1 files changed, 7 insertions, 23 deletions
diff --git a/comphelper/inc/comphelper/processfactory.hxx b/comphelper/inc/comphelper/processfactory.hxx
index dbcd647ee54e..e6833fc49327 100644
--- a/comphelper/inc/comphelper/processfactory.hxx
+++ b/comphelper/inc/comphelper/processfactory.hxx
@@ -39,34 +39,17 @@ namespace comphelper
COMPHELPER_DLLPUBLIC void setProcessServiceFactory(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xSMgr);
/**
- * This function get the process service factory. If no service factory is set the function returns
- * a null interface.
+ * This function gets the process service factory.
+ *
+ * If no service factory is set the function throws a RuntimeException.
*
* @author Juergen Schmidt
*/
COMPHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getProcessServiceFactory();
-/** creates a component, using the process factory if set
- @see getProcessServiceFactory
- @see setProcessServiceFactory
-*/
-COMPHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
- createProcessComponent(
- const ::rtl::OUString& _rServiceSpecifier
- ) SAL_THROW( ( ::com::sun::star::uno::RuntimeException ) );
-
-/** creates a component with arguments, using the process factory if set
+/** Obtains a component context from a service factory.
- @see getProcessServiceFactory
- @see setProcessServiceFactory
-*/
-COMPHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
- createProcessComponentWithArguments(
- const ::rtl::OUString& _rServiceSpecifier,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& _rArgs
- ) SAL_THROW( ( ::com::sun::star::uno::RuntimeException ) );
-
-/** Tries to obtain a component context from a service factory.
+ Throws a RuntimeException if no component context can be obtained.
@param factory may be null
@return may be null
@@ -79,7 +62,8 @@ getComponentContext(
/**
* This function gets the process service factory's default component context.
- * If no service factory is set the function returns a null interface.
+ *
+ * Throws a RuntimeException if no component context can be obtained.
*/
COMPHELPER_DLLPUBLIC
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >