diff options
Diffstat (limited to 'oox/source/drawingml/chart/chartconverter.cxx')
-rw-r--r-- | oox/source/drawingml/chart/chartconverter.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/oox/source/drawingml/chart/chartconverter.cxx b/oox/source/drawingml/chart/chartconverter.cxx index d49430245e7f..ff43fa7a5460 100644 --- a/oox/source/drawingml/chart/chartconverter.cxx +++ b/oox/source/drawingml/chart/chartconverter.cxx @@ -133,11 +133,10 @@ Reference< XDataSequence > ChartConverter::createDataSequence( if( !rDataSeq.maData.empty() ) { // create a single-row array from constant source data - Matrix< Any > aMatrix( rDataSeq.maData.size(), 1 ); - Matrix< Any >::iterator aMIt = aMatrix.begin(); - // TODO: how to handle missing values in the map? - for( DataSequenceModel::AnyMap::const_iterator aDIt = rDataSeq.maData.begin(), aDEnd = rDataSeq.maData.end(); aDIt != aDEnd; ++aDIt, ++aMIt ) - *aMIt = aDIt->second; + Matrix< Any > aMatrix( rDataSeq.mnPointCount, 1 ); + for( DataSequenceModel::AnyMap::const_iterator aDIt = rDataSeq.maData.begin(), aDEnd = rDataSeq.maData.end(); aDIt != aDEnd; ++aDIt ) + *aMatrix.at(aDIt->first, 0) = aDIt->second; + aRangeRep = lclGenerateApiArray( aMatrix ); } |