summaryrefslogtreecommitdiff
path: root/comphelper/source/processfactory/processfactory.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/processfactory/processfactory.cxx')
-rw-r--r--comphelper/source/processfactory/processfactory.cxx20
1 files changed, 13 insertions, 7 deletions
diff --git a/comphelper/source/processfactory/processfactory.cxx b/comphelper/source/processfactory/processfactory.cxx
index 0f50f4a4cb01..c4eac583e3c0 100644
--- a/comphelper/source/processfactory/processfactory.cxx
+++ b/comphelper/source/processfactory/processfactory.cxx
@@ -98,24 +98,30 @@ Reference< XInterface > createProcessComponentWithArguments( const ::rtl::OUStri
return xComponent;
}
-} // namesapce comphelper
-
-extern "C" {
-uno::XComponentContext * comphelper_getProcessComponentContext()
+Reference< XComponentContext > getProcessComponentContext()
{
- uno::Reference<uno::XComponentContext> xRet;
+ Reference< XComponentContext > xRet;
uno::Reference<beans::XPropertySet> const xProps(
comphelper::getProcessServiceFactory(), uno::UNO_QUERY );
if (xProps.is()) {
try {
- xRet.set( xProps->getPropertyValue(
- rtl::OUString(
+ xRet.set( xProps->getPropertyValue( rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ),
uno::UNO_QUERY );
}
catch (beans::UnknownPropertyException const&) {
}
}
+ return xRet;
+}
+
+} // namespace comphelper
+
+extern "C" {
+uno::XComponentContext * comphelper_getProcessComponentContext()
+{
+ uno::Reference<uno::XComponentContext> xRet;
+ xRet = ::comphelper::getProcessComponentContext();
if (xRet.is())
xRet->acquire();
return xRet.get();