Kaydet (Commit) 906cce25 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud Kaydeden (comit) Miklos Vajna

gridfixes: impl_getColumnForOrdinate:no need to subs m_nRowHeaderWidthPixel

m_aColumnWidths already contains it

Change-Id: I404c58fb0b32db7b7b7bf60be997f81709908ceb
Reviewed-on: https://gerrit.libreoffice.org/556Reviewed-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
Tested-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
üst 5deceaba
...@@ -2491,18 +2491,16 @@ namespace svt { namespace table ...@@ -2491,18 +2491,16 @@ namespace svt { namespace table
if ( i_ordinate < m_nRowHeaderWidthPixel ) if ( i_ordinate < m_nRowHeaderWidthPixel )
return COL_ROW_HEADERS; return COL_ROW_HEADERS;
long const ordinate = i_ordinate - m_nRowHeaderWidthPixel;
ColumnPositions::const_iterator lowerBound = ::std::lower_bound( ColumnPositions::const_iterator lowerBound = ::std::lower_bound(
m_aColumnWidths.begin(), m_aColumnWidths.begin(),
m_aColumnWidths.end(), m_aColumnWidths.end(),
MutableColumnMetrics(ordinate+1, ordinate+1), MutableColumnMetrics(i_ordinate+1, i_ordinate+1),
ColumnInfoPositionLess() ColumnInfoPositionLess()
); );
if ( lowerBound == m_aColumnWidths.end() ) if ( lowerBound == m_aColumnWidths.end() )
{ {
// point is *behind* the start of the last column ... // 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 // ... but still before its end
return m_nColumnCount - 1; return m_nColumnCount - 1;
return COL_INVALID; return COL_INVALID;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment