From 42d3adbce63493039e6013f6f3ea15149f2f7507 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 19 Mar 2013 17:04:08 +0000 Subject: calm debug, and disable unless SC_FORMULAGROUP=1 Change-Id: I091d43dfa33f440edd50a1c937ef6e6f1930be4e --- 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(-) diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 81fa1ea4d720..ec2711fb55e0 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 0724501d2b63..5bd38466b13b 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 439783456d1c..c4c4ec6ec9e9 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 4a261e8e9006..54e3a08547cd 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(maTabs.size()); nTab++) if (maTabs[nTab]) -- cgit v1.2.3