From 2367b9ed3e51f034f78f4d62ad72535cbde052ba Mon Sep 17 00:00:00 2001
From: Sascha Ballach
Date: Thu, 14 Feb 2002 15:47:38 +0000
Subject: #95584#; some hints for Accessibility added
---
sc/source/ui/inc/AccessibilityHints.hxx | 119 ++++++++++++
sc/source/ui/inc/AccessibleContextBase.hxx | 281 ++++++++++++++++++++++++++---
sc/source/ui/inc/AccessibleDocument.hxx | 105 ++++++++---
sc/source/ui/inc/AccessibleSpreadsheet.hxx | 66 ++++++-
sc/source/ui/inc/AccessibleTableBase.hxx | 42 ++---
sc/source/ui/inc/tabvwsh.hxx | 13 +-
6 files changed, 542 insertions(+), 84 deletions(-)
create mode 100644 sc/source/ui/inc/AccessibilityHints.hxx
(limited to 'sc')
diff --git a/sc/source/ui/inc/AccessibilityHints.hxx b/sc/source/ui/inc/AccessibilityHints.hxx
new file mode 100644
index 000000000000..e65b07ab1704
--- /dev/null
+++ b/sc/source/ui/inc/AccessibilityHints.hxx
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * $RCSfile: AccessibilityHints.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: sab $ $Date: 2002-02-14 16:47:38 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef SC_ACCESSIBILITYHINTS_HXX
+#define SC_ACCESSIBILITYHINTS_HXX
+
+#ifndef SC_VIEWDATA_HXX
+#include "viewdata.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_XINTERFACE_HPP_
+#include
+#endif
+
+#ifndef _SFXSMPLHINT_HXX
+#include
+#endif
+#ifndef _SFXHINT_HXX //autogen
+#include
+#endif
+
+#define SC_HINT_ACC_SIMPLE_START SFX_HINT_USER00
+#define SC_HINT_ACC_TABLECHANGED SC_HINT_ACC_SIMPLE_START + 1
+
+// ---------------------------------------------------------------------------
+
+class ScAccGridViewChangeHint : public SfxHint
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ xOldAccessible;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ xNewAccessible;
+ ScSplitPos eOldGridWin;
+ ScSplitPos eNewGridWin;
+public:
+ TYPEINFO();
+ ScAccGridViewChangeHint( ScSplitPos eOldGridWin, ScSplitPos eNewGridWin,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xOld,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xNew );
+ ~ScAccGridViewChangeHint();
+
+ ScSplitPos GetOldGridWin() const { return eOldGridWin; }
+ ScSplitPos GetNewGridWin() const { return eNewGridWin; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ GetOldAccessible() const { return xOldAccessible; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ GetNewAccessible() const { return xOldAccessible; }
+};
+
+class ScAccActiveCellChangeHint : public SfxHint
+{
+ ScAddress aNewCellAddress;
+public:
+ TYPEINFO();
+ ScAccActiveCellChangeHint( const ScAddress& rNewCell );
+ ~ScAccActiveCellChangeHint();
+
+ ScAddress GetNewCellAddress() const { return aNewCellAddress; };
+};
+
+#endif
diff --git a/sc/source/ui/inc/AccessibleContextBase.hxx b/sc/source/ui/inc/AccessibleContextBase.hxx
index 3783c46cfae9..6b52d52b1875 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.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: hjs $ $Date: 2002-02-08 11:42:57 $
+ * last change: $Author: sab $ $Date: 2002-02-14 16:47:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,15 +66,18 @@
#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_
#include
#endif
+#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLECOMPONENT_HPP_
+#include
+#endif
#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLECONTEXT_HPP_
#include
#endif
+#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEEVENTBROADCASTER_HPP_
+#include
+#endif
#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_IllegalAccessibleComponentStateException_HPP_
#include
#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
-#include
-#endif
#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
#include
@@ -102,20 +105,28 @@
#endif
-#include
+#ifndef _SFXLSTNER_HXX //autogen
+#include
+#endif
+#include
#include
+class Rectangle;
+
/** @descr
This base class provides an implementation of the
AccessibleContext
service.
*/
class ScAccessibleContextBase
- : public cppu::WeakImplHelper4<
+ : public cppu::WeakImplHelper6<
::drafts::com::sun::star::accessibility::XAccessible,
+ ::drafts::com::sun::star::accessibility::XAccessibleComponent,
::drafts::com::sun::star::accessibility::XAccessibleContext,
+ ::drafts::com::sun::star::accessibility::XAccessibleEventBroadcaster,
::com::sun::star::lang::XServiceInfo,
::com::sun::star::lang::XServiceName
- >
+ >,
+ public SfxListener
{
public:
//===== internal ========================================================
@@ -124,9 +135,14 @@ public:
const ::com::sun::star::uno::Reference<
::drafts::com::sun::star::accessibility::XAccessible>& rxParent,
const sal_Int16 aRole);
+
+ virtual void SetDefunc();
protected:
virtual ~ScAccessibleContextBase (void);
public:
+ //===== SfxListener =====================================================
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
//===== XAccessible =====================================================
@@ -134,6 +150,199 @@ public:
virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
getAccessibleContext (void) throw (::com::sun::star::uno::RuntimeException);
+ //===== XAccessibleComponent ============================================
+
+ /** Tests whether the specified point lies within this object's bounds.
+
+ The test point's coordinates are defined relative to the
+ coordinate system of the object.
+
+ @param point
+ Coordinates of the point to test.
+
+ @return
+ Returns if the point lies within or on the object's bounding
+ box and 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.
+
+ 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 getLocation and
+ getSize return the same information. With method
+ getLocationOnScreen you can get the bound box
+ position in screen coordinates.
+
+ @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.
.
+
+ The coordinates of the bounding box are given relative to the
+ parent's coordinate system.
+
+ @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.
+
+ This method returns the same point as does the method
+ getLocation. 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.
+
+ @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.
+
+ 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 setVisible on the objects
+ and on its parents.
+
+ @return
+ Returns if the object is showing and otherwise.
+
+ @see isVisible, setVisible
+ */
+ virtual sal_Bool SAL_CALL isShowing( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Determines if the object is visible.
+
+ 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 AccessibleStateType::VISIBLE state set in its
+ AccessibleStateSet.
+
+ @return
+ Returns if the object is visible and 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.
+
+ If it can it has also set the
+ AccessibleStateType::FOCUSABLE state set in its
+ AccessibleStateSet.
+
+ @return
+ An object returns if it can accept the focus and returns
+ otherwise.
+ */
+ virtual sal_Bool SAL_CALL isFocusTraversable( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Adds a new focus listener.
+
+
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.
+
+ @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.
+
+ 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 addFocusListener then this method call is
+ ignored.
+
+ @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.
+
+ If this object can not accept the focus,
+ i.e. isFocusTraversable returns 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 requestFocus
in
+ the Java Accessibility API 1.4.
+ */
+ virtual void SAL_CALL grabFocus( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns the key bindings associated with this object.
+
+ This method stems from the Java interface
+ AccessibleExtendedComponent
.
+
+ @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 ==============================================
/// Return the number of currently visible children.
@@ -143,8 +352,8 @@ public:
/// 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)
- throw (::com::sun::star::uno::RuntimeException/*,
- ::com::sun::star::lang::IndexOutOfBoundsException*/);
+ 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
@@ -191,20 +400,22 @@ public:
throw (::com::sun::star::uno::RuntimeException,
::drafts::com::sun::star::accessibility::IllegalAccessibleComponentStateException);
- /** Add listener that is informed of future changes of name and
- description properties.
+ //===== XAccessibleEventBroadcaster =====================================
+
+ /** Add listener that is informed of future changes of name,
+ description and so on events.
*/
virtual void SAL_CALL
- addPropertyChangeListener (
+ addEventListener (
const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertyChangeListener>& xListener)
+ ::drafts::com::sun::star::accessibility::XAccessibleEventListener>& xListener)
throw (com::sun::star::uno::RuntimeException);
- // Remove an existing property change listener.
+ // Remove an existing event listener.
virtual void SAL_CALL
- removePropertyChangeListener (
+ removeEventListener (
const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertyChangeListener>& xListener)
+ ::drafts::com::sun::star::accessibility::XAccessibleEventListener>& xListener)
throw (com::sun::star::uno::RuntimeException);
//===== XServiceInfo ====================================================
@@ -255,11 +466,36 @@ public:
protected:
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleDescription (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current name.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current bounding box relative to the desktop.
+ virtual Rectangle GetBoundingBoxOnScreen(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current bounding box relative to the parent object.
+ virtual Rectangle GetBoundingBox(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
/// Calls all Listener to tell they the change.
void
- CommitChange(const rtl::OUString& rPropertyName,
- const com::sun::star::uno::Any& rNewValue,
- const com::sun::star::uno::Any& rOldValue);
+ CommitChange(const drafts::com::sun::star::accessibility::AccessibleEventObject& rEvent);
+
+ /// Calls all Listener to tell they that the object is now DEFUNC
+ void CommitDefunc();
+
+ /// Calls all FocusListener to tell they that the focus is gained.
+ void CommitFocusGained(const com::sun::star::awt::FocusEvent& rFocusEvent);
+
+ /// 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;
@@ -281,7 +517,10 @@ private:
::rtl::OUString msName;
/// List of property change listeners.
- cppu::OInterfaceContainerHelper* mpPropertyChangeListeners;
+ cppu::OInterfaceContainerHelper* mpEventListeners;
+
+ /// List of focus listeners.
+ cppu::OInterfaceContainerHelper* mpFocusListeners;
/** This is the role of this object.
*/
diff --git a/sc/source/ui/inc/AccessibleDocument.hxx b/sc/source/ui/inc/AccessibleDocument.hxx
index a890c03abd7d..3f6c2be7d354 100644
--- a/sc/source/ui/inc/AccessibleDocument.hxx
+++ b/sc/source/ui/inc/AccessibleDocument.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessibleDocument.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: sab $ $Date: 2002-01-30 15:46:12 $
+ * last change: $Author: sab $ $Date: 2002-02-14 16:47:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,17 +66,14 @@
#ifndef _SC_ACCESSIBLE_CONTEXT_BASE_HXX
#include "AccessibleContextBase.hxx"
#endif
-
-#ifndef _COM_SUN_STAR_SHEET_XSPREADSHEETVIEW_HPP_
-#include
-#endif
-#ifndef _COM_SUN_STAR_SHEET_XSPREADSHEETDOCUMENT_HPP_
-#include
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
-#include
+#ifndef SC_VIEWDATA_HXX
+#include "viewdata.hxx"
#endif
+class ScTabViewShell;
+class ScAccessibleSpreadsheet;
+class SdrPage;
+
/** @descr
This base class provides an implementation of the
AccessibleContext
service.
@@ -90,10 +87,48 @@ public:
ScAccessibleDocument(
const ::com::sun::star::uno::Reference<
::drafts::com::sun::star::accessibility::XAccessible>& rxParent,
- const com::sun::star::uno::Reference
- < com::sun::star::sheet::XSpreadsheetView >& rxSheetView);
+ ScTabViewShell* pViewShell,
+ ScSplitPos eSplitPos);
virtual ~ScAccessibleDocument (void);
+ virtual void SetDefunc();
+
+ //===== SfxListener =====================================================
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ //===== XAccessibleComponent ============================================
+
+ /** 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);
+
+ /** Grabs the focus to this object.
+
+ If this object can not accept the focus,
+ i.e. isFocusTraversable returns 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 requestFocus
in
+ the Java Accessibility API 1.4.
+ */
+ virtual void SAL_CALL grabFocus( )
+ throw (::com::sun::star::uno::RuntimeException);
//===== XAccessibleContext ==============================================
@@ -124,20 +159,40 @@ public:
protected:
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleDescription (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current name.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current bounding box relative to the desktop.
+ virtual Rectangle GetBoundingBoxOnScreen(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current bounding box relative to the parent object.
+ virtual Rectangle GetBoundingBox(void)
+ throw (::com::sun::star::uno::RuntimeException);
private:
- /** UNO API representation of the view of this object.
- It is used to get all needed information. It gives access to the current sheet and so on.
- */
- com::sun::star::uno::Reference < com::sun::star::sheet::XSpreadsheetView > mxSheetView;
+ ScTabViewShell* mpViewShell;
+ ScSplitPos meSplitPos;
+ ScAccessibleSpreadsheet* mpAccessibleSpreadsheet;
+
+ sal_uInt16 getVisibleTable();
+
+ ::com::sun::star::uno::Reference
+ < ::drafts::com::sun::star::accessibility::XAccessible >
+ GetAccessibleSpreadsheet();
- com::sun::star::uno::Reference < com::sun::star::frame::XModel >
- getModel(const com::sun::star::uno::Reference
- < com::sun::star::sheet::XSpreadsheetView >& rxSheetView);
- sal_Int32 getVisibleTable();
- sal_Bool ScAccessibleDocument::HasDrawPages(
- com::sun::star::uno::Reference
- & rxDoc);
+ void FreeAccessibleSpreadsheet();
+
+ void ClearMemberAndDisableListening();
+
+ SdrPage* GetDrawPage();
sal_Bool IsDefunc(
const com::sun::star::uno::Reference<
@@ -151,8 +206,6 @@ private:
sal_Bool IsVisible(
const com::sun::star::uno::Reference<
::drafts::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
-
- com::sun::star::uno::Reference < com::sun::star::frame::XModel > mxModel;
};
diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
index 24b0c84fb4d6..7cc8c14a9ed6 100644
--- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx
+++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessibleSpreadsheet.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: sab $ $Date: 2002-01-30 15:46:12 $
+ * last change: $Author: sab $ $Date: 2002-02-14 16:47:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,6 +64,11 @@
#define _SC_ACCESSIBLESPREADSHEET_HXX
#include "AccessibleTableBase.hxx"
+#ifndef SC_VIEWDATA_HXX
+#include "viewdata.hxx"
+#endif
+
+class ScTabViewShell;
/** @descr
This base class provides an implementation of the
@@ -77,10 +82,45 @@ public:
ScAccessibleSpreadsheet (
const ::com::sun::star::uno::Reference<
::drafts::com::sun::star::accessibility::XAccessible>& rxParent,
- const com::sun::star::uno::Reference <
- com::sun::star::sheet::XSpreadsheetView >& rxSheetView);
+ ScTabViewShell* pViewShell,
+ sal_uInt16 nTab,
+ ScSplitPos eSplitPos);
virtual ~ScAccessibleSpreadsheet ();
+ void SetDefunc();
+
+ //===== SfxListener =====================================================
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ //===== XAccessibleTable ================================================
+
+ /// Returns the Accessible at a specified row and column in the table.
+ virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleComponent ============================================
+
+ /** 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);
+
//===== XAccessibleContext ==============================================
/// Return the set of current states.
@@ -98,13 +138,17 @@ public:
throw (::com::sun::star::uno::RuntimeException);
protected:
+ /// Return the object's current bounding box relative to the desktop.
+ virtual Rectangle GetBoundingBoxOnScreen(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current bounding box relative to the parent object.
+ virtual Rectangle GetBoundingBox(void)
+ throw (::com::sun::star::uno::RuntimeException);
private:
- com::sun::star::table::CellRangeAddress
- getRange(const com::sun::star::uno::Reference<
- com::sun::star::sheet::XSpreadsheetView>& rxSheetView);
- com::sun::star::table::CellRangeAddress
- getRange(const com::sun::star::uno::Reference<
- com::sun::star::sheet::XSpreadsheet>& rxSheet);
+ ScTabViewShell* mpViewShell;
+ ScSplitPos meSplitPos;
+ ScAddress maActiveCell;
sal_Bool IsDefunc(
const com::sun::star::uno::Reference<
@@ -121,6 +165,8 @@ private:
sal_Bool IsVisible(
const com::sun::star::uno::Reference<
::drafts::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+
+ ScDocument* GetDocument(ScTabViewShell* mpViewShell);
};
diff --git a/sc/source/ui/inc/AccessibleTableBase.hxx b/sc/source/ui/inc/AccessibleTableBase.hxx
index 56b3d57bdff2..45f798023a12 100644
--- a/sc/source/ui/inc/AccessibleTableBase.hxx
+++ b/sc/source/ui/inc/AccessibleTableBase.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessibleTableBase.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: sab $ $Date: 2002-01-30 15:46:12 $
+ * last change: $Author: sab $ $Date: 2002-02-14 16:47:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,17 +66,15 @@
#ifndef _SC_ACCESSIBLE_CONTEXT_BASE_HXX
#include "AccessibleContextBase.hxx"
#endif
+#ifndef SC_SCGLOB_HXX
+#include "global.hxx"
+#endif
#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLETABLE_HPP_
#include
#endif
-#ifndef _COM_SUN_STAR_SHEET_XSPREADSHEETVIEW_HDL_
-#include
-#endif
-#ifndef _COM_SUN_STAR_TABLE_CELLRANGEADDRESS_HPP_
-#include
-#endif
+class ScTabViewShell;
/** @descr
This base class provides an implementation of the
@@ -91,11 +89,12 @@ public:
ScAccessibleTableBase (
const ::com::sun::star::uno::Reference<
::drafts::com::sun::star::accessibility::XAccessible>& rxParent,
- const com::sun::star::uno::Reference <
- com::sun::star::sheet::XSpreadsheetView >& rxSheetView,
- const com::sun::star::table::CellRangeAddress& rRange);
+ ScDocument* pDoc,
+ const ScRange& rRange);
virtual ~ScAccessibleTableBase ();
+ virtual void SetDefunc();
+
//===== XInterface ======================================================
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
@@ -221,16 +220,16 @@ public:
/// Return the number of currently visible children.
// is overloaded to calculate this on demand
- virtual long SAL_CALL
+ virtual sal_Int32 SAL_CALL
getAccessibleChildCount (void)
throw (::com::sun::star::uno::RuntimeException);
/// Return the specified child or NULL if index is invalid.
// is overloaded to calculate this on demand
virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible> SAL_CALL
- getAccessibleChild (long nIndex)
- throw (::com::sun::star::uno::RuntimeException/*,
- ::com::sun::star::lang::IndexOutOfBoundsException*/);
+ getAccessibleChild (sal_Int32 nIndex)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
protected:
/// Return this object's description.
@@ -295,17 +294,10 @@ public:
protected:
-
- /** UNO API representation of the view of the current document.
- */
- com::sun::star::uno::Reference < com::sun::star::sheet::XSpreadsheetView > mxSheetView;
-
- /** UNO API representation of the current sheet.
- */
- com::sun::star::uno::Reference < com::sun::star::sheet::XSpreadsheet > mxSheet;
-
/// contains the range of the table, because it could be a subrange of the complete table
- com::sun::star::table::CellRangeAddress maRange;
+ ScRange maRange;
+
+ ScDocument* mpDoc;
};
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 426501b97e10..42ec59bde7b3 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tabvwsh.hxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: dr $ $Date: 2001-11-02 14:15:44 $
+ * last change: $Author: sab $ $Date: 2002-02-14 16:47:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -209,6 +209,9 @@ private:
USHORT nChartDestTab;
USHORT nCurRefDlgId;
+ SfxBroadcaster* pAccessibilityBroadcaster;
+
+
private:
void Construct();
@@ -442,6 +445,12 @@ public:
void StopSimpleRefDialog();
void SetCurRefDlgId( USHORT nNew );
+
+ void AddAccessibilityObject( SfxListener& rObject );
+ void RemoveAccessibilityObject( SfxListener& rObject );
+ void BroadcastAccessibility( const SfxHint &rHint );
+ BOOL HasAccessibilityObjects();
+
};
//==================================================================
--
cgit