diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2016-10-21 22:43:32 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2016-10-25 18:07:27 -0400 |
commit | 28a11eee99a0d20566c26ad285e81eac7b7badd6 (patch) | |
tree | 2c1f0acdbf0062d6a7d6d56f847d5fafea5be954 | |
parent | 3ab685241af77f6361b694b06dde6b6c709956e1 (diff) |
Have the logger instantiate on first use.
Change-Id: Ia2e3c011a66030aafa479f3ea47dcc1fb0c5e8be
-rw-r--r-- | sc/source/core/data/formulacell.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index a56e128148b2..f5c82c432623 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -215,7 +215,12 @@ struct DebugCalculationStacker namespace { -sc::FormulaLogger aLogger; + +sc::FormulaLogger& getLogger() +{ + static sc::FormulaLogger aLogger; + return aLogger; +} // More or less arbitrary, of course all recursions must fit into available // stack space (which is what on all systems we don't know yet?). Choosing a @@ -4033,7 +4038,7 @@ bool ScFormulaCell::InterpretFormulaGroup() if (!mxGroup || !pCode) return false; - auto aScope = aLogger.enterGroup(*pDocument, *this); + auto aScope = getLogger().enterGroup(*pDocument, *this); if (mxGroup->meCalcState == sc::GroupCalcDisabled) { |