summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/docnew.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/docnew.cxx')
-rw-r--r--sw/source/core/doc/docnew.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 68ae706a4b51..06e898561174 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -603,10 +603,8 @@ SwDoc::~SwDoc()
// Delete fuer Collections
// damit die Abhaengigen wech sind
- SwTxtFmtColl *pFtnColl = pFtnInfo->GetFtnTxtColl();
- if ( pFtnColl ) pFtnColl->Remove(pFtnInfo);
- pFtnColl = pEndNoteInfo->GetFtnTxtColl();
- if ( pFtnColl ) pFtnColl->Remove(pEndNoteInfo);
+ pFtnInfo->ReleaseCollection();
+ pEndNoteInfo->ReleaseCollection();
ASSERT( pDfltTxtFmtColl == (*pTxtFmtCollTbl)[0],
"Default-Text-Collection muss immer am Anfang stehen" );
@@ -865,10 +863,8 @@ void SwDoc::ClearDoc()
// Delete fuer Collections
// damit die Abhaengigen wech sind
- SwTxtFmtColl* pFtnColl = pFtnInfo->GetFtnTxtColl();
- if( pFtnColl ) pFtnColl->Remove( pFtnInfo );
- pFtnColl = pEndNoteInfo->GetFtnTxtColl();
- if( pFtnColl ) pFtnColl->Remove( pEndNoteInfo );
+ pFtnInfo->ReleaseCollection();
+ pEndNoteInfo->ReleaseCollection();
// JP 27.01.98: opt.: ausgehend davon, das Standard als 2. im Array
// steht, sollte das als letztes geloescht werden, damit