[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/qa sc/source

Michael Meeks michael.meeks at suse.com
Tue Mar 19 10:05:10 PDT 2013


 sc/qa/unit/ucalc.cxx             |    3 +++
 sc/source/core/data/cell2.cxx    |    8 ++++----
 sc/source/core/data/column3.cxx  |    2 +-
 sc/source/core/data/documen9.cxx |    5 +++++
 4 files changed, 13 insertions(+), 5 deletions(-)

New commits:
commit c325697f7e07e21e4c67dc52bebf2420ff43f6cb
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Tue Mar 19 17:04:08 2013 +0000

    calm debug, and disable unless SC_FORMULAGROUP=1
    
    Change-Id: I091d43dfa33f440edd50a1c937ef6e6f1930be4e

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 81fa1ea..ec2711f 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -6224,6 +6224,9 @@ void Test::testCellTextWidth()
 
 void Test::testFormulaGrouping()
 {
+    if ( !getenv("SC_FORMULAGROUP") )
+        return;
+
     static const struct {
         const char *pFormula[3];
         const bool  bGroup[3];
diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index 0724501..5bd3846 100644
--- a/sc/source/core/data/cell2.cxx
+++ b/sc/source/core/data/cell2.cxx
@@ -1748,7 +1748,7 @@ ScSimilarFormulaDelta *ScFormulaCell::BuildDeltaTo( ScFormulaCell *pOtherCell )
 
     if ( !pThis || !pOther )
     {
-        fprintf( stderr, "Error: no compiled code for cells !" );
+//        fprintf( stderr, "Error: no compiled code for cells !" );
         return NULL;
     }
 
@@ -1817,12 +1817,12 @@ bool ScFormulaCell::InterpretFormulaGroup()
     if( !xGroup.get() )
         return false;
 
-    fprintf( stderr, "Interpret cell %d, %d\n", (int)aPos.Col(), (int)aPos.Row() );
+//    fprintf( stderr, "Interpret cell %d, %d\n", (int)aPos.Col(), (int)aPos.Row() );
 
     if ( xGroup->mpDelta->IsInvariant() )
     {
-        fprintf( stderr, "struck gold - completely invariant for %d items !\n",
-                 (int)xGroup->mnLength );
+//        fprintf( stderr, "struck gold - completely invariant for %d items !\n",
+//                 (int)xGroup->mnLength );
 
         // calculate ourselves:
         InterpretTail( SCITP_NORMAL );
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 4397834..c4c4ec6 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2119,7 +2119,7 @@ void ScColumn::RebuildFormulaGroups()
         }
     }
 
-#if 1 // OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0
     if ( maDoubles.size() + maFnGroups.size() > 0 )
     {
         rtl::OUString aStr;
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 4a261e8..54e3a08 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -697,6 +697,11 @@ void ScDocument::ApplyAsianEditSettings( ScEditEngineDefaulter& rEngine )
 
 void ScDocument::RebuildFormulaGroups()
 {
+    static const char *pEnableFormulaGroups = getenv("SC_FORMULAGROUP");
+
+    if ( !pEnableFormulaGroups )
+        return;
+
     SCTAB nTab;
     for (nTab=0; nTab < static_cast<SCTAB>(maTabs.size()); nTab++)
         if (maTabs[nTab])


More information about the Libreoffice-commits mailing list