summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2016-10-22 19:54:37 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2016-10-25 18:07:27 -0400
commit662652d864c6d26096cfc7f650d80d1e80235bca (patch)
tree5edd23a8ac75b954511c1f09af68e270effd5495 /sc/source
parent28a11eee99a0d20566c26ad285e81eac7b7badd6 (diff)
Use a singleton pattern here.
Change-Id: I45e8bcdb4ee2717ac7e223e68e0c03da9473db5b
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/formulacell.cxx9
-rw-r--r--sc/source/core/tool/formulalogger.cxx6
2 files changed, 7 insertions, 8 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index f5c82c432623..7f97e26531e0 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -215,13 +215,6 @@ struct DebugCalculationStacker
namespace {
-
-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
// lower value may be better than trying a much higher value that also isn't
@@ -4038,7 +4031,7 @@ bool ScFormulaCell::InterpretFormulaGroup()
if (!mxGroup || !pCode)
return false;
- auto aScope = getLogger().enterGroup(*pDocument, *this);
+ auto aScope = sc::FormulaLogger::get().enterGroup(*pDocument, *this);
if (mxGroup->meCalcState == sc::GroupCalcDisabled)
{
diff --git a/sc/source/core/tool/formulalogger.cxx b/sc/source/core/tool/formulalogger.cxx
index a9ea3ba2fc52..db51259e8dc2 100644
--- a/sc/source/core/tool/formulalogger.cxx
+++ b/sc/source/core/tool/formulalogger.cxx
@@ -20,6 +20,12 @@
namespace sc {
+FormulaLogger& FormulaLogger::get()
+{
+ static FormulaLogger aLogger;
+ return aLogger;
+}
+
struct FormulaLogger::GroupScope::Impl
{
FormulaLogger& mrLogger;