summaryrefslogtreecommitdiffstats
path: root/stoc/source/servicemanager/servicemanager.cxx
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-01-18 10:51:50 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-01-18 17:02:40 +0100
commit73eca35b0a8e01a7be2ce1775d1937154b5efb9e (patch)
treef0a3cf3ccdf3283b06ac068d464acde29a31257d /stoc/source/servicemanager/servicemanager.cxx
parentfwk: Use constructor feature for ModuleAcceleratorConfiguration. (diff)
downloadcore-73eca35b0a8e01a7be2ce1775d1937154b5efb9e.tar.gz
core-73eca35b0a8e01a7be2ce1775d1937154b5efb9e.zip
Unify ctor functions for component implementations.
There is no need to use different styles for writing the same thing. It also makes it easier in future to use search & replace. But of course, there are also some more complicated functions. Change-Id: I773da20378af0e0d5a27689d3903df7063fb8ac0
Diffstat (limited to 'stoc/source/servicemanager/servicemanager.cxx')
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index 42531052a39c..1dd406ec89e0 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -19,6 +19,7 @@
#include <osl/mutex.hxx>
#include <osl/diagnose.h>
+#include <rtl/ref.hxx>
#include <rtl/ustrbuf.hxx>
#include <boost/unordered_map.hpp>
@@ -1675,10 +1676,9 @@ com_sun_star_comp_stoc_OServiceManager_get_implementation(
css::uno::XComponentContext *context,
css::uno::Sequence<css::uno::Any> const &)
{
- css::uno::Reference<css::uno::XInterface> x(
- static_cast<cppu::OWeakObject *>(new OServiceManager(context)));
+ rtl::Reference<OServiceManager> x(new OServiceManager(context));
x->acquire();
- return x.get();
+ return static_cast<cppu::OWeakObject *>(x.get());
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
@@ -1686,10 +1686,9 @@ com_sun_star_comp_stoc_ORegistryServiceManager_get_implementation(
css::uno::XComponentContext *context,
css::uno::Sequence<css::uno::Any> const &)
{
- css::uno::Reference<css::uno::XInterface> x(
- static_cast<cppu::OWeakObject *>(new ORegistryServiceManager(context)));
+ rtl::Reference<ORegistryServiceManager> x(new ORegistryServiceManager(context));
x->acquire();
- return x.get();
+ return static_cast<cppu::OWeakObject *>(x.get());
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
@@ -1697,10 +1696,9 @@ com_sun_star_comp_stoc_OServiceManagerWrapper_get_implementation(
css::uno::XComponentContext *context,
css::uno::Sequence<css::uno::Any> const &)
{
- css::uno::Reference<css::uno::XInterface> x(
- static_cast<cppu::OWeakObject *>(new OServiceManagerWrapper(context)));
+ rtl::Reference<OServiceManagerWrapper> x(new OServiceManagerWrapper(context));
x->acquire();
- return x.get();
+ return static_cast<cppu::OWeakObject *>(x.get());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */