diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-18 10:51:50 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-18 17:02:40 +0100 |
commit | 73eca35b0a8e01a7be2ce1775d1937154b5efb9e (patch) | |
tree | f0a3cf3ccdf3283b06ac068d464acde29a31257d /svtools/source/graphic | |
parent | 42fc427d047a263185d89528953f980019ef815f (diff) |
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 'svtools/source/graphic')
-rw-r--r-- | svtools/source/graphic/provider.cxx | 10 | ||||
-rw-r--r-- | svtools/source/graphic/renderer.cxx | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index 00250e838eda..b2ea034b8fd6 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -38,6 +38,7 @@ #include "descriptor.hxx" #include "graphic.hxx" +#include <rtl/ref.hxx> #include <svtools/grfmgr.hxx> #include "provider.hxx" #include <vcl/dibtools.hxx> @@ -857,13 +858,12 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_graphic_GraphicProvider_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - css::uno::Sequence<css::uno::Any> const &) + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new GraphicProvider)); + rtl::Reference<GraphicProvider> x(new GraphicProvider); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/graphic/renderer.cxx b/svtools/source/graphic/renderer.cxx index 2b3fc31e52ee..0621e570a467 100644 --- a/svtools/source/graphic/renderer.cxx +++ b/svtools/source/graphic/renderer.cxx @@ -26,6 +26,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <comphelper/propertysetinfo.hxx> #include <cppuhelper/supportsservice.hxx> +#include <rtl/ref.hxx> #include <svl/itemprop.hxx> #include <svtools/grfmgr.hxx> #include <comphelper/servicehelper.hxx> @@ -293,13 +294,12 @@ void SAL_CALL GraphicRendererVCL::render( const uno::Reference< graphic::XGraphi extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_graphic_GraphicRendererVCL_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - css::uno::Sequence<css::uno::Any> const &) + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new GraphicRendererVCL)); + rtl::Reference<GraphicRendererVCL> x(new GraphicRendererVCL); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |