summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui/content.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/utlui/content.cxx')
-rw-r--r--sw/source/uibase/utlui/content.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 21b72b3a9bcd..a5eb88d677a4 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2268,12 +2268,8 @@ bool SwContentTree::HasContentChanged()
}
if(bRemoveChildren)
{
- for(size_t j = 0; j < nChildCount; ++j)
- {
- SvTreeListEntry *const pRemove = FirstChild(pEntry);
- assert(pRemove);
- GetModel()->Remove(pRemove);
- }
+ while (SvTreeListEntry *const pRemove = FirstChild(pEntry))
+ RemoveEntry(pRemove);
}
if(!nChildCount)
{