diff options
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleContextBase.cxx | 48 | ||||
-rw-r--r-- | sc/source/ui/inc/AccessibleContextBase.hxx | 32 |
2 files changed, 73 insertions, 7 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx index 891c47d427f0..1cdc4f361932 100644 --- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx @@ -2,9 +2,9 @@ * * $RCSfile: AccessibleContextBase.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: sab $ $Date: 2002-03-21 06:44:43 $ + * last change: $Author: sab $ $Date: 2002-03-22 16:21:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -94,6 +94,12 @@ #ifndef _TOOLKIT_HELPER_CONVERT_HXX_ #include <toolkit/helper/convert.hxx> #endif +#ifndef _SFXSMPLHINT_HXX +#include <svtools/smplhint.hxx> +#endif +#ifndef _COMPHELPER_SEQUENCE_HXX_ +#include <comphelper/sequence.hxx> +#endif using namespace ::rtl; using namespace ::com::sun::star; @@ -175,12 +181,44 @@ void SAL_CALL ScAccessibleContextBase::disposing() xBroadcaster->removeEventListener(this); mxParent = NULL; } + + ScAccessibleContextBaseWeakImpl::disposing(); +} + +//===== XInterface ===================================================== + +uno::Any SAL_CALL ScAccessibleContextBase::queryInterface( uno::Type const & rType ) + throw (uno::RuntimeException) +{ + uno::Any aAny (ScAccessibleContextBaseWeakImpl::queryInterface(rType)); + return aAny.hasValue() ? aAny : ScAccessibleContextBaseImplEvent::queryInterface(rType); +} + +void SAL_CALL ScAccessibleContextBase::acquire() + throw () +{ + ScAccessibleContextBaseWeakImpl::acquire(); +} + +void SAL_CALL ScAccessibleContextBase::release() + throw () +{ + ScAccessibleContextBaseWeakImpl::release(); } //===== SfxListener ===================================================== void ScAccessibleContextBase::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { + if (rHint.ISA( SfxSimpleHint ) ) + { + const SfxSimpleHint& rRef = (const SfxSimpleHint&)rHint; + if (rRef.GetId() == SFX_HINT_DYING) + { + // it seems the Broadcaster is dying, since the view is dying + dispose(); + } + } } //===== XAccessible ========================================================= @@ -539,6 +577,12 @@ uno::Sequence< ::rtl::OUString> SAL_CALL //===== XTypeProvider ======================================================= +uno::Sequence< uno::Type > SAL_CALL ScAccessibleContextBase::getTypes() + throw (uno::RuntimeException) +{ + return comphelper::concatSequences(ScAccessibleContextBaseWeakImpl::getTypes(), ScAccessibleContextBaseImplEvent::getTypes()); +} + uno::Sequence<sal_Int8> SAL_CALL ScAccessibleContextBase::getImplementationId(void) throw (uno::RuntimeException) diff --git a/sc/source/ui/inc/AccessibleContextBase.hxx b/sc/source/ui/inc/AccessibleContextBase.hxx index c2c919b5ea36..3097581659ed 100644 --- a/sc/source/ui/inc/AccessibleContextBase.hxx +++ b/sc/source/ui/inc/AccessibleContextBase.hxx @@ -2,9 +2,9 @@ * * $RCSfile: AccessibleContextBase.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: sab $ $Date: 2002-03-21 06:43:57 $ + * last change: $Author: sab $ $Date: 2002-03-22 16:20:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -108,7 +108,10 @@ #ifndef _SFXLSTNER_HXX //autogen #include <svtools/lstner.hxx> #endif -#include <cppuhelper/compbase6.hxx> +#include <cppuhelper/compbase5.hxx> +#ifndef _CPPUHELPER_IMPLBASE1_HXX_ +#include <cppuhelper/implbase1.hxx> +#endif #include <unotools/servicehelper.hxx> #include <comphelper/broadcasthelper.hxx> @@ -119,18 +122,22 @@ class Rectangle; <code>AccessibleContext</code> service. */ -typedef cppu::WeakAggComponentImplHelper6< +typedef cppu::WeakAggComponentImplHelper5< ::drafts::com::sun::star::accessibility::XAccessible, ::drafts::com::sun::star::accessibility::XAccessibleComponent, ::drafts::com::sun::star::accessibility::XAccessibleContext, ::drafts::com::sun::star::accessibility::XAccessibleEventBroadcaster, - ::drafts::com::sun::star::accessibility::XAccessibleEventListener, ::com::sun::star::lang::XServiceInfo > ScAccessibleContextBaseWeakImpl; +typedef cppu::ImplHelper1< + ::drafts::com::sun::star::accessibility::XAccessibleEventListener + > ScAccessibleContextBaseImplEvent; + class ScAccessibleContextBase : public comphelper::OBaseMutex, public ScAccessibleContextBaseWeakImpl, + public ScAccessibleContextBaseImplEvent, public SfxListener { public: @@ -149,6 +156,16 @@ public: virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + ///===== XInterface ===================================================== + + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( + ::com::sun::star::uno::Type const & rType ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL acquire() throw (); + + virtual void SAL_CALL release() throw (); + ///===== XAccessible ===================================================== /// Return the XAccessibleContext. @@ -310,6 +327,11 @@ public: ///===== XTypeProvider =================================================== + /// returns the possible types + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL + getTypes() + throw (::com::sun::star::uno::RuntimeException); + /** Returns a implementation id. */ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL |