sc/source/core/tool/chgtrack.cxx             |    2 +-
 sc/source/filter/oox/condformatbuffer.cxx    |    2 +-
 sw/source/core/layout/paintfrm.cxx           |    2 +-
 sw/source/core/unocore/unotextmarkup.cxx     |    2 +-
 sw/source/filter/ww8/docxattributeoutput.cxx |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 74299624ec810f9683326608ad398211cf51787b
Author:     RMZeroFour <ritobrot...@gmail.com>
AuthorDate: Sun Mar 24 10:09:49 2024 +0530
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue Mar 26 08:20:02 2024 +0100

    tdf#158237 Use contains instead of find-end
    
    As part of the efforts in #158237 to replace older parts of
    the codebase using find() and end() methods, with contains(),
    this commit does the needed changes for a few files in the
    sc and sw modulues.
    
    Change-Id: Ibf0a432c537879f5bec8e8912d11150733366689
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165223
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 53fe660f103d..6d9a401caa64 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -3988,7 +3988,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
             {
                 ScChangeAction* p = GetAction(
                         static_cast<const 
ScChangeActionReject*>(pCur)->GetRejectAction() );
-                if (p != pAct && rMap.find( p->GetActionNumber() ) == 
rMap.end())
+                if (p != pAct && !rMap.contains( p->GetActionNumber() ))
                     cStack.push( p );
             }
         }
diff --git a/sc/source/filter/oox/condformatbuffer.cxx 
b/sc/source/filter/oox/condformatbuffer.cxx
index 2626735023dd..d1ee97ca70ac 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -1253,7 +1253,7 @@ void CondFormatBuffer::finalizeImport()
     RangeMap aRangeMap;
     for (auto& rxCondFormat : maCondFormats)
     {
-        if (aRangeMap.find(rxCondFormat->getRanges()) != aRangeMap.end())
+        if (aRangeMap.contains(rxCondFormat->getRanges()))
             continue;
         aRangeMap[rxCondFormat->getRanges()] = rxCondFormat.get();
     }
diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 88175ddc250a..042c4f3be4a7 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -4577,7 +4577,7 @@ void SwTextFrame::PaintParagraphStylesHighlighting() const
 
     //  draw styles highlighter
     OUString sStyleName = GetTextNodeFirst()->GetTextColl()->GetName();
-    if (rParaStylesColorMap.find(sStyleName) != rParaStylesColorMap.end())
+    if (rParaStylesColorMap.contains(sStyleName))
     {
         SwRect aFrameAreaRect(getFrameArea());
 
diff --git a/sw/source/core/unocore/unotextmarkup.cxx 
b/sw/source/core/unocore/unotextmarkup.cxx
index 4bbc8601608d..6c49044f4911 100644
--- a/sw/source/core/unocore/unotextmarkup.cxx
+++ b/sw/source/core/unocore/unotextmarkup.cxx
@@ -478,7 +478,7 @@ uno::Any SAL_CALL SwXStringKeyMap::getValue(const OUString 
& aKey)
 
 sal_Bool SAL_CALL SwXStringKeyMap::hasValue(const OUString & aKey)
 {
-    return maMap.find( aKey ) != maMap.end();
+    return maMap.contains(aKey);
 }
 
 void SAL_CALL SwXStringKeyMap::insertValue(const OUString & aKey, const 
uno::Any & aValue)
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 47ffb332bf21..31711eb4e887 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -577,7 +577,7 @@ sal_Int32 
DocxAttributeOutput::StartParagraph(ww8::WW8TableNodeInfo::Pointer_t p
             {
                 const SfxGrabBagItem& rParaGrabBag = static_cast<const 
SfxGrabBagItem&>(*pItem);
                 const std::map<OUString, css::uno::Any>& rMap = 
rParaGrabBag.GetGrabBag();
-                bEndParaSdt = m_aParagraphSdt.m_bStartedSdt && 
rMap.find("ParaSdtEndBefore") != rMap.end();
+                bEndParaSdt = m_aParagraphSdt.m_bStartedSdt && 
rMap.contains("ParaSdtEndBefore");
             }
         }
     }

Reply via email to