diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-03-09 23:27:25 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-03-10 09:44:56 +0100 |
commit | 5b2fc10f0cc9f15525c7723764a1feebeceb0d5e (patch) | |
tree | 1d4159a006696d3072dc98fc989c3fbd58e32b7a /dbaccess/source/filter/xml/xmlExport.cxx | |
parent | 7c693fc3f7218e1ca0c85a0de76ae84226391256 (diff) |
Modernize a bit more dbaccess
mainly by using for-range loops
but also by simplifying some simple algo
Change-Id: If04cd78e62f80f9575e24f3d50ff1e427454da79
Reviewed-on: https://gerrit.libreoffice.org/51019
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'dbaccess/source/filter/xml/xmlExport.cxx')
-rw-r--r-- | dbaccess/source/filter/xml/xmlExport.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 5c7bfb047e67..29ecde32b0ce 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -1176,29 +1176,26 @@ void ODBExport::exportAutoStyle(XPropertySet* _xProp) std::vector< XMLPropertyState > aPropStates = i.first->Filter( _xProp ); if ( !aPropStates.empty() ) { - std::vector< XMLPropertyState >::iterator aItr = aPropStates.begin(); - std::vector< XMLPropertyState >::const_iterator aEnd = aPropStates.end(); const rtl::Reference < XMLPropertySetMapper >& pStyle = i.first->getPropertySetMapper(); - while ( aItr != aEnd ) + for (auto & propState : aPropStates) { - if ( aItr->mnIndex != -1 ) + if ( propState.mnIndex != -1 ) { - switch ( pStyle->GetEntryContextId(aItr->mnIndex) ) + switch ( pStyle->GetEntryContextId(propState.mnIndex) ) { case CTF_DB_NUMBERFORMAT: { sal_Int32 nNumberFormat = -1; - if ( aItr->maValue >>= nNumberFormat ) + if ( propState.maValue >>= nNumberFormat ) addDataStyle(nNumberFormat); } break; case CTF_DB_COLUMN_TEXT_ALIGN: - if ( !aItr->maValue.hasValue() ) - aItr->maValue <<= css::awt::TextAlign::LEFT; + if ( !propState.maValue.hasValue() ) + propState.maValue <<= css::awt::TextAlign::LEFT; break; } } - ++aItr; } } |