diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-26 15:20:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-01 12:33:17 +0100 |
commit | 11083d1fcfc2dde543c6daddea51b554d032392c (patch) | |
tree | 1f6305db0c157f4b5514d012a22ba3e3b16c5f00 /chart2/source/controller/dialogs/dlg_ObjectProperties.cxx | |
parent | loplugin:redundantstatic (macOS) (diff) | |
download | core-11083d1fcfc2dde543c6daddea51b554d032392c.tar.gz core-11083d1fcfc2dde543c6daddea51b554d032392c.zip |
new loplugin:staticdynamic
look for places we are dynamic_cast'ing after static_cast'ing,
which means the dynamic_cast is a waste of time.
Change-Id: Ife11bb675020738040646230bbd038278d84f7f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111631
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller/dialogs/dlg_ObjectProperties.cxx')
-rw-r--r-- | chart2/source/controller/dialogs/dlg_ObjectProperties.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index a356c1ac4185..b941deab6ab9 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -535,8 +535,9 @@ void SchAttribTabDlg::PageCreated(const OString& rId, SfxTabPage &rPage) else if (rId == "axislabel") { bool bShowStaggeringControls = m_pParameter->CanAxisLabelsBeStaggered(); - static_cast<SchAxisLabelTabPage&>(rPage).ShowStaggeringControls( bShowStaggeringControls ); - dynamic_cast< SchAxisLabelTabPage& >( rPage ).SetComplexCategories( m_pParameter->IsComplexCategoriesAxis() ); + auto & rLabelPage = static_cast<SchAxisLabelTabPage&>(rPage); + rLabelPage.ShowStaggeringControls( bShowStaggeringControls ); + rLabelPage.SetComplexCategories( m_pParameter->IsComplexCategoriesAxis() ); } else if (rId == "axispos") { |