summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2002-05-17 14:29:11 +0000
committerThomas Benisch <tbe@openoffice.org>2002-05-17 14:29:11 +0000
commit2b735db8db3efc8503fe6599f09f099e52db32d1 (patch)
treeff8f8861309b01ac691097cd6125cbc268f2fad5
parentc707826d199c4bdb0bbcd35374f8a84baf236aa2 (diff)
#97222# removed isShowing, isVisible, isFocusTraversable, addFocusListener, removeFocusListener
-rw-r--r--toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx10
-rw-r--r--toolkit/inc/toolkit/controls/accessiblecontrolcontext.hxx12
-rw-r--r--toolkit/source/awt/vclxaccessiblecomponent.cxx50
-rw-r--r--toolkit/source/controls/accessiblecontrolcontext.cxx40
4 files changed, 16 insertions, 96 deletions
diff --git a/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx b/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx
index 85e6466d4b7f..34e4b4625397 100644
--- a/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx
+++ b/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: vclxaccessiblecomponent.hxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: fs $ $Date: 2002-05-08 15:41:59 $
+ * last change: $Author: tbe $ $Date: 2002-05-17 15:27:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -155,11 +155,6 @@ public:
// ::drafts::com::sun::star::accessibility::XAccessibleComponent
::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAt( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException);
- sal_Bool SAL_CALL isShowing( ) throw (::com::sun::star::uno::RuntimeException);
- sal_Bool SAL_CALL isVisible( ) throw (::com::sun::star::uno::RuntimeException);
- sal_Bool SAL_CALL isFocusTraversable( ) throw (::com::sun::star::uno::RuntimeException);
- void SAL_CALL addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- void SAL_CALL removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding( ) throw (::com::sun::star::uno::RuntimeException);
@@ -199,7 +194,6 @@ private:
Reference< XAccessibleStateSet > getAccessibleStateSet() => overload FillAccessibleStateSet( ... )
// ::drafts::com::sun::star::accessibility::XAccessibleComponent
- sal_Bool isFocusTraversable()
Any getAccessibleKeyBinding()
---------------------------------------------------------- */
diff --git a/toolkit/inc/toolkit/controls/accessiblecontrolcontext.hxx b/toolkit/inc/toolkit/controls/accessiblecontrolcontext.hxx
index a4a4a7a8e127..f8d2f023fc21 100644
--- a/toolkit/inc/toolkit/controls/accessiblecontrolcontext.hxx
+++ b/toolkit/inc/toolkit/controls/accessiblecontrolcontext.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: accessiblecontrolcontext.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2002-04-26 14:30:04 $
+ * last change: $Author: tbe $ $Date: 2002-05-17 15:28:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -150,11 +150,6 @@ namespace toolkit
// XAccessibleComponent
virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAt( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isShowing( ) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isVisible( ) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isFocusTraversable( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding( ) throw (::com::sun::star::uno::RuntimeException);
@@ -180,6 +175,9 @@ namespace toolkit
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2002/04/26 14:30:04 fs
+ * initial checkin - fallback AccessibleContext for uno controls
+ *
*
* Revision 1.0 17.04.2002 12:34:01 fs
************************************************************************/
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index dfea0ef4917b..1c4a1ad37a01 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: vclxaccessiblecomponent.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: fs $ $Date: 2002-05-08 15:44:41 $
+ * last change: $Author: tbe $ $Date: 2002-05-17 15:27:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -576,54 +576,12 @@ awt::Point VCLXAccessibleComponent::getLocationOnScreen( ) throw (uno::RuntimeE
return aPos;
}
-sal_Bool VCLXAccessibleComponent::isShowing() throw (uno::RuntimeException)
-{
- OContextEntryGuard( this );
-
- sal_Bool bShowing = sal_False;
- if ( GetWindow() && GetWindow()->IsVisible() )
- bShowing = GetWindow()->IsReallyVisible(); // I hope IsReallyVisible is doing everything I need?
-
- return bShowing;
-}
-
-sal_Bool VCLXAccessibleComponent::isVisible() throw (uno::RuntimeException)
-{
- OContextEntryGuard( this );
-
- sal_Bool bVisible = sal_False;
- if ( GetWindow() )
- bVisible = GetWindow()->IsVisible();
-
- return bVisible;
-}
-
-sal_Bool VCLXAccessibleComponent::isFocusTraversable() throw (uno::RuntimeException)
-{
- return FALSE;
-}
-
-void VCLXAccessibleComponent::addFocusListener( const uno::Reference< awt::XFocusListener >& xListener ) throw (uno::RuntimeException)
-{
- OContextEntryGuard( this );
-
- if ( mxWindow.is() )
- mxWindow->addFocusListener( xListener );
-}
-
-void VCLXAccessibleComponent::removeFocusListener( const uno::Reference< awt::XFocusListener >& xListener ) throw (uno::RuntimeException)
-{
- OContextEntryGuard( this );
-
- if ( mxWindow.is() )
- mxWindow->removeFocusListener( xListener );
-}
-
void VCLXAccessibleComponent::grabFocus( ) throw (uno::RuntimeException)
{
OContextEntryGuard( this );
- if ( mxWindow.is() && isFocusTraversable() )
+ uno::Reference< accessibility::XAccessibleStateSet > xStates = getAccessibleStateSet();
+ if ( mxWindow.is() && xStates.is() && xStates->contains( accessibility::AccessibleStateType::FOCUSABLE ) )
mxWindow->setFocus();
}
diff --git a/toolkit/source/controls/accessiblecontrolcontext.cxx b/toolkit/source/controls/accessiblecontrolcontext.cxx
index 2c6bab1681fb..7a97097ad64a 100644
--- a/toolkit/source/controls/accessiblecontrolcontext.cxx
+++ b/toolkit/source/controls/accessiblecontrolcontext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: accessiblecontrolcontext.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2002-04-26 14:31:31 $
+ * last change: $Author: tbe $ $Date: 2002-05-17 15:29:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -351,39 +351,6 @@ namespace toolkit
}
//--------------------------------------------------------------------
- sal_Bool SAL_CALL OAccessibleControlContext::isShowing( ) throw (RuntimeException)
- {
- // TODO
- return sal_True;
- }
-
- //--------------------------------------------------------------------
- sal_Bool SAL_CALL OAccessibleControlContext::isVisible( ) throw (RuntimeException)
- {
- // TODO
- return sal_True;
- }
-
- //--------------------------------------------------------------------
- sal_Bool SAL_CALL OAccessibleControlContext::isFocusTraversable( ) throw (RuntimeException)
- {
- // UNO controls in design mode are not focussable
- return sal_False;
- }
-
- //--------------------------------------------------------------------
- void SAL_CALL OAccessibleControlContext::addFocusListener( const Reference< awt::XFocusListener >& xListener ) throw (RuntimeException)
- {
- OSL_ENSURE( sal_False, "OAccessibleControlContext::addFocusListener: !isFocusTraversable, but addFocusListener!" );
- }
-
- //--------------------------------------------------------------------
- void SAL_CALL OAccessibleControlContext::removeFocusListener( const Reference< awt::XFocusListener >& xListener ) throw (RuntimeException)
- {
- OSL_ENSURE( sal_False, "OAccessibleControlContext::removeFocusListener: !isFocusTraversable, but removeFocusListener!" );
- }
-
- //--------------------------------------------------------------------
void SAL_CALL OAccessibleControlContext::grabFocus( ) throw (RuntimeException)
{
OSL_ENSURE( sal_False, "OAccessibleControlContext::grabFocus: !isFocusTraversable, but grabFocus!" );
@@ -403,6 +370,9 @@ namespace toolkit
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2002/04/26 14:31:31 fs
+ * initial checkin - fallback AccessibleContext for uno controls
+ *
*
* Revision 1.0 17.04.2002 12:50:51 fs
************************************************************************/