[Libreoffice-commits] .: 3 commits - comphelper/inc svtools/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Mar 28 07:25:08 PDT 2011


 comphelper/inc/comphelper/accessiblewrapper.hxx |   10 +++--
 comphelper/inc/comphelper/implbase_var.hxx      |   46 ++++++++++++++++++++++++
 svtools/source/control/toolbarmenuimp.hxx       |   24 +++++++++---
 svtools/source/control/valueimp.hxx             |   11 ++++-
 4 files changed, 78 insertions(+), 13 deletions(-)

New commits:
commit dc562ea25696c02384566d0f7a011636d2a7c3bf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 28 13:26:27 2011 +0100

    add PartialWeakComponentImplHelperX for overloaded-virtual

diff --git a/comphelper/inc/comphelper/implbase_var.hxx b/comphelper/inc/comphelper/implbase_var.hxx
index a96c578..09a916a 100644
--- a/comphelper/inc/comphelper/implbase_var.hxx
+++ b/comphelper/inc/comphelper/implbase_var.hxx
@@ -396,6 +396,52 @@ public:
         { WeakComponentImplHelperBase::removeEventListener( xListener ); }
 };
 
+template < BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER,
+                                typename Ifc) >
+class SAL_NO_VTABLE BOOST_PP_CAT(PartialWeakComponentImplHelper,
+                                 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(PartialWeakComponentImplHelper,
+                         COMPHELPER_IMPLBASE_INTERFACE_NUMBER)<
+                BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc)>
+        > > {};
+
+public:
+    BOOST_PP_CAT(PartialWeakComponentImplHelper, 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)
+    {
+        return ::cppu::WeakComponentImplHelper_query(
+            rType, cd::get(), this,
+            static_cast< ::cppu::WeakComponentImplHelperBase * >(this) );
+    }
+    virtual void SAL_CALL acquire() throw ()
+        { WeakComponentImplHelperBase::acquire(); }
+    virtual void SAL_CALL release() throw ()
+        { WeakComponentImplHelperBase::release(); }
+    virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
+        SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
+        { return ::cppu::WeakComponentImplHelper_getTypes( cd::get() ); }
+    virtual ::com::sun::star::uno::Sequence<sal_Int8>
+        SAL_CALL getImplementationId()
+        throw (::com::sun::star::uno::RuntimeException)
+        { return ::cppu::ImplHelper_getImplementationId( cd::get() ); }
+};
+
+
 } // namespace comphelper
 
 // undef for multiple use/inclusion of this header:
commit 0c9708505db4e371d74883761cee9ee055ce42bf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 28 11:30:46 2011 +0100

    use PartialWeakComponentImplHelperX for overloaded-virtual

diff --git a/svtools/source/control/toolbarmenuimp.hxx b/svtools/source/control/toolbarmenuimp.hxx
index bb330c6..1db1f95 100644
--- a/svtools/source/control/toolbarmenuimp.hxx
+++ b/svtools/source/control/toolbarmenuimp.hxx
@@ -115,7 +115,7 @@ public:
 // - ToolbarMenuAcc -
 // ---------------
 
-typedef ::cppu::WeakComponentImplHelper5<
+typedef ::cppu::PartialWeakComponentImplHelper5<
     ::com::sun::star::accessibility::XAccessible,
     ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
     ::com::sun::star::accessibility::XAccessibleContext,
@@ -136,13 +136,20 @@ public:
     bool                HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); }
 
 public:
+
+    // XComponent
+    virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException)
+        { WeakComponentImplHelperBase::dispose(); }
+    virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException)
+        { WeakComponentImplHelperBase::addEventListener(xListener); }
+    virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException)
+        { WeakComponentImplHelperBase::removeEventListener(xListener); }
+
     // XAccessible
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (::com::sun::star::uno::RuntimeException);
 
     // XAccessibleEventBroadcaster
-    using cppu::WeakComponentImplHelper5<com::sun::star::accessibility::XAccessible, com::sun::star::accessibility::XAccessibleEventBroadcaster, com::sun::star::accessibility::XAccessibleContext, com::sun::star::accessibility::XAccessibleComponent, com::sun::star::accessibility::XAccessibleSelection>::addEventListener;
     virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
-    using cppu::WeakComponentImplHelper5<com::sun::star::accessibility::XAccessible, com::sun::star::accessibility::XAccessibleEventBroadcaster, com::sun::star::accessibility::XAccessibleContext, com::sun::star::accessibility::XAccessibleComponent, com::sun::star::accessibility::XAccessibleSelection>::removeEventListener;
     virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
 
     // XAccessibleContext
@@ -205,7 +212,7 @@ private:
 // - ToolbarMenuEntryAcc -
 // -----------------------
 
-typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::accessibility::XAccessible,
+typedef ::cppu::PartialWeakComponentImplHelper4< ::com::sun::star::accessibility::XAccessible,
                                                      ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
                                                      ::com::sun::star::accessibility::XAccessibleContext,
                                                      ::com::sun::star::accessibility::XAccessibleComponent > ToolbarMenuEntryAccBase;
@@ -220,13 +227,18 @@ public:
     void    FireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue );
     bool    HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); }
 
+    virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException)
+        { WeakComponentImplHelperBase::dispose(); }
+    virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException)
+        { WeakComponentImplHelperBase::addEventListener(xListener); }
+    virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException)
+        { WeakComponentImplHelperBase::removeEventListener(xListener); }
+
     // XAccessible
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (::com::sun::star::uno::RuntimeException);
 
     // XAccessibleEventBroadcaster
-    using ToolbarMenuEntryAccBase::addEventListener;
     virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
-    using ToolbarMenuEntryAccBase::removeEventListener;
     virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
 
     // XAccessibleContext
diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx
index cefda47..865e0ac 100644
--- a/svtools/source/control/valueimp.hxx
+++ b/svtools/source/control/valueimp.hxx
@@ -119,7 +119,7 @@ struct ValueSet_Impl
 // - ValueSetAcc -
 // ---------------
 
-typedef ::cppu::WeakComponentImplHelper6<
+typedef ::cppu::PartialWeakComponentImplHelper6<
     ::com::sun::star::accessibility::XAccessible,
     ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
     ::com::sun::star::accessibility::XAccessibleContext,
@@ -154,14 +154,19 @@ public:
     */
     void LoseFocus (void);
 
+    // XComponent
+    virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException)
+        { WeakComponentImplHelperBase::dispose(); }
+    virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException)
+        { WeakComponentImplHelperBase::addEventListener(xListener); }
+    virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException)
+        { WeakComponentImplHelperBase::removeEventListener(xListener); }
 
     // XAccessible
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (::com::sun::star::uno::RuntimeException);
 
     // XAccessibleEventBroadcaster
-    using cppu::WeakComponentImplHelper6<com::sun::star::accessibility::XAccessible, com::sun::star::accessibility::XAccessibleEventBroadcaster, com::sun::star::accessibility::XAccessibleContext, com::sun::star::accessibility::XAccessibleComponent, com::sun::star::accessibility::XAccessibleSelection, com::sun::star::lang::XUnoTunnel>::addEventListener;
     virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
-    using cppu::WeakComponentImplHelper6<com::sun::star::accessibility::XAccessible, com::sun::star::accessibility::XAccessibleEventBroadcaster, com::sun::star::accessibility::XAccessibleContext, com::sun::star::accessibility::XAccessibleComponent, com::sun::star::accessibility::XAccessibleSelection, com::sun::star::lang::XUnoTunnel>::removeEventListener;
     virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
 
     // XAccessibleContext
commit 875ea3d5844d21550d1aa6f0b3330b5d591137e2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 28 11:02:50 2011 +0100

    use PartialWeakComponentImplHelperX for overloaded-virtual

diff --git a/comphelper/inc/comphelper/accessiblewrapper.hxx b/comphelper/inc/comphelper/accessiblewrapper.hxx
index 6f03b6b..246fc63 100644
--- a/comphelper/inc/comphelper/accessiblewrapper.hxx
+++ b/comphelper/inc/comphelper/accessiblewrapper.hxx
@@ -238,7 +238,7 @@ namespace comphelper
     //=========================================================================
     //= OAccessibleContextWrapper
     //=========================================================================
-    typedef ::cppu::WeakComponentImplHelper2<	::com::sun::star::accessibility::XAccessibleEventBroadcaster
+    typedef ::cppu::PartialWeakComponentImplHelper2<	::com::sun::star::accessibility::XAccessibleEventBroadcaster
                                             ,	::com::sun::star::accessibility::XAccessibleContext
                                             >	OAccessibleContextWrapper_CBase;
 
@@ -293,16 +293,18 @@ namespace comphelper
         virtual ::com::sun::star::lang::Locale SAL_CALL getLocale(  ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
 
         // XAccessibleEventBroadcaster
-        using WeakComponentImplHelperBase::addEventListener;
         virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
-        using WeakComponentImplHelperBase::removeEventListener;
         virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
 
         // OAccessibleContextWrapper
         virtual void notifyTranslatedEvent( const ::com::sun::star::accessibility::AccessibleEventObject& _rEvent ) throw (::com::sun::star::uno::RuntimeException);
 
-        // XComponent/OComponentProxyAggregationHelper
+        // XComponent
         virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException );
+        virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException)
+            { WeakComponentImplHelperBase::addEventListener(xListener); }
+        virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException)
+            { WeakComponentImplHelperBase::removeEventListener(xListener); }
 
         // OComponentHelper
         using OAccessibleContextWrapperHelper::disposing;


More information about the Libreoffice-commits mailing list