diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2013-12-23 09:21:14 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2013-12-23 10:28:39 +0100 |
commit | a587899cb340d2a5bc05392e1817ba72718706f1 (patch) | |
tree | 15ff9a94a3c0051c07fdc8faeecb9b12b64dce0e /svtools/source/graphic | |
parent | 2fbb47156773b2e300fc987efc2da85c66e567d1 (diff) |
svt: Use constructor feature for GraphicRendererVCL.
Change-Id: Idb4cdfcdc8e06dca070bda5dd63e4291bb582e0f
Diffstat (limited to 'svtools/source/graphic')
-rw-r--r-- | svtools/source/graphic/renderer.cxx | 50 |
1 files changed, 17 insertions, 33 deletions
diff --git a/svtools/source/graphic/renderer.cxx b/svtools/source/graphic/renderer.cxx index 412bb573ae5a..38b87bbc40df 100644 --- a/svtools/source/graphic/renderer.cxx +++ b/svtools/source/graphic/renderer.cxx @@ -38,17 +38,7 @@ using namespace ::com::sun::star; -namespace unographic { - -// --------------------- -// - GraphicRendererVCL - -// --------------------- - -uno::Reference< uno::XInterface > SAL_CALL GraphicRendererVCL_CreateInstance( const uno::Reference< lang::XMultiServiceFactory >& ) -{ - return (static_cast< ::cppu::OWeakObject* >(new GraphicRendererVCL )); -} - +namespace { GraphicRendererVCL::GraphicRendererVCL() : ::comphelper::PropertySetHelper( createPropertySetInfo() ), @@ -65,26 +55,6 @@ GraphicRendererVCL::~GraphicRendererVCL() // ------------------------------------------------------------------------------ -OUString GraphicRendererVCL::getImplementationName_Static() - throw() -{ - return OUString( "com.sun.star.comp.graphic.GraphicRendererVCL" ); -} - -// ------------------------------------------------------------------------------ - -uno::Sequence< OUString > GraphicRendererVCL::getSupportedServiceNames_Static() - throw( ) -{ - uno::Sequence< OUString > aSeq( 1 ); - - aSeq.getArray()[ 0 ] = "com.sun.star.graphic.GraphicRendererVCL"; - - return aSeq; -} - -// ------------------------------------------------------------------------------ - uno::Any SAL_CALL GraphicRendererVCL::queryAggregation( const uno::Type & rType ) throw( uno::RuntimeException ) { @@ -137,7 +107,7 @@ void SAL_CALL GraphicRendererVCL::release() OUString SAL_CALL GraphicRendererVCL::getImplementationName() throw( uno::RuntimeException ) { - return getImplementationName_Static(); + return OUString( "com.sun.star.comp.graphic.GraphicRendererVCL" ); } sal_Bool SAL_CALL GraphicRendererVCL::supportsService( const OUString& ServiceName ) @@ -151,7 +121,9 @@ sal_Bool SAL_CALL GraphicRendererVCL::supportsService( const OUString& ServiceNa uno::Sequence< OUString > SAL_CALL GraphicRendererVCL::getSupportedServiceNames() throw( uno::RuntimeException ) { - return getSupportedServiceNames_Static(); + uno::Sequence< OUString > aSeq( 1 ); + aSeq.getArray()[ 0 ] = "com.sun.star.graphic.GraphicRendererVCL"; + return aSeq; } // ------------------------------------------------------------------------------ @@ -319,4 +291,16 @@ 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 *, + uno_Sequence * arguments) +{ + assert(arguments != 0 && arguments->nElements == 0); (void) arguments; + css::uno::Reference<css::uno::XInterface> x( + static_cast<cppu::OWeakObject *>(new GraphicRendererVCL)); + x->acquire(); + return x.get(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |