[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Fri Mar 4 21:32:10 UTC 2016


 sc/source/core/data/column.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit e0331002d39244cf9c8944fe291d1d009f919eb5
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Mar 4 22:03:46 2016 +0100

    do the calculation check only conditionally, tdf#91794 follow-up
    
    ... not in all debug builds.
    
    Change-Id: I6f53c6c6860ee00b740484ed31317d5e58922082

diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 0bfb0fe..8b2e3a6 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -2790,15 +2790,16 @@ struct SetDirtyIfPostponedHandler
 
 struct CalcAllHandler
 {
+#define DEBUG_SC_CHECK_FORMULATREE_CALCULATION 0
     void operator() (size_t /*nRow*/, ScFormulaCell* pCell)
     {
-#if OSL_DEBUG_LEVEL > 0
+#if DEBUG_SC_CHECK_FORMULATREE_CALCULATION
         // after F9 ctrl-F9: check the calculation for each FormulaTree
         double nOldVal, nNewVal;
         nOldVal = pCell->GetValue();
 #endif
         pCell->Interpret();
-#if OSL_DEBUG_LEVEL > 0
+#if DEBUG_SC_CHECK_FORMULATREE_CALCULATION
         if (pCell->GetCode()->IsRecalcModeNormal())
             nNewVal = pCell->GetValue();
         else
@@ -2807,6 +2808,7 @@ struct CalcAllHandler
         assert(nOldVal == nNewVal);
 #endif
     }
+#undef DEBUG_SC_CHECK_FORMULATREE_CALCULATION
 };
 
 class CompileAllHandler


More information about the Libreoffice-commits mailing list