diff options
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/accessibility/AccessibleStaticTextBase.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/editobj.cxx | 15 |
2 files changed, 7 insertions, 12 deletions
diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx index 6a1c21c362c5..4f1c07f01365 100644 --- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx +++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx @@ -981,8 +981,8 @@ namespace accessibility { const beans::PropertyValue* pItr = aIntersectionSeq.getConstArray(); const beans::PropertyValue* pEnd = pItr + aIntersectionSeq.getLength(); - const beans::PropertyValue* pFind = ::std::find_if( pItr, pEnd, ::std::bind2nd( PropertyValueEqualFunctor(), boost::cref( pDefAttr[i] ) ) ); - if ( pFind == pEnd && pDefAttr[i].Handle != 0) + bool bNone = ::std::none_of( pItr, pEnd, ::std::bind2nd( PropertyValueEqualFunctor(), boost::cref( pDefAttr[i] ) ) ); + if ( bNone && pDefAttr[i].Handle != 0) { aDiffVec.push_back( pDefAttr[i] ); } diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index ecee5b62ef22..c9cce3d29bf9 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -49,6 +49,7 @@ #include <tools/tenccvt.hxx> #include <libxml/xmlwriter.h> +#include <algorithm> #if DEBUG_EDIT_ENGINE #include <iostream> @@ -1191,11 +1192,8 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const for ( sal_uInt16 nChar = 0; nChar < rC.GetText().getLength(); nChar++ ) { const ContentInfo::XEditAttributesType& rAttribs = rC.aAttribs; - ContentInfo::XEditAttributesType::const_iterator it = - std::find_if(rAttribs.begin(), rAttribs.end(), - FindAttribByChar(EE_CHAR_FONTINFO, nChar)); - - if (it == rAttribs.end()) + if ( std::none_of(rAttribs.begin(), rAttribs.end(), + FindAttribByChar(EE_CHAR_FONTINFO, nChar)) ) { sal_Unicode cOld = rC.GetText()[ nChar ]; char cConv = OUStringToOString(OUString(ConvertFontToSubsFontChar(hConv, cOld)), RTL_TEXTENCODING_SYMBOL).toChar(); @@ -1454,11 +1452,8 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream ) for ( sal_uInt16 nChar = 0; nChar < pC->GetText().getLength(); nChar++ ) { const ContentInfo::XEditAttributesType& rAttribs = pC->aAttribs; - ContentInfo::XEditAttributesType::const_iterator it = - std::find_if(rAttribs.begin(), rAttribs.end(), - FindAttribByChar(EE_CHAR_FONTINFO, nChar)); - - if (it == rAttribs.end()) + if ( std::none_of(rAttribs.begin(), rAttribs.end(), + FindAttribByChar(EE_CHAR_FONTINFO, nChar)) ) { sal_Unicode cOld = pC->GetText()[ nChar ]; DBG_ASSERT( cOld >= 0xF000, "cOld not converted?!" ); |