[Libreoffice-commits] core.git: Branch 'private/Sweetshark/mmunocrsrs' - 3 commits - sw/source
Bjoern Michaelsen
bjoern.michaelsen at canonical.com
Wed May 20 07:35:51 PDT 2015
sw/source/core/attr/calbck.cxx | 2 +-
sw/source/core/doc/docnew.cxx | 10 ----------
sw/source/core/unocore/unoobj2.cxx | 5 +++--
3 files changed, 4 insertions(+), 13 deletions(-)
New commits:
commit a0a018648015184f541c0719b86300501bdaad6b
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Wed May 20 16:33:46 2015 +0200
try not to Remove() from a nullptr
Change-Id: I4266e21ffb51151b6fb47932d06cd79777823f44
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index dc3e6bb..23290ef 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -466,7 +466,8 @@ public:
}
virtual ~Impl() {
- m_pCrsr->Remove(this);
+ if(m_pCrsr)
+ m_pCrsr->Remove(this);
}
SwUnoCrsr * GetCursor() {
@@ -493,7 +494,7 @@ void SwXParagraphEnumeration::Impl::SwClientNotify(const SwModify& rModify, cons
{
assert(m_pCrsr->m_bSaneOwnership);
SwClient::SwClientNotify(rModify, rHint);
- if(typeid(rHint) == typeid(sw::DocDisposingHint))
+ if(m_pCrsr && typeid(rHint) == typeid(sw::DocDisposingHint))
{
m_pCrsr->Remove(this);
m_pCrsr.reset();
commit 0c804fca16839ca3fd83f52faff4c902413386b6
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Wed May 20 16:32:55 2015 +0200
do not asser here yet
Change-Id: I4ee494fe7ce8f84232a83e4a53353a0e98e0b2f0
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index 790e032..3d64f3a 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -153,7 +153,7 @@ void SwModify::Add( SwClient* pDepend )
for(auto& rIter : sw::ClientIteratorBase::our_pClientIters->GetRingContainer())
{
OSL_ENSURE( &rIter.m_rRoot != m_pWriterListeners, "Client added to active ClientIter" );
- assert(&rIter.m_rRoot != m_pWriterListeners);
+ //assert(&rIter.m_rRoot != m_pWriterListeners);
}
}
#endif
commit d03a9de1768913e0e31c4247be59bd92fc983dbe
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Wed May 20 15:42:48 2015 +0200
Revert "orphan more clients early in ~SwDoc"
This reverts commit 3d76a172915919b28d33c11a6df065d0dc952690.
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 8b567b9..41feb4b 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -517,11 +517,6 @@ SwDoc::~SwDoc()
// Optimization: Based on the fact that Standard is always 2nd in the
// array, we should delete it as the last. With this we avoid
// reparenting the Formats all the time!
- for(auto pTxtxFmtColl: *mpTxtFmtCollTbl)
- {
- if(pTxtxFmtColl->GetRegisteredIn())
- pTxtxFmtColl->GetRegisteredIn()->Remove(pTxtxFmtColl);
- }
if( 2 < mpTxtFmtCollTbl->size() )
mpTxtFmtCollTbl->DeleteAndDestroy(2, mpTxtFmtCollTbl->size());
mpTxtFmtCollTbl->DeleteAndDestroy(1, mpTxtFmtCollTbl->size());
@@ -571,11 +566,6 @@ SwDoc::~SwDoc()
delete mpStyleAccess;
- for(auto pCharFmt: *mpCharFmtTbl)
- {
- if(pCharFmt->GetRegisteredIn())
- pCharFmt->GetRegisteredIn()->Remove(pCharFmt);
- }
delete mpCharFmtTbl;
delete mpSectionFmtTbl;
delete mpTblFrmFmtTbl;
More information about the Libreoffice-commits
mailing list