diff options
author | Andre Fischer <af@openoffice.org> | 2002-09-12 08:54:31 +0000 |
---|---|---|
committer | Andre Fischer <af@openoffice.org> | 2002-09-12 08:54:31 +0000 |
commit | 08f9220081e3f7ff4207906fea3f6484e6289897 (patch) | |
tree | dbf3d9a0e38f989262769b622fbadaecc249dd84 /svx/source/accessibility/GraphCtlAccessibleContext.cxx | |
parent | 8e561cca1ac888a8b2950eda8c6a5ef2e314781b (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.cxx | 14 |
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); } //----------------------------------------------------------------------------- |