summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorAdrien Ollier <adr.ollier@hotmail.fr>2019-07-22 18:48:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-23 06:47:18 +0200
commit4ad77ab737a00fd1325753592acca9ae00a838af (patch)
treedc605d9943bcd7312ba1e7588b4e9d70f375c27c /writerfilter
parentea20fcce1dac735a9730ab6672bf60ccec595e71 (diff)
using an algorithm of the STL
makes code clearer Change-Id: I0bf26b6a75354ccbb79d431c947277d621985385 Signed-off-by: Adrien Ollier <adr.ollier@hotmail.fr> Reviewed-on: https://gerrit.libreoffice.org/76127 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfsprm.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/writerfilter/source/rtftok/rtfsprm.cxx b/writerfilter/source/rtftok/rtfsprm.cxx
index 15026cb93ea4..b50d9b166344 100644
--- a/writerfilter/source/rtftok/rtfsprm.cxx
+++ b/writerfilter/source/rtftok/rtfsprm.cxx
@@ -12,6 +12,7 @@
#include <ooxml/QNameToString.hxx>
#include <rtl/strbuf.hxx>
#include "rtfdocumentimpl.hxx"
+#include <algorithm>
namespace writerfilter
{
@@ -367,10 +368,10 @@ RTFSprms RTFSprms::cloneAndDeduplicate(RTFSprms& rReference, Id const nStyleType
bool RTFSprms::equals(RTFValue& rOther)
{
- for (auto& rSprm : *m_pSprms)
- if (!rSprm.second->equals(rOther))
- return false;
- return true;
+ return std::all_of(m_pSprms->begin(), m_pSprms->end(),
+ [&](const std::pair<Id, RTFValue::Pointer_t>& raPair) -> bool {
+ return raPair.second->equals(rOther);
+ });
}
void RTFSprms::ensureCopyBeforeWrite()