diff options
author | Ingrid Halama <iha@openoffice.org> | 2010-10-07 19:02:44 +0200 |
---|---|---|
committer | Ingrid Halama <iha@openoffice.org> | 2010-10-07 19:02:44 +0200 |
commit | 9767c7f18e9030097b198877e0ab87ae40a52a54 (patch) | |
tree | 3e796e1615d3cc44a85be3faab6ce4192fac695f /chart2/source/controller/dialogs/DialogModel.cxx | |
parent | 5c43db9393f0581bbeb712cb4faf037554b5370e (diff) | |
parent | e443106e71a52fd1e7ee2e095dcbcbca70d19606 (diff) |
chart49: merge with DEV300_m89
Diffstat (limited to 'chart2/source/controller/dialogs/DialogModel.cxx')
-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 eeeba4dda226..eedd2e3c6ba9 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> @@ -524,6 +525,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()) @@ -539,7 +543,7 @@ Reference< chart2::XDataSeries > DialogModel::insertSeriesAfter( xChartType, nTotalSeries, // new series' index nSeriesInChartType, - m_xChartDocument->getFirstDiagram(), + xDiagram, m_xTemplate, bCreateDataCachedSequences )); @@ -560,6 +564,8 @@ Reference< chart2::XDataSeries > DialogModel::insertSeriesAfter( aSeries.insert( aIt, xNewSeries ); xSeriesCnt->setDataSeries( ContainerToSequence( aSeries )); } + + ThreeDHelper::setScheme( xDiagram, e3DScheme ); } catch( uno::Exception & ex ) { @@ -693,14 +699,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 ) |