diff options
author | RMZeroFour <ritobroto04@gmail.com> | 2024-03-24 10:09:49 +0530 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-03-26 08:20:02 +0100 |
commit | 74299624ec810f9683326608ad398211cf51787b (patch) | |
tree | 131719a5d4be8175d87f6055b6002a2c6a5c39b9 /sw/source | |
parent | 24aed4f9a5f6351d9153c96e3d1d1aa68028c0d0 (diff) |
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.weghorn@posteo.de>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unotextmarkup.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
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"); } } } |