summaryrefslogtreecommitdiff
path: root/sw/source/uibase/docvw/PostItMgr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/docvw/PostItMgr.cxx')
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 442400bdb173..2355151e851c 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -1311,16 +1311,13 @@ void SwPostItMgr::AddPostIts(bool bCheckExistence, bool bFocus)
void SwPostItMgr::RemoveSidebarWin()
{
- if (!mvPostItFields.empty())
+ for (auto const& postItField : mvPostItFields)
{
- for (auto const& postItField : mvPostItFields)
- {
- EndListening( *const_cast<SfxBroadcaster*>(postItField->GetBroadCaster()) );
- postItField->pPostIt.disposeAndClear();
- delete postItField;
- }
- mvPostItFields.clear();
+ EndListening( *const_cast<SfxBroadcaster*>(postItField->GetBroadCaster()) );
+ postItField->pPostIt.disposeAndClear();
+ delete postItField;
}
+ mvPostItFields.clear();
// all postits removed, no items should be left in pages
PreparePageContainer();