diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2018-01-16 18:40:23 +0900 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-17 07:45:05 +0100 |
commit | 5306ae7ecd8ffa8bb78c95106b46322ae4ca1157 (patch) | |
tree | 064751022a381262924163960412ef3ecb77b42a /starmath/source/cursor.cxx | |
parent | 688b16df55afa1920f007b5bbe52c24f431c4ac2 (diff) |
starmath: Make SmParser::ParseExpression() return std::unique_ptr
Change-Id: Ib8b65dced2af3ac7dca3fe9dd02e70f02c865f79
Reviewed-on: https://gerrit.libreoffice.org/47974
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath/source/cursor.cxx')
-rw-r--r-- | starmath/source/cursor.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index 033231a28b3a..bc6d5227d043 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -1012,12 +1012,13 @@ void SmCursor::InsertSpecial(const OUString& _aString) void SmCursor::InsertCommandText(const OUString& aCommandText) { //Parse the sub expression - SmNode* pSubExpr = SmParser().ParseExpression(aCommandText); + auto xSubExpr = SmParser().ParseExpression(aCommandText); //Prepare the subtree - pSubExpr->Prepare(mpDocShell->GetFormat(), *mpDocShell, 0); + xSubExpr->Prepare(mpDocShell->GetFormat(), *mpDocShell, 0); //Convert subtree to list + SmNode* pSubExpr = xSubExpr.release(); SmNodeList* pLineList = NodeToList(pSubExpr); BeginEdit(); |