diff options
Diffstat (limited to 'svx/source/dialog')
-rw-r--r-- | svx/source/dialog/ClassificationCommon.cxx | 5 | ||||
-rw-r--r-- | svx/source/dialog/charmap.cxx | 9 |
2 files changed, 5 insertions, 9 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() |