diff options
author | Sascha Ballach <sab@openoffice.org> | 2002-02-25 10:46:49 +0000 |
---|---|---|
committer | Sascha Ballach <sab@openoffice.org> | 2002-02-25 10:46:49 +0000 |
commit | 05f53acb3c786215643fdd703d36fda3f3dbdbca (patch) | |
tree | 37ba0984399c162cebe70e414d0ff42d97061d33 /sc/source/ui/inc/AccessibleContextBase.hxx | |
parent | 894a1f26e530b8f0f5d0b79279e70f1566bd6508 (diff) |
#95584#; some cosmetic fixes
Diffstat (limited to 'sc/source/ui/inc/AccessibleContextBase.hxx')
-rw-r--r-- | sc/source/ui/inc/AccessibleContextBase.hxx | 220 |
1 files changed, 36 insertions, 184 deletions
diff --git a/sc/source/ui/inc/AccessibleContextBase.hxx b/sc/source/ui/inc/AccessibleContextBase.hxx index 040e0460d2ff..3fc4ea2da17c 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.5 $ + * $Revision: 1.6 $ * - * last change: $Author: sab $ $Date: 2002-02-20 13:50:58 $ + * last change: $Author: sab $ $Date: 2002-02-25 11:45:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -130,295 +130,148 @@ class ScAccessibleContextBase { public: //===== internal ======================================================== - ScAccessibleContextBase (const sal_Int16 aRole); - ScAccessibleContextBase ( + ScAccessibleContextBase(const sal_Int16 aRole); + ScAccessibleContextBase( const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible>& rxParent, const sal_Int16 aRole); virtual void SetDefunc(); protected: - virtual ~ScAccessibleContextBase (void); + virtual ~ScAccessibleContextBase(void); public: - //===== SfxListener ===================================================== + ///===== SfxListener ===================================================== virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - //===== XAccessible ===================================================== + ///===== XAccessible ===================================================== /// Return the XAccessibleContext. virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleContext> SAL_CALL - getAccessibleContext (void) throw (::com::sun::star::uno::RuntimeException); + getAccessibleContext(void) throw (::com::sun::star::uno::RuntimeException); - //===== XAccessibleComponent ============================================ + ///===== XAccessibleComponent ============================================ - /** Tests whether the specified point lies within this object's bounds. - - <p>The test point's coordinates are defined relative to the - coordinate system of the object.</p> - - @param point - Coordinates of the point to test. - - @return - Returns <TRUE/> if the point lies within or on the object's bounding - box and <FALSE/> otherwise. - */ virtual sal_Bool SAL_CALL contains( const ::com::sun::star::awt::Point& rPoint ) throw (::com::sun::star::uno::RuntimeException); - /** Returns the Accessible child that is rendered under the given point. - - @param aPoint - Coordinates of the test point for which to find the Accessible - child. - - @return - If there is one child which is rendered so that its bounding box - contains the test point then a reference to that object is - returned. If there is more than one child which satisfies that - condition then a reference to that one is returned that is - painted on top of the others. If no there is no child which is - rendered at the test point an empty reference is returned. - */ virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAt( const ::com::sun::star::awt::Point& rPoint ) throw (::com::sun::star::uno::RuntimeException); - /** Returns the bounding box of this object. - - <p>The returned bounding box has the form of a rectangle. Its - coordinates are relative to the object's parent coordinate system. - Note that the two methods <member>getLocation</member> and - <member>getSize</member> return the same information. With method - <member>getLocationOnScreen</member> you can get the bound box - position in screen coordinates.</p> - - @return - The coordinates of the returned rectangle are relative to this - object's parent or relative to the screen on which this object - is rendered if it has no parent. If the object is not on any - screen the returnred rectangle is empty and located at position - (0,0). - */ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds( ) throw (::com::sun::star::uno::RuntimeException); - - /** Returns the location of the upper left corner of the object's - bounding box relative to the parent.</p>. - - <p>The coordinates of the bounding box are given relative to the - parent's coordinate system.</p> - - @return - The coordinates of the returned position are relative to this - object's parent or relative to the screen on which this object - is rendered if it has no parent. If the object is not on any - screen the returnred position is (0,0). - */ virtual ::com::sun::star::awt::Point SAL_CALL getLocation( ) throw (::com::sun::star::uno::RuntimeException); - /** Returns the location of the upper left corner of the object's - bounding box in screen coordinates. - - <p>This method returns the same point as does the method - <member>getLocation</member>. The difference is that the - coordinates are absolute screen coordinates of the screen to which - the object is rendered instead of being relative to the object's - parent.</p> - - @return - The coordinates of the returned position are relative to the - screen on which this object is rendered. If the object is not - on any screen the returnred position is (0,0). - */ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException); - /** Returns the size of this object's bounding box. - - @return - The returned size is the size of this object or empty if it is - not rendered on any screen. - */ virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException); - /** Determines if the object is showing. - - <p>An object is showing if it and all its parents are visible. This - does not neccessarily mean that the object is visible on the screen. - There may be other objects obscuring it. The showing property can - be modified by calling <member>setVisible</member> on the objects - and on its parents.</p> - - @return - Returns <TRUE/> if the object is showing and <FALSE/> otherwise. - - @see isVisible, setVisible - */ virtual sal_Bool SAL_CALL isShowing( ) throw (::com::sun::star::uno::RuntimeException); - /** Determines if the object is visible. - - <p>If an object and all of its parents are visible then the object - is also called showing. If an object is showing then it has also - set the <const>AccessibleStateType::VISIBLE</const> state set in its - <type>AccessibleStateSet</type>.</p> - - @return - Returns <TRUE/> if the object is visible and <FALSE/> otherwise. - - @see isShowing - */ virtual sal_Bool SAL_CALL isVisible( ) throw (::com::sun::star::uno::RuntimeException); - /** Returns whether the object can accept the focus or not. - - <p>If it can it has also set the - <const>AccessibleStateType::FOCUSABLE</const> state set in its - <type>AccessibleStateSet</type>. - - @return - An object returns <TRUE/> if it can accept the focus and returns - <FALSE/> otherwise. - */ virtual sal_Bool SAL_CALL isFocusTraversable( ) throw (::com::sun::star::uno::RuntimeException); - /** Adds a new focus listener. - - <p>The focus listener will receive future focus events from this - component. If the specified listener is already a member of the set - of registered focus listeners this method call is ignored.</p> - - @param xListener - The listener object that is called for future focus events. - */ virtual void SAL_CALL addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - /** Removes a focus listener. - - <p>The specified focus listener will no longer receive focus events - from this component. If this listener has not been added by a prior - call to <member>addFocusListener</member> then this method call is - ignored.</p> - - @param xListener - Listener to remove from the list of focus listener. - */ virtual void SAL_CALL removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - /** Grabs the focus to this object. - - <p>If this object can not accept the focus, - i.e. <member>isFocusTraversable</member> returns <FALSE/> for this - object then nothing happens. Otherwise the object will attempt to - take the focus. Nothing happens if that fails, otherwise the object - has the focus. This method is called <code>requestFocus</code> in - the Java Accessibility API 1.4.</p> - */ virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException); - /** Returns the key bindings associated with this object. - - <p>This method stems from the Java interface - <code>AccessibleExtendedComponent</code>.</p> - - @return - The returned value represents the current key bindings - associated with this object. - */ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding( ) throw (::com::sun::star::uno::RuntimeException); - //===== XAccessibleContext ============================================== + ///===== XAccessibleContext ============================================== /// Return the number of currently visible children. virtual long SAL_CALL - getAccessibleChildCount (void) throw (::com::sun::star::uno::RuntimeException); + getAccessibleChildCount(void) throw (::com::sun::star::uno::RuntimeException); /// Return the specified child or NULL if index is invalid. virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible> SAL_CALL - getAccessibleChild (long nIndex) + getAccessibleChild(long nIndex) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException); /// Return a reference to the parent. virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible> SAL_CALL - getAccessibleParent (void) + getAccessibleParent(void) throw (::com::sun::star::uno::RuntimeException); /// Return this objects index among the parents children. virtual sal_Int32 SAL_CALL - getAccessibleIndexInParent (void) + getAccessibleIndexInParent(void) throw (::com::sun::star::uno::RuntimeException); /// Return this object's role. virtual sal_Int16 SAL_CALL - getAccessibleRole (void) + getAccessibleRole(void) throw (::com::sun::star::uno::RuntimeException); /// Return this object's description. virtual ::rtl::OUString SAL_CALL - getAccessibleDescription (void) + getAccessibleDescription(void) throw (::com::sun::star::uno::RuntimeException); /// Return the object's current name. virtual ::rtl::OUString SAL_CALL - getAccessibleName (void) + getAccessibleName(void) throw (::com::sun::star::uno::RuntimeException); /// Return NULL to indicate that an empty relation set. virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL - getAccessibleRelationSet (void) + getAccessibleRelationSet(void) throw (::com::sun::star::uno::RuntimeException); /// Return the set of current states. virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL - getAccessibleStateSet (void) + getAccessibleStateSet(void) throw (::com::sun::star::uno::RuntimeException); /** Return the parents locale or throw exception if this object has no parent yet/anymore. */ virtual ::com::sun::star::lang::Locale SAL_CALL - getLocale (void) + getLocale(void) throw (::com::sun::star::uno::RuntimeException, ::drafts::com::sun::star::accessibility::IllegalAccessibleComponentStateException); - //===== XAccessibleEventBroadcaster ===================================== + ///===== XAccessibleEventBroadcaster ===================================== /** Add listener that is informed of future changes of name, description and so on events. */ virtual void SAL_CALL - addEventListener ( + addEventListener( const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleEventListener>& xListener) throw (com::sun::star::uno::RuntimeException); // Remove an existing event listener. virtual void SAL_CALL - removeEventListener ( + removeEventListener( const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleEventListener>& xListener) throw (com::sun::star::uno::RuntimeException); - //===== XAccessibleEventListener ======================================== + ///===== XAccessibleEventListener ======================================== virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) @@ -429,51 +282,50 @@ public: const ::drafts::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException); - //===== XServiceInfo ==================================================== + ///===== XServiceInfo ==================================================== /** Returns an identifier for the implementation of this object. */ virtual ::rtl::OUString SAL_CALL - getImplementationName (void) + getImplementationName(void) throw (::com::sun::star::uno::RuntimeException); /** Return whether the specified service is supported by this class. */ virtual sal_Bool SAL_CALL - supportsService (const ::rtl::OUString& sServiceName) + supportsService(const ::rtl::OUString& sServiceName) throw (::com::sun::star::uno::RuntimeException); /** Returns a list of all supported services. In this case that is just the AccessibleContext and Accessible service. */ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL - getSupportedServiceNames (void) + getSupportedServiceNames(void) throw (::com::sun::star::uno::RuntimeException); - - //===== XTypeProvider =================================================== + ///===== XTypeProvider =================================================== /** Returns a sequence of all supported interfaces. */ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL - getTypes (void) + getTypes(void) throw (::com::sun::star::uno::RuntimeException); /** Returns a implementation id. */ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL - getImplementationId (void) + getImplementationId(void) throw (::com::sun::star::uno::RuntimeException); protected: /// Return this object's description. virtual ::rtl::OUString SAL_CALL - createAccessibleDescription (void) + createAccessibleDescription(void) throw (::com::sun::star::uno::RuntimeException); /// Return the object's current name. virtual ::rtl::OUString SAL_CALL - createAccessibleName (void) + createAccessibleName(void) throw (::com::sun::star::uno::RuntimeException); /// Return the object's current bounding box relative to the desktop. @@ -497,9 +349,6 @@ protected: /// Calls all FocusListener to tell they that the focus is lost. void CommitFocusLost(const com::sun::star::awt::FocusEvent& rFocusEvent); - /// Mutex guarding this object. - ::osl::Mutex maMutex; - private: /// Reference to the parent object. ::com::sun::star::uno::Reference< @@ -516,6 +365,9 @@ private: */ ::rtl::OUString msName; + /// Mutex guarding the Listener container. + ::osl::Mutex maListenerMutex; + /// List of property change listeners. cppu::OInterfaceContainerHelper* mpEventListeners; |