[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - include/sal svtools/source

Lionel Elie Mamane lionel at mamane.lu
Tue Jan 20 04:20:58 PST 2015


 include/sal/log-areas.dox         |    1 +
 svtools/source/brwbox/brwbox2.cxx |    7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit c147a110d6d9bc1de0ebf79638751dd360317fc4
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Mon Jan 19 11:44:55 2015 +0100

    fixup previous commit for fdo#88475
    
    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
    (cherry picked from commit e8a68c1f50f32a0f9d8bcdf16c1270c319910baa)
    Reviewed-on: https://gerrit.libreoffice.org/14028
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 62525e4..d42c8c2 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -289,6 +289,7 @@ certain functionality.
 @section svtools
 
 @li @c svtools
+ at li @c svtools.brwbox
 @li @c svtools.config
 @li @c svtools.contnr
 @li @c svtools.control
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index eacb2a8..9ea9031 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -887,6 +887,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 )
@@ -899,6 +900,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");
         }
@@ -1031,7 +1033,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;


More information about the Libreoffice-commits mailing list