Kaydet (Commit) 08086d76 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Ensure that GroupScope can only be instantiated by FormulaLogger.

And also annotate the class a bit.

Change-Id: I7544e49991778be36a9214851f3d7add4bfef626
üst 90b7f35c
......@@ -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();
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment