summaryrefslogtreecommitdiffstats
path: root/starmath/inc
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/inc')
-rw-r--r--starmath/inc/document.hxx6
-rw-r--r--starmath/inc/parse.hxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index 2d6e63da5f2f..af2ce9475fc3 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -89,7 +89,7 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public SfxListener
SmParser maParser;
OUString maAccText;
SvtLinguOptions maLinguOptions;
- SmTableNode *mpTree;
+ std::unique_ptr<SmTableNode> mpTree;
SfxItemPool *mpEditEngineItemPool;
EditEngine *mpEditEngine;
VclPtr<SfxPrinter> mpPrinter; //q.v. comment to SmPrinter Access!
@@ -177,8 +177,8 @@ public:
void Parse();
SmParser & GetParser() { return maParser; }
- const SmTableNode *GetFormulaTree() const { return mpTree; }
- void SetFormulaTree(SmTableNode *pTree) { mpTree = pTree; }
+ const SmTableNode *GetFormulaTree() const { return mpTree.get(); }
+ void SetFormulaTree(SmTableNode *pTree) { mpTree.reset(pTree); }
const std::set< OUString > & GetUsedSymbols() const { return maUsedSymbols; }
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index 5c4646e28eb8..a2faa73a3b40 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -78,7 +78,7 @@ class SmParser
inline bool TokenInGroup( TG nGroup );
// grammar
- SmTableNode *DoTable();
+ std::unique_ptr<SmTableNode> DoTable();
SmLineNode *DoLine();
std::unique_ptr<SmNode> DoExpression(bool bUseExtraSpaces = true);
SmNode *DoRelation();
@@ -114,7 +114,7 @@ public:
SmParser();
/** Parse rBuffer to formula tree */
- SmTableNode *Parse(const OUString &rBuffer);
+ std::unique_ptr<SmTableNode> Parse(const OUString &rBuffer);
/** Parse rBuffer to formula subtree that constitutes an expression */
std::unique_ptr<SmNode> ParseExpression(const OUString &rBuffer);