diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-02 11:28:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-02 11:28:37 +0200 |
commit | 4730b23b1da929b802d527611e974ff1b1e6d6c5 (patch) | |
tree | 0809450a51e0aae057f19a1acd84dad5ec77a9b5 /xmloff | |
parent | 42460fd4eb4757dcdf3b3e533aafabda77751321 (diff) |
use std::vector::insert when inserting multiple of the same thing
instead of looping
Change-Id: I7b8c1663e303449302e0b96dc5b483367c2a52ba
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index ef7d581edd96..9b8c205fa038 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -739,12 +739,13 @@ void lcl_ReorderInternalSequencesAccordingToTheirRangeName( if( aIt->first < 0 ) continue; // fill empty columns - for( ; nIndex < aIt->first; ++nIndex ) - rInOutSequences.push_back( + rInOutSequences.insert( + rInOutSequences.end(), + aIt->first - nIndex, SchXMLExportHelper_Impl::tDataSequenceCont::value_type( uno::Reference< chart2::data::XDataSequence >(), uno::Reference< chart2::data::XDataSequence >() )); - OSL_ASSERT( nIndex == aIt->first ); + nIndex = aIt->first; rInOutSequences.push_back( aIt->second ); } } |