summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2010-06-04 18:44:00 +0200
committerThomas Benisch <tbe@openoffice.org>2010-06-04 18:44:00 +0200
commitf84216c511b8d3f3228f012d49e3a9503fddee74 (patch)
tree7e3ea9c9e2d153aecd798a630655fc754e06fc6d /chart2
parent004a866033b8050c816fdea36bab011a15db8536 (diff)
calc55: #i112094# chart data table dialog cannot be disabled via UNO API
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar.cxx19
1 files changed, 18 insertions, 1 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 &&