diff options
Diffstat (limited to 'dbaccess/source/filter/xml')
-rw-r--r-- | dbaccess/source/filter/xml/xmlAutoStyle.cxx | 12 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlExport.cxx | 15 |
2 files changed, 11 insertions, 16 deletions
diff --git a/dbaccess/source/filter/xml/xmlAutoStyle.cxx b/dbaccess/source/filter/xml/xmlAutoStyle.cxx index cfa5829f2ad5..c9e328867b7a 100644 --- a/dbaccess/source/filter/xml/xmlAutoStyle.cxx +++ b/dbaccess/source/filter/xml/xmlAutoStyle.cxx @@ -39,24 +39,22 @@ void OXMLAutoStylePoolP::exportStyleAttributes( if ( nFamily == XML_STYLE_FAMILY_TABLE_COLUMN ) { rtl::Reference< XMLPropertySetMapper > aPropMapper = rODBExport.GetColumnStylesPropertySetMapper(); - std::vector< XMLPropertyState >::const_iterator i = rProperties.begin(); - std::vector< XMLPropertyState >::const_iterator aEnd = rProperties.end(); - for ( ; i != aEnd ; ++i ) + for (auto const& property : rProperties) { - sal_Int16 nContextID = aPropMapper->GetEntryContextId(i->mnIndex); + sal_Int16 nContextID = aPropMapper->GetEntryContextId(property.mnIndex); switch (nContextID) { case CTF_DB_NUMBERFORMAT : { sal_Int32 nNumberFormat = 0; - if ( i->maValue >>= nNumberFormat ) + if ( property.maValue >>= nNumberFormat ) { OUString sAttrValue = rODBExport.getDataStyleName(nNumberFormat); if ( !sAttrValue.isEmpty() ) { GetExport().AddAttribute( - aPropMapper->GetEntryNameSpace(i->mnIndex), - aPropMapper->GetEntryXMLName(i->mnIndex), + aPropMapper->GetEntryNameSpace(property.mnIndex), + aPropMapper->GetEntryXMLName(property.mnIndex), sAttrValue ); } } 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; } } |