From 6858182d246f21c5b06af09d8ff0e6fd04ef26c3 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Sat, 8 Dec 2012 00:00:49 -0500 Subject: bnc#791952: Setting properties for all data labels. You can set different properties to individual data labels. But setting new properties to all data labels should overwrite the individual settings. Change-Id: I934bad89326115aa83feb86275cf380d701a5686 --- chart2/source/controller/dialogs/res_DataLabel.cxx | 9 +++++---- chart2/source/controller/main/ChartController_Properties.cxx | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'chart2') diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index 9113d90250f1..a651eb8abeab 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -282,14 +282,15 @@ void DataLabelResources::EnableControls() { m_aCBSymbol.Enable( m_aCBNumber.IsChecked() || (m_aCBPercent.IsChecked() && m_aCBPercent.IsEnabled()) || m_aCBCategory.IsChecked() ); - //enable separator + // Enable or disable separator, placement and direction based on the check + // box states. Note that the check boxes are tri-state. { long nNumberOfCheckedLabelParts = 0; - if( m_aCBNumber.IsChecked() ) + if (m_aCBNumber.GetState() != STATE_NOCHECK) ++nNumberOfCheckedLabelParts; - if( m_aCBPercent.IsChecked() && m_aCBPercent.IsEnabled() ) + if (m_aCBPercent.GetState() != STATE_NOCHECK && m_aCBPercent.IsEnabled()) ++nNumberOfCheckedLabelParts; - if( m_aCBCategory.IsChecked() ) + if (m_aCBCategory.GetState() != STATE_NOCHECK) ++nNumberOfCheckedLabelParts; m_aSeparatorResources.Enable( nNumberOfCheckedLabelParts > 1 ); bool bEnableTextDir = nNumberOfCheckedLabelParts > 0; diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index e0bf6cebaed3..0f3172027cd4 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -231,7 +231,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH pItemConverter = new wrapper::DataPointItemConverter( xChartModel, xContext, xObjectProperties, xSeries, rDrawModel.GetItemPool(), rDrawModel, uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ), - eMapTo, pRefSize, bDataSeries, bUseSpecialFillColor, nSpecialFillColor, false, + eMapTo, pRefSize, bDataSeries, bUseSpecialFillColor, nSpecialFillColor, true, nNumberFormat, nPercentNumberFormat ); break; } -- cgit