[Libreoffice-commits] core.git: chart2/inc chart2/source include/comphelper

Stephan Bergmann sbergman at redhat.com
Tue Apr 21 06:19:27 PDT 2015


 chart2/inc/ChartModel.hxx                                   |    8 
 chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx |    8 
 include/comphelper/implbase_var.hxx                         |  218 ------------
 3 files changed, 4 insertions(+), 230 deletions(-)

New commits:
commit 7eabf180a9a117164412ed6c0ce1bf14bc58ccaa
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Apr 21 15:01:39 2015 +0200

    Get rid of unnecessary comphelper/implbase_var.hxx parts
    
    Change-Id: I85da73dadfdb62c09b5ef5f59a0cf05a0235eaf5

diff --git a/chart2/inc/ChartModel.hxx b/chart2/inc/ChartModel.hxx
index 1fe210f..9e71caa 100644
--- a/chart2/inc/ChartModel.hxx
+++ b/chart2/inc/ChartModel.hxx
@@ -56,13 +56,9 @@
 #include <com/sun/star/embed/XStorage.hpp>
 #include <com/sun/star/datatransfer/XTransferable.hpp>
 
-#ifndef INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_23
-#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_23
-#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 23
-#include "comphelper/implbase_var.hxx"
-#endif
 #include <osl/mutex.hxx>
 #include <rtl/ref.hxx>
+#include <cppuhelper/implbase.hxx>
 #include <cppuhelper/interfacecontainer.hxx>
 #include <svtools/grfmgr.hxx>
 
@@ -78,7 +74,7 @@ namespace impl
 {
 
 // Note: needed for queryInterface (if it calls the base-class implementation)
-typedef ::comphelper::WeakImplHelper23<
+typedef cppu::WeakImplHelper<
 //       ::com::sun::star::frame::XModel        //comprehends XComponent (required interface), base of XChartDocument
          ::com::sun::star::util::XCloseable     //comprehends XCloseBroadcaster
         ,::com::sun::star::frame::XStorable2    //(extension of XStorable)
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx
index 31b35ce..0b78160 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx
@@ -22,12 +22,6 @@
 #include "WrappedPropertySet.hxx"
 #include "DiagramHelper.hxx"
 
-#ifndef INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_13
-#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_13
-#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 13
-#include "comphelper/implbase_var.hxx"
-#endif
-
 #include <comphelper/uno3.hxx>
 #include <cppuhelper/interfacecontainer.hxx>
 #include <com/sun/star/chart2/XChartDocument.hpp>
@@ -59,7 +53,7 @@ namespace wrapper
 
 class Chart2ModelContact;
 
-class DiagramWrapper : public ::comphelper::ImplInheritanceHelper13<
+class DiagramWrapper : public cppu::ImplInheritanceHelper<
                       WrappedPropertySet
                      , ::com::sun::star::chart::XDiagram
                      , ::com::sun::star::chart::XAxisSupplier
diff --git a/include/comphelper/implbase_var.hxx b/include/comphelper/implbase_var.hxx
index cc771b3..0d77e32 100644
--- a/include/comphelper/implbase_var.hxx
+++ b/include/comphelper/implbase_var.hxx
@@ -21,11 +21,8 @@
     of interfaces:
 
     comphelper::ImplHelper<N> <typename Ifc1, ..., typename Ifc<N> >
-    comphelper::WeakImplHelper<N> <typename Ifc1, ..., typename Ifc<N> >
-    comphelper::WeakComponentImplHelper<N> <typename Ifc1, ...,
+    comphelper::PartialWeakComponentImplHelper<N> <typename Ifc1, ...,
                                             typename Ifc<N> >
-    comphelper::ImplInheritanceHelper<N> <typename BaseClass,
-                                          typename Ifc1, ..., typename Ifc<N> >
 
     as already present in headers cppuhelper/implbase<1-12>.hxx and
     cppuhelper/compbase<1-12>.hxx.
@@ -165,219 +162,6 @@ public:
         { return ::cppu::ImplHelper_getImplementationId( cd::get() ); }
 };
 
-/** Implementation helper implementing interfaces
-    ::com::sun::star::lang::XTypeProvider and
-    ::com::sun::star::uno::XInterface
-    which supports weak mechanism to be held weakly
-    (supporting ::com::sun::star::uno::XWeak through ::cppu::OWeakObject).
-
-    @derive
-    Inherit from this class giving your interface(s) to be implemented as
-    template argument(s).  Your sub class defines method implementations for
-    these interface(s).
-*/
-template< BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER,
-                               typename Ifc) >
-class SAL_NO_VTABLE BOOST_PP_CAT(WeakImplHelper,
-                                 COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
-    : public ::cppu::OWeakObject,
-      public ::com::sun::star::lang::XTypeProvider,
-      BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, public Ifc)
-{
-    /// @internal
-    struct cd : public ::rtl::StaticAggregate<
-        ::cppu::class_data,
-        BOOST_PP_CAT(detail::ImplClassData,
-                     COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
-        <
-            BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc),
-            BOOST_PP_CAT(WeakImplHelper, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)<
-                BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc)>
-        > > {};
-
-public:
-    virtual ::com::sun::star::uno::Any
-        SAL_CALL queryInterface( ::com::sun::star::uno::Type const& rType )
-        throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-    {
-        return ::cppu::WeakImplHelper_query(
-            rType, cd::get(), this, static_cast<OWeakObject *>(this) );
-    }
-    virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
-        { OWeakObject::acquire(); }
-    virtual void SAL_CALL release() throw () SAL_OVERRIDE
-        { OWeakObject::release(); }
-    virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
-        SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-        { return ::cppu::WeakImplHelper_getTypes( cd::get() ); }
-    virtual ::com::sun::star::uno::Sequence<sal_Int8>
-        SAL_CALL getImplementationId()
-        throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-        { return ::cppu::ImplHelper_getImplementationId( cd::get() ); }
-};
-
-/** Implementation helper implementing interfaces
-    ::com::sun::star::lang::XTypeProvider and
-    ::com::sun::star::uno::XInterface inherting from a BaseClass.
-
-    All acquire() and release() calls are delegated to the BaseClass.
-    Upon queryInterface(), if a demanded interface is not supported by this
-    class directly, the request is delegated to the BaseClass.
-
-    @attention
-    The BaseClass has to be complete in a sense, that
-    ::com::sun::star::uno::XInterface and
-    ::com::sun::star::lang::XTypeProvider are implemented properly.
-    The BaseClass must have at least one ctor that can be called with
-    COMPHELPER_IMPLBASE_MAX_CTOR_ARGS or fewer arguments.
-
-    @derive
-    Inherit from this class giving your additional interface(s) to be
-    implemented as template argument(s).  Your sub class defines method
-    implementations for these interface(s).
-*/
-template <typename BaseClass,
-          BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER,
-                               typename Ifc) >
-class SAL_NO_VTABLE BOOST_PP_CAT(ImplInheritanceHelper,
-                                 COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
-    : public BaseClass,
-      BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, public Ifc)
-{
-    /// @internal
-    struct cd : public ::rtl::StaticAggregate<
-        ::cppu::class_data,
-        BOOST_PP_CAT(detail::ImplClassData,
-                     COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
-        <
-            BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc),
-            BOOST_PP_CAT(ImplInheritanceHelper,
-                         COMPHELPER_IMPLBASE_INTERFACE_NUMBER)<
-                BaseClass,
-                BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc)>
-        > > {};
-
-protected:
-#define COMPHELPER_IMPLBASE_templctor_args(z_, n_, unused_) \
-    BOOST_PP_CAT(T, n_) const& BOOST_PP_CAT(arg, n_)
-#define COMPHELPER_IMPLBASE_templctor(z_, n_, classname_) \
-    template< BOOST_PP_ENUM_PARAMS( BOOST_PP_ADD(n_, 1), typename T) > \
-    explicit BOOST_PP_CAT(classname_, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)( \
-        BOOST_PP_ENUM(BOOST_PP_ADD(n_, 1), \
-                      COMPHELPER_IMPLBASE_templctor_args, ~) ) \
-        : BaseClass( BOOST_PP_ENUM_PARAMS(BOOST_PP_ADD(n_, 1), arg) ) {}
-
-    BOOST_PP_CAT(ImplInheritanceHelper, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)()
-        : BaseClass() {}
-    BOOST_PP_REPEAT(COMPHELPER_IMPLBASE_MAX_CTOR_ARGS,
-                    COMPHELPER_IMPLBASE_templctor, ImplInheritanceHelper)
-
-public:
-    virtual ::com::sun::star::uno::Any
-        SAL_CALL queryInterface( ::com::sun::star::uno::Type const& rType )
-        throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
-    {
-        ::com::sun::star::uno::Any const aRet(
-            ::cppu::ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
-        if (aRet.hasValue())
-            return aRet;
-        return BaseClass::queryInterface( rType );
-    }
-    virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
-        { BaseClass::acquire(); }
-    virtual void SAL_CALL release() throw () SAL_OVERRIDE
-        { BaseClass::release(); }
-    virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
-        SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
-    {
-        return ::cppu::ImplInhHelper_getTypes(
-            cd::get(), BaseClass::getTypes() );
-    }
-    virtual ::com::sun::star::uno::Sequence<sal_Int8>
-        SAL_CALL getImplementationId()
-        throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
-        { return ::cppu::ImplHelper_getImplementationId( cd::get() ); }
-};
-
-// not needed anymore:
-#undef COMPHELPER_IMPLBASE_templctor_args
-#undef COMPHELPER_IMPLBASE_templctor
-
-/** Implementation helper supporting
-    ::com::sun::star::lang::XTypeProvider and
-    ::com::sun::star::lang::XComponent.
-
-    Upon disposing objects of this class, sub-classes receive a disposing()
-    call.  Objects of this class can be held weakly, i.e. by a
-    ::com::sun::star::uno::WeakReference.
-
-    @attention
-    The life-cycle of the passed mutex reference has to be longer than objects
-    of this class.
-
-    @derive
-    Inherit from this class giving your interface(s) to be implemented as
-    template argument(s).  Your sub class defines method implementations for
-    these interface(s).
-*/
-template < BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER,
-                                typename Ifc) >
-class SAL_NO_VTABLE BOOST_PP_CAT(WeakComponentImplHelper,
-                                 COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
-    : public ::cppu::WeakComponentImplHelperBase,
-      public ::com::sun::star::lang::XTypeProvider,
-      BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, public Ifc)
-{
-    /// @internal
-    struct cd : public ::rtl::StaticAggregate<
-        ::cppu::class_data,
-        BOOST_PP_CAT(detail::ImplClassData,
-                     COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
-        <
-            BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc),
-            BOOST_PP_CAT(WeakComponentImplHelper,
-                         COMPHELPER_IMPLBASE_INTERFACE_NUMBER)<
-                BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc)>
-        > > {};
-
-public:
-    BOOST_PP_CAT(WeakComponentImplHelper, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)(
-        ::osl::Mutex & rMutex ) : WeakComponentImplHelperBase(rMutex) {}
-
-    virtual ::com::sun::star::uno::Any
-        SAL_CALL queryInterface( ::com::sun::star::uno::Type const& rType )
-        throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-    {
-        return ::cppu::WeakComponentImplHelper_query(
-            rType, cd::get(), this,
-            static_cast< ::cppu::WeakComponentImplHelperBase * >(this) );
-    }
-    virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
-        { WeakComponentImplHelperBase::acquire(); }
-    virtual void SAL_CALL release() throw () SAL_OVERRIDE
-        { WeakComponentImplHelperBase::release(); }
-    virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
-        SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-        { return ::cppu::WeakComponentImplHelper_getTypes( cd::get() ); }
-    virtual ::com::sun::star::uno::Sequence<sal_Int8>
-        SAL_CALL getImplementationId()
-        throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-        { return ::cppu::ImplHelper_getImplementationId( cd::get() ); }
-
-    // implement XComponent directly avoiding ambiguities:
-    virtual void SAL_CALL dispose()
-        throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-        { WeakComponentImplHelperBase::dispose(); }
-    virtual void SAL_CALL addEventListener(
-        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener>
-        const & xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-        { WeakComponentImplHelperBase::addEventListener( xListener ); }
-    virtual void SAL_CALL removeEventListener(
-        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener>
-        const & xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-        { WeakComponentImplHelperBase::removeEventListener( xListener ); }
-};
-
 template < BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER,
                                 typename Ifc) >
 class SAL_NO_VTABLE BOOST_PP_CAT(PartialWeakComponentImplHelper,


More information about the Libreoffice-commits mailing list