summaryrefslogtreecommitdiff
path: root/sc/inc/formulalogger.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2016-10-24 18:56:51 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2016-10-25 18:07:27 -0400
commitdff4e51f5db23baab368ab7e656ad1b74f2663bd (patch)
treef5f108fc581f163aa815bd98ab2765ba4d02b524 /sc/inc/formulalogger.hxx
parent08086d76f86794963b3ab27168f9516edf7b9d2d (diff)
Add configure option --enable-formula-logger to conditionalize it.
Change-Id: I1badbcfa259b22d742e5241bd817ea44769a771e
Diffstat (limited to 'sc/inc/formulalogger.hxx')
-rw-r--r--sc/inc/formulalogger.hxx33
1 files changed, 33 insertions, 0 deletions
diff --git a/sc/inc/formulalogger.hxx b/sc/inc/formulalogger.hxx
index 144fabf02849..1348c63d9218 100644
--- a/sc/inc/formulalogger.hxx
+++ b/sc/inc/formulalogger.hxx
@@ -12,11 +12,15 @@
#include <memory>
#include <vector>
+#include <config_options_calc.h>
+
class ScFormulaCell;
class ScDocument;
namespace sc {
+#if ENABLE_FORMULA_LOGGER
+
/**
* Outputs formula calculation log outputs to specified file.
*/
@@ -84,6 +88,35 @@ public:
GroupScope enterGroup( const ScDocument& rDoc, const ScFormulaCell& rCell );
};
+#else
+
+/**
+ * Dummy class with all empty inline methods.
+ */
+class FormulaLogger
+{
+public:
+
+ static FormulaLogger get()
+ {
+ return FormulaLogger();
+ }
+
+ class GroupScope
+ {
+ public:
+ void addMessage( const OUString& /*rMsg*/ ) {}
+ void setCalcComplete() {}
+ };
+
+ GroupScope enterGroup( const ScDocument& /*rDoc*/, const ScFormulaCell& /*rCell*/ )
+ {
+ return GroupScope();
+ }
+};
+
+#endif // ENABLE_FORMULA_LOGGER
+
}
#endif