summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-08-29 00:47:33 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-29 11:40:29 +0200
commit085269d25a705b656436feac47149296b4b4b35d (patch)
tree3195c0526652ebd9e125507aa17cd15b2acfb368 /editeng
parentb0e74b65a86eb965c3e93da2fb77972cc5445f3c (diff)
Replace find_if with proper quantifier algorithms
Change-Id: Icc820a47ac891c358883f9c01224f676c58fdd11 Reviewed-on: https://gerrit.libreoffice.org/59744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editobj.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 57eea220c5a8..0c97c465c441 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -953,11 +953,9 @@ void EditTextObjectImpl::GetAllSections( std::vector<editeng::Section>& rAttrs )
{
editeng::Section& rSecAttr = *itCurAttr;
// serious bug: will cause duplicate attributes to be exported
- auto iter(std::find_if(
- rSecAttr.maAttributes.begin(), rSecAttr.maAttributes.end(),
+ if (std::none_of(rSecAttr.maAttributes.begin(), rSecAttr.maAttributes.end(),
[&pItem](SfxPoolItem const*const pIt)
- { return pIt->Which() == pItem->Which(); }));
- if (rSecAttr.maAttributes.end() == iter)
+ { return pIt->Which() == pItem->Which(); }))
{
rSecAttr.maAttributes.push_back(pItem);
}