diff options
-rw-r--r-- | svtools/source/graphic/renderer.cxx | 50 | ||||
-rw-r--r-- | svtools/source/inc/renderer.hxx | 9 | ||||
-rw-r--r-- | svtools/source/uno/miscservices.cxx | 9 | ||||
-rw-r--r-- | svtools/util/svt.component | 3 |
4 files changed, 20 insertions, 51 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: */ diff --git a/svtools/source/inc/renderer.hxx b/svtools/source/inc/renderer.hxx index d03b4b8330b3..a69bac71f7e5 100644 --- a/svtools/source/inc/renderer.hxx +++ b/svtools/source/inc/renderer.hxx @@ -29,11 +29,7 @@ class OutputDevice; -namespace unographic { - -// ------------------- -// - GraphicRenderer - -// ------------------- +namespace { class GraphicRendererVCL : public ::cppu::OWeakAggObject, public ::com::sun::star::lang::XServiceInfo, @@ -46,9 +42,6 @@ public: GraphicRendererVCL(); ~GraphicRendererVCL() throw(); - static OUString getImplementationName_Static() throw(); - static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(); - protected: static ::comphelper::PropertySetInfo* createPropertySetInfo(); diff --git a/svtools/source/uno/miscservices.cxx b/svtools/source/uno/miscservices.cxx index a963236569a0..60154934b78e 100644 --- a/svtools/source/uno/miscservices.cxx +++ b/svtools/source/uno/miscservices.cxx @@ -30,7 +30,6 @@ #include "hatchwindowfactory.hxx" #include "hatchwindow.hxx" #include "provider.hxx" -#include "renderer.hxx" #include "unowizard.hxx" #include "comphelper/servicedecl.hxx" @@ -77,7 +76,6 @@ namespace DECLARE_CREATEINSTANCE_NAMESPACE( svt, OAddressBookSourceDialogUno ) DECLARE_CREATEINSTANCE( SvFilterOptionsDialog ) DECLARE_CREATEINSTANCE_NAMESPACE( unographic, GraphicProvider ) -DECLARE_CREATEINSTANCE_NAMESPACE( unographic, GraphicRendererVCL ) extern "C" { @@ -122,13 +120,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svt_component_getFactory ( GraphicProvider_CreateInstance, GraphicProvider::getSupportedServiceNames_Static() ); } - else if( GraphicRendererVCL::getImplementationName_Static().equalsAscii( pImplementationName ) ) - { - xFactory = ::cppu::createOneInstanceFactory(xSMgr, - GraphicRendererVCL::getImplementationName_Static(), - GraphicRendererVCL_CreateInstance, - GraphicRendererVCL::getSupportedServiceNames_Static() ); - } else if (rtl_str_compare (pImplementationName, "com.sun.star.comp.embed.DocumentCloser") == 0) { xFactory = ::cppu::createOneInstanceFactory(xSMgr, diff --git a/svtools/util/svt.component b/svtools/util/svt.component index e389e2aeec38..021d23f462de 100644 --- a/svtools/util/svt.component +++ b/svtools/util/svt.component @@ -22,7 +22,8 @@ <implementation name="com.sun.star.comp.graphic.GraphicProvider"> <service name="com.sun.star.graphic.GraphicProvider"/> </implementation> - <implementation name="com.sun.star.comp.graphic.GraphicRendererVCL"> + <implementation name="com.sun.star.comp.graphic.GraphicRendererVCL" + constructor="com_sun_star_comp_graphic_GraphicRendererVCL_get_implementation"> <service name="com.sun.star.graphic.GraphicRendererVCL"/> </implementation> <implementation name="com.sun.star.comp.svtools.OAddressBookSourceDialogUno"> |