diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-06-16 15:09:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-06-16 16:56:51 +0200 |
commit | 96be3821f7dad19004a43696555eaa4fa2e1aef5 (patch) | |
tree | 50dede3672292c7892517a74b5b20662d6b4a473 /xmloff | |
parent | 837f748ce61145b90068ed8c0a630f1cf15fa080 (diff) |
crashtesting: failure on export to odt of ooo33851-1.sxw
since...
commit 79d58ee14da8fbf636fb087453834abb7173d3fc
Date: Sun May 12 16:07:58 2019 +0300
Simplify Sequence iterations in xmloff/source/{style..xforms}
Use range-based loops or replace with comphelper or STL functions
Change-Id: I0e00ea30a45d0ba3aa00fcb20b80fdc4931fe14d
Reviewed-on: https://gerrit.libreoffice.org/74116
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/text/XMLTextCharStyleNamesElementExport.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xmloff/source/text/XMLTextCharStyleNamesElementExport.cxx b/xmloff/source/text/XMLTextCharStyleNamesElementExport.cxx index 225eb6dcd246..55beb5f027f3 100644 --- a/xmloff/source/text/XMLTextCharStyleNamesElementExport.cxx +++ b/xmloff/source/text/XMLTextCharStyleNamesElementExport.cxx @@ -54,11 +54,14 @@ XMLTextCharStyleNamesElementExport::XMLTextCharStyleNamesElementExport( { aName = rExport.GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_TEXT, GetXMLToken(XML_SPAN) ); - for (const auto& rName : aNames) + sal_Int32 i = nCount; + const OUString *pName = aNames.getConstArray(); + while( --i ) { rExport.AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME, - rExport.EncodeStyleName( rName ) ); + rExport.EncodeStyleName( *pName ) ); rExport.StartElement( aName, false ); + ++pName; } } } |