diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-18 22:31:36 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-18 22:31:36 +0100 |
commit | 37b53c32ec5320838721ee209d259f41427f8335 (patch) | |
tree | d898b66f7bcb7dbcfe9384d59c7bf75be630e651 /svtools/source/table | |
parent | e24827c9a760bdb408ef882c851f6c77c95060a9 (diff) |
gridsort: fix calculation of nActualRows when rendering the row header area - there were edge cases where this area was too large
Diffstat (limited to 'svtools/source/table')
-rwxr-xr-x | svtools/source/table/tablecontrol_impl.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 8e995babb36f..e085fc45a990 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1242,10 +1242,6 @@ namespace svt { namespace table // our current style settings, to be passed to the renderer const StyleSettings& rStyle = m_rAntiImpl.GetSettings().GetStyleSettings(); m_nRowCount = m_pModel->getRowCount(); - TableSize nVisibleRows = impl_getVisibleRows(true); - TableSize nActualRows = m_nRowCount; - if(m_nRowCount>nVisibleRows) - nActualRows = nVisibleRows; // the area occupied by all (at least partially) visible cells, including // headers Rectangle aAllCellsWithHeaders; @@ -1285,10 +1281,13 @@ namespace svt { namespace table { aRowHeaderArea = aAllCellsWithHeaders; aRowHeaderArea.Right() = m_nRowHeaderWidthPixel - 1; + + TableSize const nVisibleRows = impl_getVisibleRows( true ); + TableSize nActualRows = nVisibleRows; if ( m_nTopRow + nActualRows > m_nRowCount ) - aRowHeaderArea.Bottom() = m_nRowHeightPixel * (nActualRows - 1 ) + m_nColHeaderHeightPixel - 1; - else - aRowHeaderArea.Bottom() = m_nRowHeightPixel * nActualRows + m_nColHeaderHeightPixel - 1; + nActualRows = m_nRowCount - m_nTopRow; + aRowHeaderArea.Bottom() = m_nColHeaderHeightPixel + m_nRowHeightPixel * nActualRows - 1; + pRenderer->PaintHeaderArea( *m_pDataWindow, aRowHeaderArea, false, true, rStyle ); // Note that strictly, aRowHeaderArea also contains the intersection between column // and row header area. However, below we go to paint this intersection, again, |