summaryrefslogtreecommitdiff
path: root/svx/source/form/formcontrolfactory.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/form/formcontrolfactory.cxx')
-rw-r--r--svx/source/form/formcontrolfactory.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx
index f0fc654b504b..5f7cbedef8f4 100644
--- a/svx/source/form/formcontrolfactory.cxx
+++ b/svx/source/form/formcontrolfactory.cxx
@@ -525,16 +525,10 @@ namespace svxform
// has a setting for the preferred line end format
bool bDosLineEnds = false;
Sequence< PropertyValue > aInfo = lcl_getDataSourceIndirectProperties( _rxModel, m_pData->m_xContext );
- const PropertyValue* pInfo = aInfo.getConstArray();
- const PropertyValue* pInfoEnd = pInfo + aInfo.getLength();
- for ( ; pInfo != pInfoEnd; ++pInfo )
- {
- if ( pInfo->Name == "PreferDosLikeLineEnds" )
- {
- pInfo->Value >>= bDosLineEnds;
- break;
- }
- }
+ const PropertyValue* pInfo = std::find_if(aInfo.begin(), aInfo.end(),
+ [](const PropertyValue& rInfo) { return rInfo.Name == "PreferDosLikeLineEnds"; });
+ if (pInfo != aInfo.end())
+ pInfo->Value >>= bDosLineEnds;
sal_Int16 nLineEndFormat = bDosLineEnds ? LineEndFormat::CARRIAGE_RETURN_LINE_FEED : LineEndFormat::LINE_FEED;
_rxModel->setPropertyValue( FM_PROP_LINEENDFORMAT, makeAny( nLineEndFormat ) );