diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-05-23 12:01:03 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-05-26 00:51:13 +0200 |
commit | 0509dbec0e3c9e9c64f5b487f5197ca4602838cc (patch) | |
tree | d8d22a916e4c91b73a1baef3ebb9ef48d597413b | |
parent | b23eb203cc696926c748cc81584dff38050224cd (diff) |
remove SaneOwnership distinction
Change-Id: I0639a960916ffa30d7eaf865755e407f706e9f13
-rw-r--r-- | sw/inc/unocrsr.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/doc/doc.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/unocore/unocrsr.cxx | 7 | ||||
-rw-r--r-- | sw/source/core/unocore/unoobj.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/unocore/unoobj2.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unoport.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/unocore/unoportenum.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 2 |
8 files changed, 1 insertions, 17 deletions
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx index e091cc010879..bfc8ebc5cfc4 100644 --- a/sw/inc/unocrsr.hxx +++ b/sw/inc/unocrsr.hxx @@ -40,7 +40,6 @@ private: public: SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = 0 ); virtual ~SwUnoCrsr(); - bool m_bSaneOwnership; protected: diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 995aad94f832..89ae7bca46e4 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1687,7 +1687,6 @@ std::shared_ptr<SwUnoCrsr> SwDoc::CreateUnoCrsr2( const SwPosition& rPos, bool b else pNew.reset(new SwUnoCrsr( rPos )); - pNew->m_bSaneOwnership = true; mvUnoCrsrTbl2.push_back( pNew ); return pNew; } diff --git a/sw/source/core/unocore/unocrsr.cxx b/sw/source/core/unocore/unocrsr.cxx index df918f4ac444..0a534c672231 100644 --- a/sw/source/core/unocore/unocrsr.cxx +++ b/sw/source/core/unocore/unocrsr.cxx @@ -32,7 +32,6 @@ SwUnoCrsr::SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing ) , m_bRemainInSection(true) , m_bSkipOverHiddenSections(false) , m_bSkipOverProtectSections(false) - , m_bSaneOwnership(false) {} SwUnoCrsr::~SwUnoCrsr() @@ -40,10 +39,7 @@ SwUnoCrsr::~SwUnoCrsr() SwDoc* pDoc = GetDoc(); if( !pDoc->IsInDtor() ) { - if(m_bSaneOwnership) - { - //assert(!SwIterator<SwClient,SwUnoCrsr>(this).First()); - } + //assert(!SwIterator<SwClient,SwUnoCrsr>(this).First()); } // delete the whole ring @@ -57,7 +53,6 @@ SwUnoCrsr::~SwUnoCrsr() std::shared_ptr<SwUnoCrsr> SwUnoTableCrsr::Clone() const { - assert(m_bSaneOwnership); auto pNewCrsr(GetDoc()->CreateUnoCrsr2(*GetPoint(), true)); if(HasMark()) { diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index b6cb1246b7e9..f35d0d2b6dd2 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -720,7 +720,6 @@ void SwXTextCursor::Impl::SwClientNotify(const SwModify& rModify, const SfxHint& SwClient::SwClientNotify(rModify, rHint); if(m_pUnoCursor && typeid(rHint) == typeid(sw::DocDisposingHint)) { - assert(m_pUnoCursor->m_bSaneOwnership); Invalidate(); } } diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index c4b9b1f8103d..e558ae8c8800 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -486,13 +486,11 @@ protected: void SwXParagraphEnumeration::Impl::Modify( const SfxPoolItem *pOld, const SfxPoolItem *pNew) { - assert(m_pCrsr->m_bSaneOwnership); ClientModify(this, pOld, pNew); } void SwXParagraphEnumeration::Impl::SwClientNotify(const SwModify& rModify, const SfxHint& rHint) { - assert(m_pCrsr->m_bSaneOwnership); SwClient::SwClientNotify(rModify, rHint); if(m_pCrsr && typeid(rHint) == typeid(sw::DocDisposingHint)) { @@ -1550,7 +1548,6 @@ void SwXTextRanges::Impl::SwClientNotify(const SwModify& rModify, const SfxHint& SwClient::SwClientNotify(rModify, rHint); if(m_pUnoCursor && typeid(rHint) == typeid(sw::DocDisposingHint)) { - assert(m_pUnoCursor->m_bSaneOwnership); m_pUnoCursor->Remove(this); m_pUnoCursor.reset(); } @@ -1757,7 +1754,6 @@ void SwXParaFrameEnumeration::Impl::SwClientNotify(const SwModify& rModify, cons SwClient::SwClientNotify(rModify, rHint); if(m_pUnoCursor && typeid(rHint) == typeid(sw::DocDisposingHint)) { - assert(m_pUnoCursor->m_bSaneOwnership); m_pUnoCursor->Remove(this); m_pUnoCursor.reset(); } diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index 502a9dd9389c..0a0f1385c3da 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -931,7 +931,6 @@ void SwXTextPortion::SwClientNotify(const SwModify& rModify, const SfxHint& rHin SwClient::SwClientNotify(rModify, rHint); if(m_pUnoCursor && typeid(rHint) == typeid(sw::DocDisposingHint)) { - assert(m_pUnoCursor->m_bSaneOwnership); m_pUnoCursor->Remove(this); m_pUnoCursor.reset(); } diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index b33b1fecc0d0..02fe76f586c4 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -1411,7 +1411,6 @@ void SwXTextPortionEnumeration::SwClientNotify(const SwModify& rModify, const Sf SwClient::SwClientNotify(rModify, rHint); if(!GetRegisteredIn() || typeid(rHint) == typeid(sw::DocDisposingHint)) { - assert(m_pUnoCrsr->m_bSaneOwnership); m_pUnoCrsr->Remove(this); m_pUnoCrsr.reset(); } diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index c317ee0e2deb..845afcfe0ae1 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1744,7 +1744,6 @@ void SwXTextTableCursor::SwClientNotify(const SwModify& rModify, const SfxHint& SwClient::SwClientNotify(rModify, rHint); if(m_pUnoCrsr && typeid(rHint) == typeid(sw::DocDisposingHint)) { - assert(m_pUnoCrsr->m_bSaneOwnership); m_pUnoCrsr->Remove(&aCrsrDepend); m_pUnoCrsr.reset(); } @@ -3150,7 +3149,6 @@ SwXCellRange::SwXCellRange(std::shared_ptr<SwUnoCrsr> pCrsr, SwFrameFormat& rFra , m_bFirstRowAsLabel(false) , m_bFirstColumnAsLabel(false) { - assert(m_pTableCrsr->m_bSaneOwnership); m_pTableCrsr->Add(&aCursorDepend); aRgDesc.Normalize(); } |