summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-12-01 14:09:02 +0100
committerEike Rathke <erack@redhat.com>2015-12-01 14:20:58 +0100
commit14096319475eca0c738cbd71267a1f2123361897 (patch)
tree16e7ee648a68914bb1adb7c2ee40e869277263ca /sc/source
parenta63a29eda4987f03f809f835d72df2daf1e10320 (diff)
Resolves: tdf#95748 no group interpreter when calculations are running
Change-Id: I17283fc5e39da2d7222c302dd63522df69d0ad96 (cherry picked from commit d46203b55d92185ab2c1d3ac79761100d26aaee3)
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/formulacell.cxx23
1 files changed, 16 insertions, 7 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index b37fbaa32518..9079d560cbed 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1551,15 +1551,24 @@ void ScFormulaCell::Interpret()
}
else
{
+ // Do not attempt to interpret a group when calculations are already
+ // running, otherwise we may run into a circular reference hell. See
+ // tdf#95748
+ if (rRecursionHelper.GetRecursionCount())
+ InterpretTail( SCITP_NORMAL);
+ else
+ {
#if DEBUG_CALCULATION
- aDC.enterGroup();
-#endif
- bool bGroupInterpreted = InterpretFormulaGroup();
-#if DEBUG_CALCULATION
- aDC.leaveGroup();
+ aDC.enterGroup();
+ bool bGroupInterpreted = InterpretFormulaGroup();
+ aDC.leaveGroup();
+ if (!bGroupInterpreted)
+ InterpretTail( SCITP_NORMAL);
+#else
+ if (!InterpretFormulaGroup())
+ InterpretTail( SCITP_NORMAL);
#endif
- if (!bGroupInterpreted)
- InterpretTail( SCITP_NORMAL);
+ }
}
// While leaving a recursion or iteration stack, insert its cells to the