diff options
author | Ingrid Halama <iha@openoffice.org> | 2010-04-09 10:24:13 +0200 |
---|---|---|
committer | Ingrid Halama <iha@openoffice.org> | 2010-04-09 10:24:13 +0200 |
commit | cba8a6f937aea45938401957dcca617172cb3d57 (patch) | |
tree | ada9ad0e9a7ef05a7c9db84110121602c13898f5 /chart2/source/tools/DiagramHelper.cxx | |
parent | 13d7655a877492f67814c1a269bcb52264f0e3e1 (diff) | |
parent | 6a30f2a3025a9db27d1230d9498570964cd74e3f (diff) |
chart45: merge with DEV300_m76
Diffstat (limited to 'chart2/source/tools/DiagramHelper.cxx')
-rw-r--r-- | chart2/source/tools/DiagramHelper.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index a8da65e5133d..b95e7522943e 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -599,7 +599,7 @@ bool DiagramHelper::attachSeriesToAxis( bool bAttachToMainAxis , const uno::Reference< chart2::XDataSeries >& xDataSeries , const uno::Reference< chart2::XDiagram >& xDiagram , const uno::Reference< uno::XComponentContext > & xContext - ) + , bool bAdaptAxes ) { bool bChanged = false; @@ -610,6 +610,7 @@ bool DiagramHelper::attachSeriesToAxis( bool bAttachToMainAxis sal_Int32 nNewAxisIndex = bAttachToMainAxis ? 0 : 1; sal_Int32 nOldAxisIndex = DataSeriesHelper::getAttachedAxisIndex(xDataSeries); + uno::Reference< chart2::XAxis > xOldAxis( DiagramHelper::getAttachedAxis( xDataSeries, xDiagram ) ); if( nOldAxisIndex != nNewAxisIndex ) { @@ -629,6 +630,11 @@ bool DiagramHelper::attachSeriesToAxis( bool bAttachToMainAxis uno::Reference< XAxis > xAxis( AxisHelper::getAxis( 1, bAttachToMainAxis, xDiagram ) ); if(!xAxis.is()) //create an axis if necessary xAxis = AxisHelper::createAxis( 1, bAttachToMainAxis, xDiagram, xContext ); + if( bAdaptAxes ) + { + AxisHelper::makeAxisVisible( xAxis ); + AxisHelper::hideAxisIfNoDataIsAttached( xOldAxis, xDiagram ); + } } return bChanged; |