diff options
author | Ingrid Halama <iha@openoffice.org> | 2010-07-26 11:02:09 +0200 |
---|---|---|
committer | Ingrid Halama <iha@openoffice.org> | 2010-07-26 11:02:09 +0200 |
commit | 030ee5c48dc38a7e2ba848d7985e9686054eba24 (patch) | |
tree | 1da99e06cc64ecf2ea0bdab67df50dbd891a6a1f /chart2 | |
parent | de6997f354b95aaa8df369347a207a205d1dc4bb (diff) |
calc56: #i113419# preserve 3D scheme while adding a new series
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/dialogs/DialogModel.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index 6a5a3ff6dfe7..f32a882aa1e9 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -526,6 +526,9 @@ Reference< chart2::XDataSeries > DialogModel::insertSeriesAfter( try { + Reference< chart2::XDiagram > xDiagram( m_xChartDocument->getFirstDiagram() ); + ThreeDLookScheme e3DScheme = ThreeDHelper::detectScheme( xDiagram ); + sal_Int32 nSeriesInChartType = 0; const sal_Int32 nTotalSeries = countSeries(); if( xChartType.is()) @@ -541,7 +544,7 @@ Reference< chart2::XDataSeries > DialogModel::insertSeriesAfter( xChartType, nTotalSeries, // new series' index nSeriesInChartType, - m_xChartDocument->getFirstDiagram(), + xDiagram, m_xTemplate, bCreateDataCachedSequences )); @@ -562,6 +565,8 @@ Reference< chart2::XDataSeries > DialogModel::insertSeriesAfter( aSeries.insert( aIt, xNewSeries ); xSeriesCnt->setDataSeries( ContainerToSequence( aSeries )); } + + ThreeDHelper::setScheme( xDiagram, e3DScheme ); } catch( uno::Exception & ex ) { |