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

fixup previous commit:

OSL_ENSURE does not execute in non-debug builds (and is deprecated).
Do not try to seek back if paint did not seek.
This happens in particular when there is no data source attached (and thus trying to seek fails).

Change-Id: I3f4908c4dcae2bb120bf58c1218e3386c40d5721
üst e5bb4e6d
......@@ -298,6 +298,7 @@ certain functionality.
@section svtools
@li @c svtools
@li @c svtools.brwbox
@li @c svtools.config
@li @c svtools.contnr
@li @c svtools.control
......
......@@ -888,6 +888,7 @@ 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 )
......@@ -900,6 +901,7 @@ 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");
}
......@@ -1032,7 +1034,10 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool
}
}
OSL_ENSURE(SeekRow(nCurRow), "BrowseBox::ImplPaintData could not seek back to current row after paint");
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;
......
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