summaryrefslogtreecommitdiff
path: root/sw/source/uibase/inc/navmgr.hxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-06-03 00:36:14 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-06-09 12:54:59 +0200
commita2c467a58ade9f55e0154b2935c747bb283ebd45 (patch)
tree7f5d684130fc09498c87196d8dc85714574be586 /sw/source/uibase/inc/navmgr.hxx
parent683bac5b9661367bce9a8b0ccd81046183ed9c9d (diff)
use UnoCursorPointer in SwNavigationMgr
Change-Id: I7c7431edd79cf4527f97c7dc0695d49174b61e2c
Diffstat (limited to 'sw/source/uibase/inc/navmgr.hxx')
-rw-r--r--sw/source/uibase/inc/navmgr.hxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/sw/source/uibase/inc/navmgr.hxx b/sw/source/uibase/inc/navmgr.hxx
index 28309597f332..1c6baa98e8b8 100644
--- a/sw/source/uibase/inc/navmgr.hxx
+++ b/sw/source/uibase/inc/navmgr.hxx
@@ -15,12 +15,13 @@
#include "swtypes.hxx"
#include "calbck.hxx"
#include "unocrsr.hxx"
+#include "vcl/svapp.hxx"
class SwWrtShell;
struct SwPosition;
class SwUnoCrsr;
-class SwNavigationMgr : SwClient
+class SwNavigationMgr
{
private:
/*
@@ -32,7 +33,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< std::shared_ptr<SwUnoCrsr> > Stack_t;
+ typedef ::std::vector< sw::UnoCursorPointer > 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 */
@@ -44,11 +45,8 @@ public:
SwNavigationMgr( SwWrtShell & rShell );
virtual ~SwNavigationMgr()
{
- for(auto pEntry : m_entries)
- {
- if(pEntry && GetRegisteredIn() == pEntry.get())
- pEntry->Remove(this);
- }
+ SolarMutexGuard g;
+ m_entries.clear();
}
/* Can we go back in the history ? */
bool backEnabled() ;
@@ -60,7 +58,6 @@ 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: */