diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-02 09:41:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-02 12:24:00 +0100 |
commit | 068d4108e5ae41ca5bc2bcf22277e6235c6bdd0b (patch) | |
tree | 4139d3418c7c72d5126f64e59e192cac3e74c7ee /svx/source/sdr/properties | |
parent | e763e13873adfe3c6abfa4c2dfd3ac3847e2d494 (diff) |
loplugin:redundantcast catch more dynamic_cast
Change-Id: Ia28e58217cefa306567b53688d851fa210b7821c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110287
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/sdr/properties')
-rw-r--r-- | svx/source/sdr/properties/attributeproperties.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 55dbf646210e..5ed41b9c4c99 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -99,7 +99,7 @@ namespace sdr::properties void AttributeProperties::ImpRemoveStyleSheet() { // Check type since it is destroyed when the type is deleted - if(GetStyleSheet() && dynamic_cast<const SfxStyleSheet *>(mpStyleSheet) != nullptr) + if(GetStyleSheet() && mpStyleSheet) { EndListening(*mpStyleSheet); if (auto const pool = mpStyleSheet->GetPool()) { // TTTT @@ -378,7 +378,7 @@ namespace sdr::properties void AttributeProperties::ForceStyleToHardAttributes() { - if(!GetStyleSheet() || dynamic_cast<const SfxStyleSheet *>(mpStyleSheet) == nullptr) + if(!GetStyleSheet() || mpStyleSheet == nullptr) return; // guarantee SfxItemSet existence @@ -457,10 +457,10 @@ namespace sdr::properties // to register as listener to that new StyleSheet. if(!rObj.IsInDestruction()) { - if(dynamic_cast<const SfxStyleSheet *>(GetStyleSheet()) != nullptr) + if(SfxStyleSheet* pStyleSheet = GetStyleSheet()) { pNewStSh = static_cast<SfxStyleSheet*>(rModel.GetStyleSheetPool()->Find( - GetStyleSheet()->GetParent(), GetStyleSheet()->GetFamily())); + pStyleSheet->GetParent(), pStyleSheet->GetFamily())); } if(!pNewStSh) |