diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-14 09:32:50 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-14 09:32:50 +0100 |
commit | 4394d293a5cebb453590bbed775551a3c30c2ec9 (patch) | |
tree | d55a1e3c700017a476cf2679f8633fec8b2054b9 /svtools/source/table/tablecontrol_impl.cxx | |
parent | 3d914bead0bbe44781c13ae2957475971b773b4d (diff) |
gridsort: fixed invalidateRowRange for some edge cases
Diffstat (limited to 'svtools/source/table/tablecontrol_impl.cxx')
-rwxr-xr-x | svtools/source/table/tablecontrol_impl.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index a6e99fc5700e..3c7cb555f374 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -541,7 +541,7 @@ namespace svt { namespace table } // schedule repaint - invalidateRowRange( i_first, m_pModel->getRowCount() - 1 ); + invalidateRowRange( i_first, ROW_INVALID ); // call selection handlers, if necessary if ( selectionChanged ) @@ -609,7 +609,7 @@ namespace svt { namespace table } // schedule a repaint - invalidateRowRange( firstRemovedRow, m_pModel->getRowCount() - 1 ); + invalidateRowRange( firstRemovedRow, ROW_INVALID ); // call selection handlers, if necessary if ( selectionChanged ) @@ -1891,20 +1891,23 @@ namespace svt { namespace table RowPos const firstRow = i_firstRow < m_nTopRow ? m_nTopRow : i_firstRow; RowPos const lastVisibleRow = m_nTopRow + impl_getVisibleRows( true ) - 1; - RowPos const lastRow = i_lastRow > lastVisibleRow ? lastVisibleRow : i_lastRow; + RowPos const lastRow = ( ( i_lastRow == ROW_INVALID ) || ( i_lastRow > lastVisibleRow ) ) ? lastVisibleRow : i_lastRow; Rectangle aInvalidateRect; Rectangle aVisibleCellsArea; impl_getAllVisibleCellsArea( aVisibleCellsArea ); - TableRowGeometry aRow( *this, aVisibleCellsArea, firstRow ); + TableRowGeometry aRow( *this, aVisibleCellsArea, firstRow, true ); while ( aRow.isValid() && ( aRow.getRow() <= lastRow ) ) { aInvalidateRect.Union( aRow.getRect() ); aRow.moveDown(); } + if ( i_lastRow == ROW_INVALID ) + aInvalidateRect.Bottom() = m_pDataWindow->GetOutputSizePixel().Height(); + m_pDataWindow->Invalidate( aInvalidateRect ); } //------------------------------------------------------------------------------------------------------------------ |