[Libreoffice-commits] core.git: sw/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Wed Nov 13 05:24:51 UTC 2019
sw/source/core/doc/DocumentListItemsManager.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit bc3046ee0996f2d25552670825c68ef04bfe303f
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Tue Nov 12 23:19:32 2019 +0100
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Nov 13 06:24:12 2019 +0100
Fix OSL_ENSURE in DocumentListItemsManager::addListItem (sw)
was wrong since:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=1a5b12aa5da2c718848d3cc5d9bce7bfcdeacf54
Here's the root cause:
const bool bAlreadyInserted(
- mpListItemsList->find( &rNodeNum ) != mpListItemsList->end() );
+ mpListItemsList->insert( &rNodeNum ).second );
OSL_ENSURE( !bAlreadyInserted,
"<DocumentListItemsManager::addListItem(..)> - <SwNodeNum> instance already registered as numbered item!" );
- if ( !bAlreadyInserted )
- {
- mpListItemsList->insert( &rNodeNum );
- }
Change-Id: I0cc5786a18fe2df5fd86284c18638de90604edf9
Reviewed-on: https://gerrit.libreoffice.org/82560
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/core/doc/DocumentListItemsManager.cxx b/sw/source/core/doc/DocumentListItemsManager.cxx
index 6fd3925d9ad6..2a8f0691d372 100644
--- a/sw/source/core/doc/DocumentListItemsManager.cxx
+++ b/sw/source/core/doc/DocumentListItemsManager.cxx
@@ -46,7 +46,7 @@ void DocumentListItemsManager::addListItem( const SwNodeNum& rNodeNum )
const bool bAlreadyInserted(
mpListItemsList->insert( &rNodeNum ).second );
- OSL_ENSURE( !bAlreadyInserted,
+ OSL_ENSURE( bAlreadyInserted,
"<DocumentListItemsManager::addListItem(..)> - <SwNodeNum> instance already registered as numbered item!" );
}
More information about the Libreoffice-commits
mailing list