summaryrefslogtreecommitdiff
path: root/sw/source/uibase/inc/navmgr.hxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-05-06 01:33:30 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-05-26 00:51:05 +0200
commitada20978a4e5c26dfe6c4227d310a133e50d9b2e (patch)
tree04dd0adc2a7ee55dcd2711e09f5b9c0087d387b5 /sw/source/uibase/inc/navmgr.hxx
parent20c235df449f341774441f3bc5f567b839b75536 (diff)
make SwNavigationMgr use the shared_ptr
- also make it listen to at least one of the SwUnoCrsr it keeps on the heap for document disposing. - as the SwNavigationMgr lives longer than the document this was actually a double free before: first from SwUnoCrsrTbl dtor an then from the shared_ptr in SwNavigationMgr Change-Id: Ia75ad81a978ca37ed2a94fd221427b62e99e1bb3
Diffstat (limited to 'sw/source/uibase/inc/navmgr.hxx')
-rw-r--r--sw/source/uibase/inc/navmgr.hxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/uibase/inc/navmgr.hxx b/sw/source/uibase/inc/navmgr.hxx
index 5e33371fb539..ce3128e672b0 100644
--- a/sw/source/uibase/inc/navmgr.hxx
+++ b/sw/source/uibase/inc/navmgr.hxx
@@ -10,16 +10,16 @@
#define INCLUDED_SW_SOURCE_UIBASE_INC_NAVMGR_HXX
#include <vector>
-
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include "swtypes.hxx"
+#include "calbck.hxx"
class SwWrtShell;
struct SwPosition;
class SwUnoCrsr;
-class SwNavigationMgr
+class SwNavigationMgr : SwClient
{
private:
/*
@@ -31,7 +31,7 @@ private:
* (e.g. click a link, or double click an entry from the navigator).
* Every use of the back/forward buttons results in moving the stack pointer within the navigation history
*/
- typedef ::std::vector< ::boost::shared_ptr<SwUnoCrsr> > Stack_t;
+ typedef ::std::vector< std::shared_ptr<SwUnoCrsr> > Stack_t;
Stack_t m_entries;
Stack_t::size_type m_nCurrent; /* Current position within the navigation history */
SwWrtShell & m_rMyShell; /* The active shell within which the navigation occurs */
@@ -51,6 +51,7 @@ public:
void goForward() ;
/* The method that adds the position pPos to the navigation history */
bool addEntry(const SwPosition& rPos);
+ void SwClientNotify(const SwModify& rModify, const SfxHint& rHint) SAL_OVERRIDE;
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */