From 73eca35b0a8e01a7be2ce1775d1937154b5efb9e Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Sat, 18 Jan 2014 10:51:50 +0100 Subject: 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 --- svtools/source/graphic/provider.cxx | 10 +++++----- svtools/source/graphic/renderer.cxx | 10 +++++----- svtools/source/hatchwindow/hatchwindowfactory.cxx | 10 +++++----- svtools/source/inc/renderer.hxx | 6 ++---- 4 files changed, 17 insertions(+), 19 deletions(-) (limited to 'svtools/source') 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 #include #include "provider.hxx" #include @@ -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 const &) + css::uno::XComponentContext *, + css::uno::Sequence const &) { - css::uno::Reference x( - static_cast(new GraphicProvider)); + rtl::Reference x(new GraphicProvider); x->acquire(); - return x.get(); + return static_cast(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 #include #include +#include #include #include #include @@ -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 const &) + css::uno::XComponentContext *, + css::uno::Sequence const &) { - css::uno::Reference x( - static_cast(new GraphicRendererVCL)); + rtl::Reference x(new GraphicRendererVCL); x->acquire(); - return x.get(); + return static_cast(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/hatchwindow/hatchwindowfactory.cxx b/svtools/source/hatchwindow/hatchwindowfactory.cxx index 17c05840dafa..afa3f3322533 100644 --- a/svtools/source/hatchwindow/hatchwindowfactory.cxx +++ b/svtools/source/hatchwindow/hatchwindowfactory.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -85,13 +86,12 @@ uno::Sequence< OUString > SAL_CALL OHatchWindowFactory::getSupportedServiceNames extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_embed_HatchWindowFactory_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - css::uno::Sequence const &) + css::uno::XComponentContext *, + css::uno::Sequence const &) { - css::uno::Reference x( - static_cast(new OHatchWindowFactory)); + rtl::Reference x(new OHatchWindowFactory); x->acquire(); - return x.get(); + return static_cast(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/inc/renderer.hxx b/svtools/source/inc/renderer.hxx index a69bac71f7e5..397ba033525e 100644 --- a/svtools/source/inc/renderer.hxx +++ b/svtools/source/inc/renderer.hxx @@ -37,15 +37,13 @@ class GraphicRendererVCL : public ::cppu::OWeakAggObject, public ::comphelper::PropertySetHelper, public ::com::sun::star::graphic::XGraphicRenderer { + static ::comphelper::PropertySetInfo* createPropertySetInfo(); + public: GraphicRendererVCL(); ~GraphicRendererVCL() throw(); -protected: - - static ::comphelper::PropertySetInfo* createPropertySetInfo(); - // XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); -- cgit