summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-02-26 15:20:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-01 12:33:17 +0100
commit11083d1fcfc2dde543c6daddea51b554d032392c (patch)
tree1f6305db0c157f4b5514d012a22ba3e3b16c5f00 /chart2
parent46d3370d6c5a571c3013e3a964e49f0997d4eabf (diff)
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')
-rw-r--r--chart2/source/controller/dialogs/dlg_ObjectProperties.cxx5
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")
{