diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2003-04-04 15:59:28 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2003-04-04 15:59:28 +0000 |
commit | 4cb3fbdbb34da78121f4b12ba7febf1cba000964 (patch) | |
tree | 6585e17608cb4772f6ad53fe47716da521901428 /svtools | |
parent | 51bc90abcb28db9ed1968f1bf90a14cdb20d0748 (diff) |
INTEGRATION: CWS uaa01 (1.6.2.1.42); FILE MERGED
2003/02/17 13:48:33 oj 1.6.2.1.42.1: #107503# add 2 new method for getIndexAtPoint and getCharacterBounds
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/svtabbx.cxx | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 15f61125ea62..ad3cc45a2e0f 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svtabbx.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: hr $ $Date: 2003-03-27 14:37:39 $ + * last change: $Author: hr $ $Date: 2003-04-04 16:59:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1176,4 +1176,28 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessible() } return xAccessible; } +// ----------------------------------------------------------------------------- +Rectangle SvHeaderTabListBox::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnId,sal_Int32 _nIndex) +{ + Rectangle aRect; + return aRect; +} +// ----------------------------------------------------------------------------- +sal_Int32 SvHeaderTabListBox::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnId,const Point& _rPoint) +{ + String sText = GetCellText(_nRow,_nColumnId); + MetricVector aRects; + if ( GetGlyphBoundRects(Point(0,0),sText,0,STRING_LEN,0,aRects) ) + { + for (MetricVector::iterator aIter = aRects.begin(); aIter != aRects.end(); ++aIter) + { + if( aIter->IsInside(_rPoint) ) + return aIter - aRects.begin(); + } + } + + return -1; +} +// ----------------------------------------------------------------------------- + |