summaryrefslogtreecommitdiff
path: root/xmloff/source/text
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2015-04-30 01:57:43 +0900
committerMichael Stahl <mstahl@redhat.com>2015-04-30 11:51:17 +0000
commitc675a2d669c191f3b18ae006c78ef83efba14c30 (patch)
treec8fd1a6efd7d5ba73d97159180a779d73f3f46ff /xmloff/source/text
parentca37fcec558414ff44fb61358406ad08fe6ea5bd (diff)
xmloff: simplify code by using std::all_of/std::any_of/std::none_of
Change-Id: I87311d8989c23538983d45ad9b12a64080441d78 Reviewed-on: https://gerrit.libreoffice.org/15569 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'xmloff/source/text')
-rw-r--r--xmloff/source/text/txtparae.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 5be4ccc21698..46a19e8a700f 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -108,6 +108,7 @@
#include <list>
#include <unordered_map>
#include <vector>
+#include <algorithm>
using namespace ::std;
using namespace ::com::sun::star;
@@ -665,7 +666,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
break;
}
- if( find_if( xPropStates.begin(), xPropStates.end(), lcl_validPropState ) != xPropStates.end() )
+ if( std::any_of( xPropStates.begin(), xPropStates.end(), lcl_validPropState ) )
{
GetAutoStylePool().Add( nFamily, sParent, xPropStates );
if( !sCondParent.isEmpty() && sParent != sCondParent )
@@ -709,7 +710,7 @@ OUString XMLTextParagraphExport::Find(
++ppAddStates;
}
}
- if( find_if( xPropStates.begin(), xPropStates.end(), lcl_validPropState ) != xPropStates.end() )
+ if( std::any_of( xPropStates.begin(), xPropStates.end(), lcl_validPropState ) )
sName = GetAutoStylePool().Find( nFamily, sName, xPropStates );
return sName;