summaryrefslogtreecommitdiff
path: root/svx/source/dialog/charmap.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/dialog/charmap.cxx')
-rw-r--r--svx/source/dialog/charmap.cxx9
1 files changed, 3 insertions, 6 deletions
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()