diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-18 14:08:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-19 11:01:18 +0200 |
commit | 9df2821e61979dab32390d5c64dd49bee868adbb (patch) | |
tree | 5b827e29e73ac2300c164b0a389a784a358956e6 /chart2/source/controller/dialogs/res_DataLabel.cxx | |
parent | loplugin:flatten in basic (diff) | |
download | core-9df2821e61979dab32390d5c64dd49bee868adbb.tar.gz core-9df2821e61979dab32390d5c64dd49bee868adbb.zip |
loplugin:flatten in chart2
Change-Id: Iadc4da6515a7d82e7a92b33d74d589b61fa2c64f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92480
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller/dialogs/res_DataLabel.cxx')
-rw-r--r-- | chart2/source/controller/dialogs/res_DataLabel.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index 741325178b89..ca1918c170ee 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -196,21 +196,21 @@ IMPL_LINK(DataLabelResources, NumberFormatDialogHdl, weld::Button&, rButton, voi NumberFormatDialog aDlg(m_pWindow, aNumberSet); if( bPercent ) aDlg.set_title(m_xFT_NumberFormatForPercent->get_label()); - if (aDlg.run() == RET_OK) + if (aDlg.run() != RET_OK) + return; + + const SfxItemSet* pResult = aDlg.GetOutputItemSet(); + if( pResult ) { - const SfxItemSet* pResult = aDlg.GetOutputItemSet(); - if( pResult ) - { - bool bOldSource = rUseSourceFormat; - sal_uLong nOldFormat = rnFormatKey; - bool bOldMixedState = rbMixedState || rbSourceMixedState; + bool bOldSource = rUseSourceFormat; + sal_uLong nOldFormat = rnFormatKey; + bool bOldMixedState = rbMixedState || rbSourceMixedState; - rbMixedState = !lcl_ReadNumberFormatFromItemSet( *pResult, SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_SOURCE, rnFormatKey, rUseSourceFormat, rbSourceMixedState ); + rbMixedState = !lcl_ReadNumberFormatFromItemSet( *pResult, SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_SOURCE, rnFormatKey, rUseSourceFormat, rbSourceMixedState ); - //todo this maybe can be removed when the numberformatter dialog does handle mixed state for source format correctly - if( bOldMixedState && bOldSource == rUseSourceFormat && nOldFormat == rnFormatKey ) - rbMixedState = rbSourceMixedState = true; - } + //todo this maybe can be removed when the numberformatter dialog does handle mixed state for source format correctly + if( bOldMixedState && bOldSource == rUseSourceFormat && nOldFormat == rnFormatKey ) + rbMixedState = rbSourceMixedState = true; } } |