calc56: #i112385# loosing 3D scheme settings

This commit is contained in:
Ingrid Halama 2010-07-02 16:37:45 +02:00
parent c4fc6f85c5
commit a7b51f6bb8

View file

@ -41,6 +41,7 @@
#include "CommonFunctors.hxx" #include "CommonFunctors.hxx"
#include "ControllerLockGuard.hxx" #include "ControllerLockGuard.hxx"
#include "ChartTypeHelper.hxx" #include "ChartTypeHelper.hxx"
#include "ThreeDHelper.hxx"
#include <com/sun/star/util/XCloneable.hpp> #include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/chart2/AxisType.hpp> #include <com/sun/star/chart2/AxisType.hpp>
@ -694,14 +695,19 @@ bool DialogModel::setData(
m_xTemplate->getDataInterpreter()); m_xTemplate->getDataInterpreter());
if( xInterpreter.is()) if( xInterpreter.is())
{ {
Reference< chart2::XDiagram > xDiagram( m_xChartDocument->getFirstDiagram() );
ThreeDLookScheme e3DScheme = ThreeDHelper::detectScheme( xDiagram );
::std::vector< Reference< XDataSeries > > aSeriesToReUse( ::std::vector< Reference< XDataSeries > > aSeriesToReUse(
DiagramHelper::getDataSeriesFromDiagram( m_xChartDocument->getFirstDiagram())); DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
applyInterpretedData( applyInterpretedData(
xInterpreter->interpretDataSource( xInterpreter->interpretDataSource(
xDataSource, rArguments, xDataSource, rArguments,
ContainerToSequence( aSeriesToReUse )), ContainerToSequence( aSeriesToReUse )),
aSeriesToReUse, aSeriesToReUse,
true /* bSetStyles */); true /* bSetStyles */);
ThreeDHelper::setScheme( xDiagram, e3DScheme );
} }
} }
catch( uno::Exception & ex ) catch( uno::Exception & ex )