Kaydet (Commit) c6a02b40 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

Revert "fdo#88475 BrowseBox/grid: reposition data cursor to current row after paint"

(and its later fixup)

This reverts commits
 e8a68c1f
 e60b5899

It was a work-around for the real underlying issue, which was that the
result of dbaccess::ResultSet::isFirst() et al were clobbered by moves
made by its clones.

The BrowseBox has two different cursors:
1) One for data to edit (which is kept on the current/active row)
2) One for data to *paint*
The second is a clone of the first.

The real underlying issue is fixed by:

  commit d7c9a1d9
  Author: Lionel Elie Mamane <lionel@mamane.lu>
  Date:   Thu Jan 22 10:49:42 2015 +0100

      fdo#88475 RowSetBase: reposition cache before interrogating it

      Change-Id: I28d62673fdf10ee6507d38bb7c79c08e4b40902f
üst cc376d87
......@@ -298,7 +298,6 @@ certain functionality.
@section svtools
@li @c svtools
@li @c svtools.brwbox
@li @c svtools.config
@li @c svtools.contnr
@li @c svtools.control
......
......@@ -888,7 +888,6 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool
Color aDelimiterLineColor( ::svtools::ColorConfig().GetColorValue( ::svtools::CALCGRID ).nColor );
// redraw the invalid fields
bool paint_seeked(false);
for ( sal_uLong nRelRow = nRelTopRow;
nRelRow <= nRelBottomRow && (sal_uLong)nTopRow+nRelRow < (sal_uLong)nRowCount;
++nRelRow, aPos.Y() += nDataRowHeigt )
......@@ -901,7 +900,6 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool
// prepare row
sal_uLong nRow = nTopRow+nRelRow;
paint_seeked = true;
if ( !SeekRow( nRow) ) {
OSL_FAIL("BrowseBox::ImplPaintData: SeekRow failed");
}
......@@ -1034,11 +1032,6 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool
}
}
if (paint_seeked && !SeekRow(nCurRow))
{
SAL_WARN("svtools.brwbox", "BrowseBox::ImplPaintData could not seek back to current row after paint");
}
if (aPos.Y() > aOverallAreaBRPos.Y() + 1)
aPos.Y() = aOverallAreaBRPos.Y() + 1;
// needed for some of the following drawing
......
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