diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-12-08 00:00:49 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-12-08 00:13:04 -0500 |
commit | 495be57b8238361297f1834c2afbf808f1e55a3d (patch) | |
tree | 55947ca80ea46bbeb5749de80c527c421e4a9afa /chart2 | |
parent | bnc#791952: Use "center" label placement for "Best fit" in pie charts. (diff) | |
download | core-495be57b8238361297f1834c2afbf808f1e55a3d.tar.gz core-495be57b8238361297f1834c2afbf808f1e55a3d.zip |
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
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/dialogs/res_DataLabel.cxx | 9 | ||||
-rw-r--r-- | chart2/source/controller/main/ChartController_Properties.cxx | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index 1690ecde316e..c50d2b4125f7 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -291,14 +291,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 19f146a6186e..005c076acf2d 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -242,7 +242,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH xObjectProperties, xSeries, rDrawModel.GetItemPool(), rDrawModel, pNumberFormatterWrapper, uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ), - eMapTo, pRefSize, bDataSeries, bUseSpecialFillColor, nSpecialFillColor, false, + eMapTo, pRefSize, bDataSeries, bUseSpecialFillColor, nSpecialFillColor, true, nNumberFormat, nPercentNumberFormat ); break; } |