summaryrefslogtreecommitdiff
path: root/chart2/source/controller/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/dialogs')
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar.cxx19
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx26
2 files changed, 41 insertions, 4 deletions
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index 75457a5e7cad..8b649072538e 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -37,6 +37,7 @@
#include "RangeSelectionHelper.hxx"
// for RANGE_SELECTION_INVALID_RANGE_BACKGROUND_COLOR
#include "TabPageNotifiable.hxx"
+#include "macros.hxx"
#include <rtl/math.hxx>
#include <vcl/dialog.hxx>
@@ -147,7 +148,8 @@ ErrorBarResources::ErrorBarResources( Window* pParent, Dialog * pParentDialog,
m_pParentWindow( pParent ),
m_pParentDialog( pParentDialog ),
m_pCurrentRangeChoosingField( 0 ),
- m_bHasInternalDataProvider( true )
+ m_bHasInternalDataProvider( true ),
+ m_bDisableDataTableDialog( false )
{
if( m_bNoneAvailable )
m_aRbNone.SetClickHdl( LINK( this, ErrorBarResources, CategoryChosen ));
@@ -197,7 +199,21 @@ void ErrorBarResources::SetChartDocumentForRangeChoosing(
const uno::Reference< chart2::XChartDocument > & xChartDocument )
{
if( xChartDocument.is())
+ {
m_bHasInternalDataProvider = xChartDocument->hasInternalDataProvider();
+ uno::Reference< beans::XPropertySet > xProps( xChartDocument, uno::UNO_QUERY );
+ if ( xProps.is() )
+ {
+ try
+ {
+ xProps->getPropertyValue( C2U( "DisableDataTableDialog" ) ) >>= m_bDisableDataTableDialog;
+ }
+ catch( uno::Exception& e )
+ {
+ ASSERT_EXCEPTION( e );
+ }
+ }
+ }
m_apRangeSelectionHelper.reset( new RangeSelectionHelper( xChartDocument ));
// has internal data provider => rename "cell range" to "from data"
@@ -240,6 +256,7 @@ void ErrorBarResources::UpdateControlStates()
m_aLbFunction.Enable( bIsFunction );
// range buttons
+ m_aRbRange.Enable( !m_bHasInternalDataProvider || !m_bDisableDataTableDialog );
bool bShowRange = ( m_aRbRange.IsChecked());
bool bCanChooseRange =
( bShowRange &&
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 1696fcdc17c2..ec6c1d2a1c10 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();