summaryrefslogtreecommitdiff
path: root/svx/source/table/svdotable.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/table/svdotable.cxx')
-rw-r--r--svx/source/table/svdotable.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 08d4e7237ea3..5ffef2103bb6 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -1024,7 +1024,7 @@ void SdrTableObj::setTableStyleSettings( const TableStyleSettings& rStyle )
}
-TableHitKind SdrTableObj::CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_Int32& rnY, int nTol ) const
+TableHitKind SdrTableObj::CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_Int32& rnY ) const
{
if( !mpImpl || !mpImpl->mxTable.is() )
return SDRTABLEHIT_NONE;
@@ -1035,10 +1035,10 @@ TableHitKind SdrTableObj::CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_
const sal_Int32 nColCount = mpImpl->getColumnCount();
const sal_Int32 nRowCount = mpImpl->getRowCount();
- sal_Int32 nX = rPos.X() + nTol - maRect.Left();
- sal_Int32 nY = rPos.Y() + nTol - maRect.Top();
+ sal_Int32 nX = rPos.X() - maRect.Left();
+ sal_Int32 nY = rPos.Y() - maRect.Top();
- if( (nX < 0) || (nX > (maRect.GetWidth() + nTol)) || (nY < 0) || (nY > (maRect.GetHeight() + nTol) ) )
+ if( (nX < 0) || (nX > maRect.GetWidth()) || (nY < 0) || (nY > maRect.GetHeight() ) )
return SDRTABLEHIT_NONE;
// get vertical edge number and check for a hit
@@ -1050,7 +1050,7 @@ TableHitKind SdrTableObj::CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_
{
while( rnX <= nColCount )
{
- if( nX <= (2*nTol) )
+ if( nX <= 0 )
{
bVrtHit = true;
break;
@@ -1070,7 +1070,7 @@ TableHitKind SdrTableObj::CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_
rnX = nColCount;
while( rnX >= 0 )
{
- if( nX <= (2*nTol) )
+ if( nX <= 0 )
{
bVrtHit = true;
break;
@@ -1095,7 +1095,7 @@ TableHitKind SdrTableObj::CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_
{
while( rnY <= nRowCount )
{
- if( nY <= (2*nTol) )
+ if( nY <= 0 )
{
bHrzHit = true;
break;
@@ -1244,7 +1244,7 @@ sal_Int32 SdrTableObj::CheckTextHit(const Point& rPnt) const
if( mpImpl && mpImpl->mxTable.is() )
{
CellPos aPos;
- if( CheckTableHit( rPnt, aPos.mnCol, aPos.mnRow, 0 ) == SDRTABLEHIT_CELLTEXTAREA )
+ if( CheckTableHit( rPnt, aPos.mnCol, aPos.mnRow ) == SDRTABLEHIT_CELLTEXTAREA )
return aPos.mnRow * mpImpl->mxTable->getColumnCount() + aPos.mnCol;
}