[Libreoffice-commits] core.git: comphelper/source compilerplugins/clang include/comphelper include/unotools

Matúš Kukan matus.kukan at gmail.com
Tue Mar 1 19:37:19 UTC 2016


 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(-)

New commits:
commit 5a1cd2f30d9cc8b9a6ce5eaed06af199080055b7
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Mon Feb 29 19:46:58 2016 +0100

    OSingletonRegistration is dead now
    
    Change-Id: I64a5ffa8790496bd39ba26e0c789db9eedc51071
    Reviewed-on: https://gerrit.libreoffice.org/22788
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Matúš Kukan <matus at libreoffice.org>

diff --git a/comphelper/source/inc/comphelper_module.hxx b/comphelper/source/inc/comphelper_module.hxx
index 2364adf..8c587f0 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 0e899f3..663fcb7 100644
--- a/compilerplugins/clang/refcounting.cxx
+++ b/compilerplugins/clang/refcounting.cxx
@@ -112,7 +112,6 @@ static std::vector<std::string> 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<std::string> 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<std::string> 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 9317916..b14148a 100644
--- a/include/comphelper/componentmodule.hxx
+++ b/include/comphelper/componentmodule.hxx
@@ -202,44 +202,6 @@ namespace comphelper
         );
     }
 
-
-    //= OSingletonRegistration
-
-    template <class TYPE>
-    class OSingletonRegistration
-    {
-    public:
-        /** automatically provides all component information to an OModule instance,
-            for a singleton component
-
-            <p>Assumed that the template argument has the three methods
-                <ul>
-                    <li><code>static OUString getImplementationName_static()</code><li/>
-                    <li><code>static css::uno::Sequence< OUString > getSupportedServiceNames_static()</code><li/>
-                    <li><code>static OUString getSingletonName_static()</code></li>
-                    <li><code>static css::uno::Reference< css::uno::XInterface >
-                        Create(const css::uno::Reference< css::lang::XMultiServiceFactory >&)</code>
-                        </li>
-                <ul/>
-            the instantiation of this object will automatically register the class via <member>OModule::registerImplementation</member>.
-            </p>
-        */
-        OSingletonRegistration( OModule& _rModule );
-    };
-
-    template <class TYPE>
-
-    OSingletonRegistration<TYPE>::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 bc35a6c..c63d10c 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


More information about the Libreoffice-commits mailing list