diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-10-09 18:56:58 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-10-09 18:56:58 +0200 |
commit | 93653d80205d51b5c4c7f934d9e04f51d1bfdba7 (patch) | |
tree | 5a6fd07b9ccbb7a86f14da04f75c16690e8f4bfc /chart2/source/controller/dialogs | |
parent | build breakers (diff) | |
parent | #i10000# (diff) | |
download | core-93653d80205d51b5c4c7f934d9e04f51d1bfdba7.tar.gz core-93653d80205d51b5c4c7f934d9e04f51d1bfdba7.zip |
CWS changehid: resync to m89
Diffstat (limited to 'chart2/source/controller/dialogs')
-rw-r--r-- | chart2/source/controller/dialogs/DialogModel.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index f104045727bb..f32a882aa1e9 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -41,6 +41,7 @@ #include "CommonFunctors.hxx" #include "ControllerLockGuard.hxx" #include "ChartTypeHelper.hxx" +#include "ThreeDHelper.hxx" #include <com/sun/star/util/XCloneable.hpp> #include <com/sun/star/chart2/AxisType.hpp> @@ -525,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()) @@ -540,7 +544,7 @@ Reference< chart2::XDataSeries > DialogModel::insertSeriesAfter( xChartType, nTotalSeries, // new series' index nSeriesInChartType, - m_xChartDocument->getFirstDiagram(), + xDiagram, m_xTemplate, bCreateDataCachedSequences )); @@ -561,6 +565,8 @@ Reference< chart2::XDataSeries > DialogModel::insertSeriesAfter( aSeries.insert( aIt, xNewSeries ); xSeriesCnt->setDataSeries( ContainerToSequence( aSeries )); } + + ThreeDHelper::setScheme( xDiagram, e3DScheme ); } catch( uno::Exception & ex ) { @@ -694,14 +700,19 @@ bool DialogModel::setData( m_xTemplate->getDataInterpreter()); if( xInterpreter.is()) { + Reference< chart2::XDiagram > xDiagram( m_xChartDocument->getFirstDiagram() ); + ThreeDLookScheme e3DScheme = ThreeDHelper::detectScheme( xDiagram ); + ::std::vector< Reference< XDataSeries > > aSeriesToReUse( - DiagramHelper::getDataSeriesFromDiagram( m_xChartDocument->getFirstDiagram())); + DiagramHelper::getDataSeriesFromDiagram( xDiagram )); applyInterpretedData( xInterpreter->interpretDataSource( xDataSource, rArguments, ContainerToSequence( aSeriesToReUse )), aSeriesToReUse, true /* bSetStyles */); + + ThreeDHelper::setScheme( xDiagram, e3DScheme ); } } catch( uno::Exception & ex ) |