diff options
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/dialog/ClassificationCommon.cxx | 5 | ||||
-rw-r--r-- | svx/source/dialog/charmap.cxx | 9 | ||||
-rw-r--r-- | svx/source/items/customshapeitem.cxx | 4 |
3 files changed, 7 insertions, 11 deletions
diff --git a/svx/source/dialog/ClassificationCommon.cxx b/svx/source/dialog/ClassificationCommon.cxx index cd5dc7324d02..082b5b6a9418 100644 --- a/svx/source/dialog/ClassificationCommon.cxx +++ b/svx/source/dialog/ClassificationCommon.cxx @@ -58,9 +58,8 @@ OUString getProperty(uno::Reference<beans::XPropertyContainer> const& rxProperty bool containsProperty(uno::Sequence<beans::Property> const& rProperties, OUString const& rName) { - return std::find_if(rProperties.begin(), rProperties.end(), - [&](const beans::Property& rProperty) { return rProperty.Name == rName; }) - != rProperties.end(); + return std::any_of(rProperties.begin(), rProperties.end(), + [&](const beans::Property& rProperty) { return rProperty.Name == rName; }); } void removeAllProperties(uno::Reference<beans::XPropertyContainer> const& rxPropertyContainer) diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 20d5cc11bd4f..0e8f30204fcb 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -204,19 +204,16 @@ void SvxShowCharSet::getFavCharacterList() bool SvxShowCharSet::isFavChar(const OUString& sTitle, const OUString& rFont) { - auto itChar = std::find_if(maFavCharList.begin(), + auto isFavCharTitleExists = std::any_of(maFavCharList.begin(), maFavCharList.end(), [sTitle] (const OUString & a) { return a == sTitle; }); - auto itChar2 = std::find_if(maFavCharFontList.begin(), + auto isFavCharFontExists = std::any_of(maFavCharFontList.begin(), maFavCharFontList.end(), [rFont] (const OUString & a) { return a == rFont; }); // if Fav char to be added is already in list, return true - if( itChar != maFavCharList.end() && itChar2 != maFavCharFontList.end() ) - return true; - else - return false; + return isFavCharTitleExists && isFavCharFontExists; } void SvxShowCharSet::createContextMenu() diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx index ffd6c514c64f..f19937113b82 100644 --- a/svx/source/items/customshapeitem.cxx +++ b/svx/source/items/customshapeitem.cxx @@ -141,7 +141,7 @@ void SdrCustomShapeGeometryItem::SetPropertyValue( const css::beans::PropertyVal } else { // it's a new property - assert(aPropSeq.end() == std::find_if(aPropSeq.begin(), aPropSeq.end(), + assert(std::none_of(aPropSeq.begin(), aPropSeq.end(), [&rPropVal](beans::PropertyValue const& rVal) { return rVal.Name == rPropVal.Name; } )); sal_uInt32 nIndex = aPropSeq.getLength(); @@ -167,7 +167,7 @@ void SdrCustomShapeGeometryItem::SetPropertyValue( const OUString& rSequenceName aValue.Name = rSequenceName; aValue.Value <<= aSeq; - assert(aPropSeq.end() == std::find_if(aPropSeq.begin(), aPropSeq.end(), + assert(std::none_of(aPropSeq.begin(), aPropSeq.end(), [&rSequenceName](beans::PropertyValue const& rV) { return rV.Name == rSequenceName; } )); sal_uInt32 nIndex = aPropSeq.getLength(); |