summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-04-07 09:11:17 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-04-07 09:11:17 +0200
commit89ee82b47aa1bce8cf23c16049e990588172a820 (patch)
treea58067bd9e75a5f5616bf3050089c5fe5c6631fb /svtools
parent74fa61e8d3181aad661869be13f8916aea61b59c (diff)
gridfixes: impl_getColumnForOrdinate: no need to subtract m_nRowHeaderWidthPixel, m_aColumnWidths already contains it
Diffstat (limited to 'svtools')
-rwxr-xr-xsvtools/source/table/tablecontrol_impl.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index 870fef025ee7..4ecce7359a15 100755
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -2494,18 +2494,16 @@ namespace svt { namespace table
if ( i_ordinate < m_nRowHeaderWidthPixel )
return COL_ROW_HEADERS;
- long const ordinate = i_ordinate - m_nRowHeaderWidthPixel;
-
ColumnPositions::const_iterator lowerBound = ::std::lower_bound(
m_aColumnWidths.begin(),
m_aColumnWidths.end(),
- ordinate + 1,
+ i_ordinate + 1,
ColumnInfoPositionLess()
);
if ( lowerBound == m_aColumnWidths.end() )
{
// point is *behind* the start of the last column ...
- if ( ordinate < m_aColumnWidths.rbegin()->getEnd() )
+ if ( i_ordinate < m_aColumnWidths.rbegin()->getEnd() )
// ... but still before its end
return m_nColumnCount - 1;
return COL_INVALID;