summaryrefslogtreecommitdiff
path: root/svx/source/accessibility/GraphCtlAccessibleContext.cxx
diff options
context:
space:
mode:
authorAndre Fischer <af@openoffice.org>2002-09-12 08:54:31 +0000
committerAndre Fischer <af@openoffice.org>2002-09-12 08:54:31 +0000
commit08f9220081e3f7ff4207906fea3f6484e6289897 (patch)
treedbf3d9a0e38f989262769b622fbadaecc249dd84 /svx/source/accessibility/GraphCtlAccessibleContext.cxx
parent8e561cca1ac888a8b2950eda8c6a5ef2e314781b (diff)
#103174# Adapted contains() to current specification of the XAccessibleComponent interface.
Diffstat (limited to 'svx/source/accessibility/GraphCtlAccessibleContext.cxx')
-rw-r--r--svx/source/accessibility/GraphCtlAccessibleContext.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index bf2bb9dca102..3afb35b34847 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: GraphCtlAccessibleContext.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: af $ $Date: 2002-09-12 09:39:07 $
+ * last change: $Author: af $ $Date: 2002-09-12 09:54:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -259,10 +259,12 @@ Reference< XAccessibleContext > SAL_CALL SvxGraphCtrlAccessibleContext::getAcces
sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::contains( const awt::Point& rPoint ) throw( RuntimeException )
{
- // no guard -> done in getBounds()
- awt::Rectangle aBounds( getBounds() );
- return !((rPoint.X < aBounds.X) || (rPoint.X > (aBounds.X + aBounds.Width)) ||
- (rPoint.Y < aBounds.Y) || (rPoint.Y > (aBounds.Y + aBounds.Height)));
+ // no guard -> done in getSize()
+ awt::Size aSize (getSize());
+ return (rPoint.X >= 0)
+ && (rPoint.X < aSize.Width)
+ && (rPoint.Y >= 0)
+ && (rPoint.Y < aSize.Height);
}
//-----------------------------------------------------------------------------