From 841d9ebb1d45dff97f1dc765aae8427fab4d17a4 Mon Sep 17 00:00:00 2001 From: Thomas Benisch Date: Fri, 4 Jun 2010 18:44:19 +0200 Subject: [PATCH] calc55: #i112094# chart data table dialog cannot be disabled via UNO API --- .../controller/dialogs/tp_ChartType.cxx | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index 244d23ed8eff..6460ba7ebb99 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -853,15 +853,35 @@ ChartTypeTabPage::ChartTypeTabPage( Window* pParent bool bIsHighContrast = ( true && GetSettings().GetStyleSettings().GetHighContrastMode() ); + bool bDisableComplexChartTypes = false; + uno::Reference< beans::XPropertySet > xProps( m_xChartModel, uno::UNO_QUERY ); + if ( xProps.is() ) + { + try + { + xProps->getPropertyValue( C2U( "DisableComplexChartTypes" ) ) >>= bDisableComplexChartTypes; + } + catch( uno::Exception& e ) + { + ASSERT_EXCEPTION( e ); + } + } + m_aChartTypeDialogControllerList.push_back(new ColumnChartDialogController() ); m_aChartTypeDialogControllerList.push_back(new BarChartDialogController() ); m_aChartTypeDialogControllerList.push_back(new PieChartDialogController() ); m_aChartTypeDialogControllerList.push_back(new AreaChartDialogController() ); m_aChartTypeDialogControllerList.push_back(new LineChartDialogController() ); - m_aChartTypeDialogControllerList.push_back(new XYChartDialogController() ); - m_aChartTypeDialogControllerList.push_back(new BubbleChartDialogController() ); + if ( !bDisableComplexChartTypes ) + { + m_aChartTypeDialogControllerList.push_back(new XYChartDialogController() ); + m_aChartTypeDialogControllerList.push_back(new BubbleChartDialogController() ); + } m_aChartTypeDialogControllerList.push_back(new NetChartDialogController() ); - m_aChartTypeDialogControllerList.push_back(new StockChartDialogController() ); + if ( !bDisableComplexChartTypes ) + { + m_aChartTypeDialogControllerList.push_back(new StockChartDialogController() ); + } m_aChartTypeDialogControllerList.push_back(new CombiColumnLineChartDialogController() ); ::std::vector< ChartTypeDialogController* >::const_iterator aIter = m_aChartTypeDialogControllerList.begin();