diff --git a/comphelper/source/compare/AnyCompareFactory.cxx b/comphelper/source/compare/AnyCompareFactory.cxx index 21fa21da5eec..9eacb4fac518 100644 --- a/comphelper/source/compare/AnyCompareFactory.cxx +++ b/comphelper/source/compare/AnyCompareFactory.cxx @@ -17,13 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "comphelper_module.hxx" -#include "comphelper_services.hxx" - #include #include #include #include +#include #include #include #include @@ -74,11 +72,6 @@ public: virtual OUString SAL_CALL getImplementationName( ) throw(RuntimeException, std::exception) override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(RuntimeException, std::exception) override; virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(RuntimeException, std::exception) override; - - // XServiceInfo - static versions (used for component registration) - static OUString SAL_CALL getImplementationName_static(); - static Sequence< OUString > SAL_CALL getSupportedServiceNames_static(); - static Reference< XInterface > SAL_CALL Create( const Reference< XComponentContext >& ); }; sal_Int16 SAL_CALL AnyCompare::compare( const Any& any1, const Any& any2 ) throw(css::uno::RuntimeException, std::exception) @@ -120,11 +113,6 @@ void SAL_CALL AnyCompareFactory::initialize( const Sequence< Any >& aArguments ) } OUString SAL_CALL AnyCompareFactory::getImplementationName( ) throw( RuntimeException, std::exception ) -{ - return getImplementationName_static(); -} - -OUString SAL_CALL AnyCompareFactory::getImplementationName_static( ) { return OUString( "AnyCompareFactory" ); } @@ -135,26 +123,18 @@ sal_Bool SAL_CALL AnyCompareFactory::supportsService( const OUString& ServiceNam } Sequence< OUString > SAL_CALL AnyCompareFactory::getSupportedServiceNames( ) throw(RuntimeException, std::exception) -{ - return getSupportedServiceNames_static(); -} - -Sequence< OUString > SAL_CALL AnyCompareFactory::getSupportedServiceNames_static( ) { const OUString aServiceName( "com.sun.star.ucb.AnyCompareFactory" ); const Sequence< OUString > aSeq( &aServiceName, 1 ); return aSeq; } -Reference< XInterface > SAL_CALL AnyCompareFactory::Create( - const Reference< XComponentContext >& rxContext ) +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +AnyCompareFactory_get_implementation( + css::uno::XComponentContext *context, + css::uno::Sequence const &) { - return static_cast(new AnyCompareFactory( rxContext )); -} - -void createRegistryInfo_AnyCompareFactory() -{ - static ::comphelper::module::OAutoRegistration< AnyCompareFactory > aAutoRegistration; + return cppu::acquire(new AnyCompareFactory(context)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/inc/comphelper_services.hxx b/comphelper/source/inc/comphelper_services.hxx index 04cbcb38ef87..0f499f33dbd6 100644 --- a/comphelper/source/inc/comphelper_services.hxx +++ b/comphelper/source/inc/comphelper_services.hxx @@ -22,7 +22,6 @@ #include -void createRegistryInfo_AnyCompareFactory(); void createRegistryInfo_Map(); void createRegistryInfo_OInstanceLocker(); void createRegistryInfo_OPropertyBag(); diff --git a/comphelper/source/misc/comphelper_services.cxx b/comphelper/source/misc/comphelper_services.cxx index da76ced51edf..47fdf2047225 100644 --- a/comphelper/source/misc/comphelper_services.cxx +++ b/comphelper/source/misc/comphelper_services.cxx @@ -38,7 +38,6 @@ namespace comphelper { namespace module createRegistryInfo_SequenceOutputStream(); createRegistryInfo_SequenceInputStream(); createRegistryInfo_UNOMemoryStream(); - createRegistryInfo_AnyCompareFactory(); createRegistryInfo_OInstanceLocker(); createRegistryInfo_Map(); createRegistryInfo_OSimpleLogRing(); diff --git a/comphelper/util/comphelp.component b/comphelper/util/comphelp.component index a9481505c9d4..4de65e1c2c75 100644 --- a/comphelper/util/comphelp.component +++ b/comphelper/util/comphelp.component @@ -19,7 +19,8 @@ - +