diff options
-rw-r--r-- | chart2/source/view/charttypes/BarChart.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx index 5c57ecf25c63..941257b3c401 100644 --- a/chart2/source/view/charttypes/BarChart.cxx +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -773,7 +773,15 @@ void BarChart::createShapes() } else //m_nDimension!=3 { + // performance improvement: alloc the sequence before the rendering + // otherwise we have 2 realloc calls drawing::PolyPolygonShape3D aPoly; + aPoly.SequenceX.realloc(1); + aPoly.SequenceY.realloc(1); + aPoly.SequenceZ.realloc(1); + aPoly.SequenceX[0].realloc(5); + aPoly.SequenceY[0].realloc(5); + aPoly.SequenceZ[0].realloc(5); drawing::Position3D aLeftUpperPoint( fLogicX-fLogicBarWidth/2.0,fUpperYValue,fLogicZ ); drawing::Position3D aRightUpperPoint( fLogicX+fLogicBarWidth/2.0,fUpperYValue,fLogicZ ); |