From 5a1cd2f30d9cc8b9a6ce5eaed06af199080055b7 Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Mon, 29 Feb 2016 19:46:58 +0100 Subject: OSingletonRegistration is dead now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I64a5ffa8790496bd39ba26e0c789db9eedc51071 Reviewed-on: https://gerrit.libreoffice.org/22788 Tested-by: Jenkins Reviewed-by: Matúš Kukan --- comphelper/source/inc/comphelper_module.hxx | 14 ----------- compilerplugins/clang/refcounting.cxx | 3 --- include/comphelper/componentmodule.hxx | 38 ----------------------------- include/unotools/componentresmodule.hxx | 13 ---------- 4 files changed, 68 deletions(-) diff --git a/comphelper/source/inc/comphelper_module.hxx b/comphelper/source/inc/comphelper_module.hxx index 2364adf95b6e..8c587f033a1b 100644 --- a/comphelper/source/inc/comphelper_module.hxx +++ b/comphelper/source/inc/comphelper_module.hxx @@ -64,20 +64,6 @@ namespace comphelper { namespace module } }; - /* -------------------------------------------------------------------- */ - template < class TYPE > - class OSingletonRegistration : public ::comphelper::OSingletonRegistration< TYPE > - { - private: - typedef ::comphelper::OSingletonRegistration< TYPE > BaseClass; - - public: - OSingletonRegistration() : BaseClass( ComphelperModule::getInstance() ) - { - } - }; - - } } // namespace comphelper::module diff --git a/compilerplugins/clang/refcounting.cxx b/compilerplugins/clang/refcounting.cxx index 0e899f362387..663fcb7a3958 100644 --- a/compilerplugins/clang/refcounting.cxx +++ b/compilerplugins/clang/refcounting.cxx @@ -112,7 +112,6 @@ static std::vector PROBABLY_GOOD_TEMPLATES = { "com::sun::star::uno::Sequence", "accessibility::WeakCppRef", "dba::OAutoRegistration", - "dba::OSingletonRegistration", "dbp::OMultiInstanceAutoRegistration", "dbaui::OMultiInstanceAutoRegistration", "dbaxml::OMultiInstanceAutoRegistration", @@ -120,7 +119,6 @@ static std::vector PROBABLY_GOOD_TEMPLATES = { "io_acceptor::ReferenceHash", "comphelper::OAutoRegistration", "comphelper::OInterfaceCompare", - "comphelper::module::OSingletonRegistration", "comphelper::WeakBag", "comphelper::service_decl::class_", "comphelper::service_decl::vba_service_class_", @@ -131,7 +129,6 @@ static std::vector PROBABLY_GOOD_TEMPLATES = { "dbmm::OAutoRegistration", "pcr::OAutoRegistration", "logging::ComponentMethodGuard", - "logging::OSingletonRegistration", "logging::OAutoRegistration", "rtl::Reference", "sdbtools::OAutoRegistration", diff --git a/include/comphelper/componentmodule.hxx b/include/comphelper/componentmodule.hxx index 9317916ae276..b14148a4ad6e 100644 --- a/include/comphelper/componentmodule.hxx +++ b/include/comphelper/componentmodule.hxx @@ -202,44 +202,6 @@ namespace comphelper ); } - - //= OSingletonRegistration - - template - class OSingletonRegistration - { - public: - /** automatically provides all component information to an OModule instance, - for a singleton component - -

Assumed that the template argument has the three methods -

    -
  • static OUString getImplementationName_static()
  • -
  • static css::uno::Sequence< OUString > getSupportedServiceNames_static()
  • -
  • static OUString getSingletonName_static()
  • -
  • static css::uno::Reference< css::uno::XInterface > - Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&) -
  • -
      - the instantiation of this object will automatically register the class via OModule::registerImplementation. -

      - */ - OSingletonRegistration( OModule& _rModule ); - }; - - template - - OSingletonRegistration::OSingletonRegistration( OModule& _rModule ) - { - _rModule.registerImplementation( ComponentDescription( - TYPE::getImplementationName_static(), - TYPE::getSupportedServiceNames_static(), - &TYPE::Create, - &::cppu::createSingleComponentFactory - ) ); - } - - } // namespace comphelper diff --git a/include/unotools/componentresmodule.hxx b/include/unotools/componentresmodule.hxx index bc35a6cd1a0c..c63d10c100a3 100644 --- a/include/unotools/componentresmodule.hxx +++ b/include/unotools/componentresmodule.hxx @@ -121,19 +121,6 @@ namespace utl OAutoRegistration() : BaseClass( ModuleClass::getInstance() ) \ { \ } \ - }; \ - \ - /* -------------------------------------------------------------------- */ \ - template < class TYPE > \ - class OSingletonRegistration : public ::comphelper::OSingletonRegistration< TYPE > \ - { \ - private: \ - typedef ::comphelper::OSingletonRegistration< TYPE > BaseClass; \ - \ - public: \ - OSingletonRegistration() : BaseClass( ModuleClass::getInstance() ) \ - { \ - } \ }; //= implementing a concrete module -- cgit v1.2.3