calc56: #i113419# preserve 3D scheme while adding a new series

This commit is contained in:
Ingrid Halama 2010-07-26 11:02:09 +02:00
parent de6997f354
commit 030ee5c48d

View file

@ -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 )
{