writerfilter: use std::any_of()

Change-Id: I21d5059beee737c286d85f559c767f43962a63ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96355
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Miklos Vajna 2020-06-15 15:31:14 +02:00
parent 1067bf8a78
commit e542b622ae
2 changed files with 6 additions and 11 deletions

View file

@ -200,11 +200,9 @@ sal_Int32 SdtHelper::getInteropGrabBagSize() const { return m_aGrabBag.size(); }
bool SdtHelper::containedInInteropGrabBag(const OUString& rValueName)
{
for (const beans::PropertyValue& i : m_aGrabBag)
if (i.Name == rValueName)
return true;
return false;
return std::any_of(
m_aGrabBag.begin(), m_aGrabBag.end(),
[&rValueName](const beans::PropertyValue& i) { return i.Name == rValueName; });
}
} // namespace writerfilter::dmapper

View file

@ -1709,12 +1709,9 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& rBuffer, RTFSprms* const pSprms,
bool findPropertyName(const std::vector<beans::PropertyValue>& rProperties, const OUString& rName)
{
for (auto& rProperty : rProperties)
{
if (rProperty.Name == rName)
return true;
}
return false;
return std::any_of(
rProperties.begin(), rProperties.end(),
[&rName](const beans::PropertyValue& rProperty) { return rProperty.Name == rName; });
}
void RTFDocumentImpl::backupTableRowProperties()