summaryrefslogtreecommitdiff
path: root/sw/inc
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-08 18:51:30 +0200
commit962f4ab8e9b5e6b01c538c45d48b77a0a3fcded2 (patch)
tree317d8988efbf69f515ceb8d8e5798a15f0fdd4cb /sw/inc
parent28b76f95b90637d72cf136b7a078f6f3feb16c75 (diff)
use UnoCursorPointer in SwNavigationMgr
Change-Id: I7c7431edd79cf4527f97c7dc0695d49174b61e2c
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/unocrsr.hxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
index 6952506e7765..323607395151 100644
--- a/sw/inc/unocrsr.hxx
+++ b/sw/inc/unocrsr.hxx
@@ -115,6 +115,13 @@ namespace sw
{
m_pCursor->Add(this);
}
+ UnoCursorPointer(const UnoCursorPointer& pOther)
+ : SwClient(nullptr)
+ , m_pCursor(pOther.m_pCursor)
+ {
+ if(m_pCursor)
+ m_pCursor->Add(this);
+ }
virtual ~UnoCursorPointer() SAL_OVERRIDE
{
if(m_pCursor)
@@ -132,6 +139,13 @@ namespace sw
{ return *m_pCursor.get(); }
SwUnoCrsr* operator->() const
{ return m_pCursor.get(); }
+ UnoCursorPointer& operator=(UnoCursorPointer aOther)
+ {
+ if(aOther.m_pCursor)
+ aOther.m_pCursor->Add(this);
+ m_pCursor = aOther.m_pCursor;
+ return *this;
+ }
explicit operator bool() const
{ return static_cast<bool>(m_pCursor); }
void reset(std::shared_ptr<SwUnoCrsr> pNew)