diff --git a/include/svx/unoshcol.hxx b/include/svx/unoshcol.hxx index b349b5e01ea2..523313f6213b 100644 --- a/include/svx/unoshcol.hxx +++ b/include/svx/unoshcol.hxx @@ -81,11 +81,8 @@ public: virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); - static com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static(); - static OUString getImplementationName_Static(); }; -::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SvxShapeCollection_createInstance( const com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMgr ); #endif diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx index 660a0cea43f8..1c952142427a 100644 --- a/svx/source/unodraw/unoctabl.cxx +++ b/svx/source/unodraw/unoctabl.cxx @@ -25,7 +25,6 @@ #include "../customshapes/EnhancedCustomShapeEngine.hxx" #include -#include "svx/unoshcol.hxx" using namespace ::com::sun::star; using namespace ::rtl; @@ -249,13 +248,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svx_component_getFactory ( create_EnhancedCustomShapeEngine, EnhancedCustomShapeEngine_getSupportedServiceNames() ); } - else if( rtl_str_compare( pImplName, "com.sun.star.drawing.SvxShapeCollection" ) == 0 ) - { - xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), - SvxShapeCollection::getImplementationName_Static(), - SvxShapeCollection_createInstance, - SvxShapeCollection::getSupportedServiceNames_Static() ); - } if( xFactory.is()) { diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx index 2850e1efb958..66b2195ed309 100644 --- a/svx/source/unodraw/unoshcol.cxx +++ b/svx/source/unodraw/unoshcol.cxx @@ -18,9 +18,10 @@ */ #include +#include -#include "svx/unoshcol.hxx" #include +#include #include using namespace ::cppu; @@ -209,11 +210,6 @@ sal_Bool SAL_CALL SvxShapeCollection::hasElements() throw( uno::RuntimeException // XServiceInfo OUString SAL_CALL SvxShapeCollection::getImplementationName() throw( uno::RuntimeException ) -{ - return getImplementationName_Static(); -} - -OUString SvxShapeCollection::getImplementationName_Static() { return OUString("com.sun.star.drawing.SvxShapeCollection"); } @@ -225,11 +221,6 @@ sal_Bool SAL_CALL SvxShapeCollection::supportsService( const OUString& ServiceNa } uno::Sequence< OUString > SAL_CALL SvxShapeCollection::getSupportedServiceNames() throw( uno::RuntimeException ) -{ - return getSupportedServiceNames_Static(); -} - -uno::Sequence< OUString > SvxShapeCollection::getSupportedServiceNames_Static() { uno::Sequence< OUString > aSeq(2); aSeq.getArray()[0] = "com.sun.star.drawing.Shapes"; @@ -237,9 +228,16 @@ uno::Sequence< OUString > SvxShapeCollection::getSupportedServiceNames_Static() return aSeq; } -Reference< XInterface > SAL_CALL SvxShapeCollection_createInstance( const Reference< ::com::sun::star::lang::XMultiServiceFactory >& ) +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_drawing_SvxShapeCollection_implementation_getFactory( + SAL_UNUSED_PARAMETER css::uno::XComponentContext *, + uno_Sequence * arguments) { - return *( new SvxShapeCollection() ); + assert(arguments != 0 && arguments->nElements == 0); (void) arguments; + css::uno::Reference x( + static_cast(new SvxShapeCollection)); + x->acquire(); + return x.get(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/util/svx.component b/svx/util/svx.component index 3aedd3ae871c..da40ece83729 100644 --- a/svx/util/svx.component +++ b/svx/util/svx.component @@ -35,7 +35,8 @@ - +