diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-20 17:41:16 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-24 22:24:30 -0400 |
commit | 6292dbc3ef4067280290f2c7f95292e2791a15db (patch) | |
tree | f58bf37022ddae84436be5e1daf4507045540ce3 /chart2/source | |
parent | ee84eb9678c1743d3e7387359158e2509adeb87f (diff) |
Better to associate true for "enable" and false for "disable".
The code reads better this way, and certainly is easier on human brain
to process their logic.
Change-Id: I3150fca3385931b9fe01ad13cb11fab410331349
Diffstat (limited to 'chart2/source')
5 files changed, 17 insertions, 17 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index b6242a4a1070..dea17aa52161 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -149,8 +149,8 @@ enum PROP_DOCUMENT_ADDITIONAL_SHAPES, PROP_DOCUMENT_UPDATE_ADDIN, PROP_DOCUMENT_NULL_DATE, - PROP_DOCUMENT_DISABLE_COMPLEX_CHARTTYPES, - PROP_DOCUMENT_DISABLE_DATATABLE_DIALOG + PROP_DOCUMENT_ENABLE_COMPLEX_CHARTTYPES, + PROP_DOCUMENT_ENABLE_DATATABLE_DIALOG }; void lcl_AddPropertiesToVector( @@ -224,14 +224,14 @@ void lcl_AddPropertiesToVector( beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( "DisableComplexChartTypes", - PROP_DOCUMENT_DISABLE_COMPLEX_CHARTTYPES, + Property( "EnableComplexChartTypes", + PROP_DOCUMENT_ENABLE_COMPLEX_CHARTTYPES, ::getBooleanCppuType(), //#i112666# no PropertyChangeEvent is fired on change so far beans::PropertyAttribute::MAYBEDEFAULT ) ); rOutProperties.push_back( - Property( "DisableDataTableDialog", - PROP_DOCUMENT_DISABLE_DATATABLE_DIALOG, + Property( "EnableDataTableDialog", + PROP_DOCUMENT_ENABLE_DATATABLE_DIALOG, ::getBooleanCppuType(), //#i112666# no PropertyChangeEvent is fired on change so far beans::PropertyAttribute::MAYBEDEFAULT ) ); @@ -1531,8 +1531,8 @@ const std::vector< WrappedProperty* > ChartDocumentWrapper::createWrappedPropert aWrappedProperties.push_back( new WrappedAdditionalShapesProperty( *this ) ); aWrappedProperties.push_back( new WrappedRefreshAddInAllowedProperty( *this ) ); aWrappedProperties.push_back( new WrappedIgnoreProperty("NullDate",Any() ) ); // i99104 - aWrappedProperties.push_back( new WrappedIgnoreProperty("DisableComplexChartTypes", uno::makeAny( sal_False ) ) ); - aWrappedProperties.push_back( new WrappedIgnoreProperty("DisableDataTableDialog", uno::makeAny( sal_False ) ) ); + aWrappedProperties.push_back( new WrappedIgnoreProperty("EnableComplexChartTypes", uno::makeAny(sal_True) ) ); + aWrappedProperties.push_back( new WrappedIgnoreProperty("EnableDataTableDialog", uno::makeAny(sal_True) ) ); return aWrappedProperties; } diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index 7c25681bf7df..2803f37f0fe7 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -97,7 +97,7 @@ ErrorBarResources::ErrorBarResources( VclBuilderContainer* pParent, Dialog * pPa m_pParentDialog( pParentDialog ), m_pCurrentRangeChoosingField( 0 ), m_bHasInternalDataProvider( true ), - m_bDisableDataTableDialog( false ) + m_bEnableDataTableDialog( true ) { pParent->get(m_pRbNone,"RB_NONE"); pParent->get(m_pRbConst, "RB_CONST"); @@ -181,7 +181,7 @@ void ErrorBarResources::SetChartDocumentForRangeChoosing( { try { - xProps->getPropertyValue( "DisableDataTableDialog" ) >>= m_bDisableDataTableDialog; + xProps->getPropertyValue("EnableDataTableDialog") >>= m_bEnableDataTableDialog; } catch( const uno::Exception& e ) { @@ -231,7 +231,7 @@ void ErrorBarResources::UpdateControlStates() m_pLbFunction->Enable( bIsFunction ); // range buttons - m_pRbRange->Enable( !m_bHasInternalDataProvider || !m_bDisableDataTableDialog ); + m_pRbRange->Enable( !m_bHasInternalDataProvider || m_bEnableDataTableDialog ); bool bShowRange = ( m_pRbRange->IsChecked()); bool bCanChooseRange = ( bShowRange && diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index 63df637a7b2b..0c78e59246c8 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -696,13 +696,13 @@ ChartTypeTabPage::ChartTypeTabPage(Window* pParent m_pSubTypeList->SetColCount(4); m_pSubTypeList->SetLineCount(1); - bool bDisableComplexChartTypes = false; + bool bEnableComplexChartTypes = true; uno::Reference< beans::XPropertySet > xProps( m_xChartModel, uno::UNO_QUERY ); if ( xProps.is() ) { try { - xProps->getPropertyValue( "DisableComplexChartTypes" ) >>= bDisableComplexChartTypes; + xProps->getPropertyValue("EnableComplexChartTypes") >>= bEnableComplexChartTypes; } catch( const uno::Exception& e ) { @@ -715,13 +715,13 @@ ChartTypeTabPage::ChartTypeTabPage(Window* pParent m_aChartTypeDialogControllerList.push_back(new PieChartDialogController() ); m_aChartTypeDialogControllerList.push_back(new AreaChartDialogController() ); m_aChartTypeDialogControllerList.push_back(new LineChartDialogController() ); - if ( !bDisableComplexChartTypes ) + if (bEnableComplexChartTypes) { m_aChartTypeDialogControllerList.push_back(new XYChartDialogController() ); m_aChartTypeDialogControllerList.push_back(new BubbleChartDialogController() ); } m_aChartTypeDialogControllerList.push_back(new NetChartDialogController() ); - if ( !bDisableComplexChartTypes ) + if (bEnableComplexChartTypes) { m_aChartTypeDialogControllerList.push_back(new StockChartDialogController() ); } diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx index 83cc4d1de9b1..de97253f749f 100644 --- a/chart2/source/controller/inc/res_ErrorBar.hxx +++ b/chart2/source/controller/inc/res_ErrorBar.hxx @@ -119,7 +119,7 @@ private: boost::scoped_ptr< RangeSelectionHelper > m_apRangeSelectionHelper; Edit * m_pCurrentRangeChoosingField; bool m_bHasInternalDataProvider; - bool m_bDisableDataTableDialog; + bool m_bEnableDataTableDialog; DECL_LINK( CategoryChosen, void * ); DECL_LINK( SynchronizePosAndNeg, void * ); diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index 07fdf49a0791..f7e6e5ef127d 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -538,7 +538,7 @@ void ControllerCommandDispatch::updateCommandAvailability() { try { - xProps->getPropertyValue( "DisableDataTableDialog" ) >>= bDisableDataTableDialog; + xProps->getPropertyValue( "EnableDataTableDialog" ) >>= bDisableDataTableDialog; } catch( const uno::Exception& e ) { |