diff options
Diffstat (limited to 'reportdesign/source/filter/xml/xmlExport.cxx')
-rw-r--r-- | reportdesign/source/filter/xml/xmlExport.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index 1a1416994f05..ce77628ea17c 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -355,14 +355,13 @@ void ORptExport::exportMasterDetailFields(const Reference<XReportComponent>& _xR OSL_ENSURE(aDetailFields.getLength() == aMasterFields.getLength(),"not equal length for master and detail fields!"); const OUString* pDetailFieldsIter = aDetailFields.getConstArray(); - const OUString* pIter = aMasterFields.getConstArray(); - const OUString* pEnd = pIter + aMasterFields.getLength(); - for(;pIter != pEnd;++pIter,++pDetailFieldsIter) + for(const OUString& rMasterField : aMasterFields) { - AddAttribute( XML_NAMESPACE_REPORT, XML_MASTER , *pIter ); + AddAttribute( XML_NAMESPACE_REPORT, XML_MASTER , rMasterField ); if ( !pDetailFieldsIter->isEmpty() ) AddAttribute( XML_NAMESPACE_REPORT, XML_DETAIL , *pDetailFieldsIter ); SvXMLElementExport aPair(*this,XML_NAMESPACE_REPORT, XML_MASTER_DETAIL_FIELD, true, true); + ++pDetailFieldsIter; } } } |