diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2016-10-22 21:36:22 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2016-10-25 18:07:27 -0400 |
commit | 08086d76f86794963b3ab27168f9516edf7b9d2d (patch) | |
tree | 463ff7e23b6c2b0532aa0fec2518352470e4fc9d /sc | |
parent | LIBO_FORMULA_LOG_FILE env var to specify the log file location. (diff) | |
download | core-08086d76f86794963b3ab27168f9516edf7b9d2d.tar.gz core-08086d76f86794963b3ab27168f9516edf7b9d2d.zip |
Ensure that GroupScope can only be instantiated by FormulaLogger.
And also annotate the class a bit.
Change-Id: I7544e49991778be36a9214851f3d7add4bfef626
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/formulalogger.hxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sc/inc/formulalogger.hxx b/sc/inc/formulalogger.hxx index d272ed0280ee..144fabf02849 100644 --- a/sc/inc/formulalogger.hxx +++ b/sc/inc/formulalogger.hxx @@ -17,6 +17,9 @@ class ScDocument; namespace sc { +/** + * Outputs formula calculation log outputs to specified file. + */ class FormulaLogger { std::unique_ptr<osl::File> mpLogFile; @@ -42,6 +45,8 @@ public: */ class GroupScope { + friend class FormulaLogger; + struct Impl; std::unique_ptr<Impl> mpImpl; @@ -50,13 +55,23 @@ public: GroupScope( const GroupScope& ) = delete; GroupScope& operator= ( const GroupScope& ) = delete; - GroupScope( FormulaLogger& rLogger, const OUString& rPrefix, const ScDocument& rDoc, const ScFormulaCell& rCell ); + private: + GroupScope( + FormulaLogger& rLogger, const OUString& rPrefix, + const ScDocument& rDoc, const ScFormulaCell& rCell ); + public: GroupScope( GroupScope&& r ); ~GroupScope(); - void addMessage( const OUString& rName ); + /** + * Add an arbitrary message to dump to the log. + */ + void addMessage( const OUString& rMsg ); + /** + * Call this when the group calculation has finished successfullly. + */ void setCalcComplete(); }; |