summaryrefslogtreecommitdiff
path: root/starmath/inc
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2015-10-07 23:21:00 +0900
committerNoel Grandin <noelgrandin@gmail.com>2015-10-08 06:21:15 +0000
commitce924d97aaea265b8f58265bedb49dbcd71fbc31 (patch)
treeb534e750f4821ce54c5209cc85e8d616e2fed81e /starmath/inc
parentbbfc031333aa74fbd4c6362c33405c49c22283f3 (diff)
starmath: Represent ownership by std::unique_ptr
Change-Id: I7ce39cbdc0199d3508e7d16d1ce0b78f8d8ca620 Reviewed-on: https://gerrit.libreoffice.org/19230 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'starmath/inc')
-rw-r--r--starmath/inc/cursor.hxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx
index 964c65c40fa2..298882839b11 100644
--- a/starmath/inc/cursor.hxx
+++ b/starmath/inc/cursor.hxx
@@ -13,6 +13,7 @@
#include "caret.hxx"
#include <list>
+#include <memory>
/** Factor to multiple the squared horizontal distance with
* Used for Up and Down movement.
@@ -82,7 +83,6 @@ public:
, mpPosition(nullptr)
, mpTree(tree)
, mpDocShell(pShell)
- , mpGraph(nullptr)
, mpClipboard(nullptr)
, mnEditSections(0)
, mbIsEnabledSetModifiedSmDocShell(false)
@@ -94,8 +94,6 @@ public:
~SmCursor()
{
SetClipboard();
- delete mpGraph;
- mpGraph = nullptr;
}
/** Get position */
@@ -230,7 +228,7 @@ private:
/** Owner of the formula tree */
SmDocShell* mpDocShell;
/** Graph over caret position in the current tree */
- SmCaretPosGraph* mpGraph;
+ std::unique_ptr<SmCaretPosGraph> mpGraph;
/** Clipboard holder */
SmNodeList* mpClipboard;