diff options
author | Simon Chenery <simon_chenery@yahoo.com> | 2024-11-23 15:07:14 +0100 |
---|---|---|
committer | David Gilbert <freedesktop@treblig.org> | 2024-11-29 01:37:10 +0100 |
commit | 678f732d9cc5b9a73e633d77bd2d1ae34700ed3d (patch) | |
tree | de79fedd42dcde0f27dc36820a857afa798f0450 /xmloff/source | |
parent | 40436e1dfdad42690cc0cfc4781c38e5419e0dc5 (diff) |
tdf#158237 Use C++20 contains() instead of find() and end()
Change-Id: I596245603c0945438a940465122cb4c3e6954e81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177140
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/text/txtlists.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx index 4cbd7874050b..3b81ce6d094d 100644 --- a/xmloff/source/text/txtlists.cxx +++ b/xmloff/source/text/txtlists.cxx @@ -138,8 +138,7 @@ void XMLTextListsHelper::KeepListAsProcessed( const OUString& sListId, mpMapListIdToListStyleDefaultListId = std::make_unique<tMapForLists>(); } - if ( mpMapListIdToListStyleDefaultListId->find( sListStyleName ) == - mpMapListIdToListStyleDefaultListId->end() ) + if ( !mpMapListIdToListStyleDefaultListId->contains( sListStyleName ) ) { (*mpMapListIdToListStyleDefaultListId)[ sListStyleName ] = ::std::pair<OUString, OUString>(sListId, sListStyleDefaultListId); @@ -153,7 +152,7 @@ bool XMLTextListsHelper::IsListProcessed( const OUString& sListId ) const return false; } - return mpProcessedLists->find( sListId ) != mpProcessedLists->end(); + return mpProcessedLists->contains( sListId ); } const OUString & XMLTextListsHelper::GetListStyleOfProcessedList( @@ -212,7 +211,7 @@ OUString XMLTextListsHelper::GenerateNewListId() const if ( mpProcessedLists ) { tools::Long nHitCount = 0; - while ( mpProcessedLists->find( sNewListId ) != mpProcessedLists->end() ) + while ( mpProcessedLists->contains( sNewListId ) ) { ++nHitCount; sNewListId = sTmpStr + OUString::number( nHitCount ); |