summaryrefslogtreecommitdiffstats
path: root/chart2/source/controller/dialogs/res_DataLabel.cxx
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2020-09-08 10:21:33 +0200
committerLászló Németh <nemeth@numbertext.org>2020-09-15 09:57:54 +0200
commit28b53da4c49b2dc8550f28b07183fb7c60e1c298 (patch)
tree657e60ce2c1ad6f5efaff61ba43e6d71e20661c2 /chart2/source/controller/dialogs/res_DataLabel.cxx
parentScRefUpdate::DoTranspose always dereferences its ScDocument* argument (diff)
downloadcore-28b53da4c49b2dc8550f28b07183fb7c60e1c298.tar.gz
core-28b53da4c49b2dc8550f28b07183fb7c60e1c298.zip
tdf#133227 chart UI: option to hide leader lines
between data points and displaced data labels of a data series. Follow-up of the following commits related to the new UNO property ShowCustomLeaderLines for data labels: commit e2f4e65a7b8024c00b049eebf0d87637efda7f24 (tdf#134571 chart2, xmloff: add loext:custom-leader-lines) commit 5d67d70b26706ce8a08612c12a68821f984210a2 (tdf#134563 Add UNO API for custom leader lines) Change-Id: Id8a953b16ff737ca924c0c2c3241fba4e3ac904b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102221 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2/source/controller/dialogs/res_DataLabel.cxx')
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index 35f96f775e01..62568fc71296 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -111,6 +111,7 @@ DataLabelResources::DataLabelResources(weld::Builder* pBuilder, weld::Window* pP
, m_xLB_TextDirection(new TextDirectionListBox(pBuilder->weld_combo_box("LB_LABEL_TEXTDIR")))
, m_xDC_Dial(new svx::DialControl)
, m_xDC_DialWin(new weld::CustomWeld(*pBuilder, "CT_DIAL", *m_xDC_Dial))
+ , m_xCBCustomLeaderLines(pBuilder->weld_check_button("CB_CUSTOM_LEADER_LINES"))
{
m_xDC_Dial->SetText(m_xFT_Dial->get_label());
@@ -143,6 +144,7 @@ DataLabelResources::DataLabelResources(weld::Builder* pBuilder, weld::Window* pP
m_xCBCategory->connect_toggled( LINK( this, DataLabelResources, CheckHdl ));
m_xCBSymbol->connect_toggled( LINK( this, DataLabelResources, CheckHdl ));
m_xCBWrapText->connect_toggled( LINK( this, DataLabelResources, CheckHdl ));
+ m_xCBCustomLeaderLines->connect_toggled( LINK( this, DataLabelResources, CheckHdl ));
m_bNumberFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_SOURCE, m_nNumberFormatForValue, m_bSourceFormatForValue, m_bSourceFormatMixedState );
m_bPercentFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SCHATTR_PERCENT_NUMBERFORMAT_VALUE, SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, m_nNumberFormatForPercent, m_bSourceFormatForPercent , m_bPercentSourceMixedState);
@@ -280,6 +282,8 @@ void DataLabelResources::FillItemSet( SfxItemSet* rOutAttrs ) const
rOutAttrs->Put( SfxBoolItem( SCHATTR_DATADESCR_SHOW_SYMBOL, m_xCBSymbol->get_active()) );
if( m_xCBWrapText->get_state()!= TRISTATE_INDET )
rOutAttrs->Put( SfxBoolItem( SCHATTR_DATADESCR_WRAP_TEXT, m_xCBWrapText->get_active()) );
+ if( m_xCBCustomLeaderLines->get_state() != TRISTATE_INDET )
+ rOutAttrs->Put(SfxBoolItem( SCHATTR_DATADESCR_CUSTOM_LEADER_LINES, m_xCBCustomLeaderLines->get_active()) );
auto const aSep = our_aLBEntryMap[m_xLB_Separator->get_active()];
rOutAttrs->Put( SfxStringItem( SCHATTR_DATADESCR_SEPARATOR, aSep) );
@@ -311,6 +315,7 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs)
lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_CATEGORY, *m_xCBCategory );
lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_SYMBOL, *m_xCBSymbol );
lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_WRAP_TEXT, *m_xCBWrapText );
+ lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_CUSTOM_LEADER_LINES, *m_xCBCustomLeaderLines );
m_bNumberFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_SOURCE, m_nNumberFormatForValue, m_bSourceFormatForValue, m_bSourceFormatMixedState );
m_bPercentFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SCHATTR_PERCENT_NUMBERFORMAT_VALUE, SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, m_nNumberFormatForPercent, m_bSourceFormatForPercent , m_bPercentSourceMixedState);