diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-09-03 19:27:48 -0500 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-09-14 07:58:31 +0000 |
commit | 906cce25456604d1eeac723c3862168797ab8f48 (patch) | |
tree | 155bd95c45e69ffcb202d4444f3cbe4c345c3d93 /svtools | |
parent | 5deceabaa6859e136c1954f56556ee5d0cd599f8 (diff) |
gridfixes: impl_getColumnForOrdinate:no need to subs m_nRowHeaderWidthPixel
m_aColumnWidths already contains it
Change-Id: I404c58fb0b32db7b7b7bf60be997f81709908ceb
Reviewed-on: https://gerrit.libreoffice.org/556
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/table/tablecontrol_impl.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 26ee5d00a298..da7adb401538 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -2491,18 +2491,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(), - MutableColumnMetrics(ordinate+1, ordinate+1), + MutableColumnMetrics(i_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; |