summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-12-08 00:00:49 -0500
committerAndras Timar <atimar@suse.com>2013-01-13 21:59:24 +0100
commit8180265067a9596dfd1946eb94b724525b384732 (patch)
treeac9fba0e0ff88bbc8035e58e5dffa50209ba7659
parent7e136d117b1e856350f44f6622223ff6d2aecb39 (diff)
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
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.cxx9
-rw-r--r--chart2/source/controller/main/ChartController_Properties.cxx2
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;
}