summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-05-22 07:48:30 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-05-22 07:48:30 +0000
commitcf6e77b1fa90ffe033120fc27834d7a252dd530f (patch)
treee1fc7efb1f1c0f307e96e30c60c2f91c84d84fd1 /toolkit
parentb1743706aa6f71d1ba90ed27cb1e2ca9d855e73f (diff)
INTEGRATION: CWS uno4 (1.46.8); FILE MERGED
2003/05/06 11:58:13 tbe 1.46.8.1: #i14101# getAccessibleAtPoint() should return only direct children
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxaccessiblecomponent.cxx31
1 files changed, 21 insertions, 10 deletions
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index 6b3519326aa7..e7ef7451644f 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: vclxaccessiblecomponent.cxx,v $
*
- * $Revision: 1.46 $
+ * $Revision: 1.47 $
*
- * last change: $Author: vg $ $Date: 2003-04-24 16:23:02 $
+ * last change: $Author: vg $ $Date: 2003-05-22 08:48:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -767,16 +767,27 @@ uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::getAccessi
{
OExternalLockGuard aGuard( this );
- uno::Reference< accessibility::XAccessible > xAcc;
-
- if ( GetWindow() )
+ uno::Reference< accessibility::XAccessible > xChild;
+ for ( sal_uInt32 i = 0, nCount = getAccessibleChildCount(); i < nCount; ++i )
{
- Window* pWindow = GetWindow()->FindWindow( VCLPoint( rPoint ) );
- if ( pWindow && pWindow != GetWindow() )
- xAcc = pWindow->GetAccessible();
-
+ uno::Reference< accessibility::XAccessible > xAcc = getAccessibleChild( i );
+ if ( xAcc.is() )
+ {
+ uno::Reference< accessibility::XAccessibleComponent > xComp( xAcc->getAccessibleContext(), uno::UNO_QUERY );
+ if ( xComp.is() )
+ {
+ Rectangle aRect = VCLRectangle( xComp->getBounds() );
+ Point aPos = VCLPoint( rPoint );
+ if ( aRect.IsInside( aPos ) )
+ {
+ xChild = xAcc;
+ break;
+ }
+ }
+ }
}
- return xAcc;
+
+ return xChild;
}
// accessibility::XAccessibleComponent