From c675a2d669c191f3b18ae006c78ef83efba14c30 Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Thu, 30 Apr 2015 01:57:43 +0900 Subject: 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 Reviewed-by: Michael Stahl --- xmloff/source/xforms/TokenContext.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'xmloff/source/xforms') diff --git a/xmloff/source/xforms/TokenContext.cxx b/xmloff/source/xforms/TokenContext.cxx index 6d07235290db..981c15e50659 100644 --- a/xmloff/source/xforms/TokenContext.cxx +++ b/xmloff/source/xforms/TokenContext.cxx @@ -19,8 +19,6 @@ #include -#include - #include "TokenContext.hxx" #include #include @@ -28,6 +26,7 @@ #include #include +#include using com::sun::star::uno::Reference; using com::sun::star::xml::sax::XAttributeList; @@ -134,7 +133,7 @@ void TokenContext::Characters( const OUString& rCharacters ) const sal_Unicode* pEnd = &( pBegin[ rCharacters.getLength() ] ); // raise error if non-whitespace character is found - if( ::std::find_if( pBegin, pEnd, ::std::not1(::std::ptr_fun(lcl_IsWhiteSpace)) ) != pEnd ) + if( !::std::all_of( pBegin, pEnd, lcl_IsWhiteSpace ) ) GetImport().SetError( XMLERROR_UNKNOWN_CHARACTERS, rCharacters ); } -- cgit