summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-12-08 00:00:49 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-12-08 00:07:35 -0500
commit7061f72159e38e76134bc7fefc8a75cd233889cf (patch)
treeac3f31e9f60cc2a8abf4f83571926b424add6d52 /chart2
parentfc04a3a9702580902312f5e8d6f3abd52f108663 (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
Diffstat (limited to 'chart2')
-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 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;
}