oox/source/drawingml/customshapeproperties.cxx | 2 +- oox/source/helper/propertymap.cxx | 2 +- oox/source/shape/WpsContext.cxx | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit 6c358c28c5cc2d1d8d8bb9d1238e3546a9bf3ce8 Author: Aaron Bourdeaux <abourde...@csumb.edu> AuthorDate: Thu Mar 28 14:32:45 2024 -0400 Commit: Taichi Haradaguchi <20001...@ymail.ne.jp> CommitDate: Fri Mar 29 14:58:23 2024 +0100 tdf#158237 Use C++20 contains() instead of find() and end() Change-Id: I529096d97991a89bdc68ec7f5d490ec21744fc6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165499 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp> diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 862ffd8624a3..a3e2dd5e10bb 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -111,7 +111,7 @@ void CustomShapeProperties::pushToPropSet( PropertyMap aPropertyMap; PropertySet aPropSet( xPropSet ); - if (maPresetDataMap.find(mnShapePresetType) != maPresetDataMap.end()) + if (maPresetDataMap.contains(mnShapePresetType)) { SAL_INFO( "oox.drawingml", diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx index d5a89e6f2388..d93fb41209bf 100644 --- a/oox/source/helper/propertymap.cxx +++ b/oox/source/helper/propertymap.cxx @@ -171,7 +171,7 @@ Property SAL_CALL GenericPropertySet::getPropertyByName( const OUString& rProper sal_Bool SAL_CALL GenericPropertySet::hasPropertyByName( const OUString& rPropertyName ) { - return maPropMap.find( rPropertyName ) != maPropMap.end(); + return maPropMap.contains(rPropertyName); } } // namespace diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx index 6d7b3d117fc4..37c58d25029e 100644 --- a/oox/source/shape/WpsContext.cxx +++ b/oox/source/shape/WpsContext.cxx @@ -203,7 +203,7 @@ void lcl_getFillDetailsFromPropSeq(const uno::Sequence<beans::PropertyValue>& rT if (!rTextFillSeq.hasElements()) return; comphelper::SequenceAsHashMap aTextFillMap(rTextFillSeq); - if (aTextFillMap.find(u"noFill"_ustr) != aTextFillMap.end()) + if (aTextFillMap.contains(u"noFill"_ustr)) { rFillProperties.moFillType = oox::XML_noFill; return; @@ -308,11 +308,11 @@ void lcl_getLineDetailsFromPropSeq(const uno::Sequence<beans::PropertyValue>& rT // LineJoint comphelper::SequenceAsHashMap aTextOutlineMap(rTextOutlineSeq); - if (aTextOutlineMap.find(u"bevel"_ustr) != aTextOutlineMap.end()) + if (aTextOutlineMap.contains(u"bevel"_ustr)) rLineProperties.moLineJoint = oox::XML_bevel; - else if (aTextOutlineMap.find(u"round"_ustr) != aTextOutlineMap.end()) + else if (aTextOutlineMap.contains(u"round"_ustr)) rLineProperties.moLineJoint = oox::XML_round; - else if (aTextOutlineMap.find(u"miter"_ustr) != aTextOutlineMap.end()) + else if (aTextOutlineMap.contains(u"miter"_ustr)) { // LineProperties has no member to store a miter limit. Therefore some heuristic is // added here. 0 is default for attribute "lim" in MS Office. It is rendered same as bevel.