From 7646e241f3277d06cd42983807b5e8659be173c6 Mon Sep 17 00:00:00 2001 From: OUBOUSKEN ILYAS Date: Sun, 12 Apr 2026 00:30:55 +0300 Subject: [PATCH] tdf#158237 use c++20 contains() instead of find() and end() Change-Id: I04bf1b916e5e64ab94ac0d91e3557fad925d465e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203432 Tested-by: Ilmari Lauhakangas Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas --- cui/source/dialogs/SpellDialog.cxx | 2 +- oox/source/export/drawingml.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 6d7191ce80e3..ec033f58582f 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -2143,7 +2143,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions() const aPortion1.eLanguage = eLang; aPortion1.sText = m_xEditEngine->GetText(ESelection(0, nStart, 0, aStart->nPosition)); - bool bIsIgnoreError = m_aIgnoreErrorsAt.find( nStart ) != m_aIgnoreErrorsAt.end(); + bool bIsIgnoreError = m_aIgnoreErrorsAt.contains( nStart ); if( bIsIgnoreError ) { aPortion1.bIgnoreThisError = true; diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index dad687ffe2aa..f4f129a5a217 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -4988,7 +4988,7 @@ bool IsValidOOXMLFormula(std::u16string_view sFormula) for (sal_Int16 i = 1; i < nSize; i++) { OUString sVal = strTokens[i]; - if (builtInVariables.find(sVal) != builtInVariables.end()) + if (builtInVariables.contains(sVal)) continue; // valid built-in variable // TODO: recognize valid 'guide name' pointing to other equations or adjustments