diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-27 16:57:21 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-09-06 15:47:44 -0500 |
commit | 5bce32904091ffe28884fd5c0f4801ee82bad101 (patch) | |
tree | fc2573078a858de456a0dc7b7810176d433241c7 /svx/source/sdr | |
parent | 10143717834d8401d85fdf9564e782a58b9983ec (diff) |
SfxHint: convert home-grown RTTI to normal C++ RTTI
Also note that I fixed a bug in SvxFontMenuControl::Notify
where the if statement had the check the wrong way around.
Change-Id: I611e8929c65818191e36bd80f2b985820ada4411
Reviewed-on: https://gerrit.libreoffice.org/11147
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'svx/source/sdr')
-rw-r--r-- | svx/source/sdr/properties/attributeproperties.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/properties/customshapeproperties.cxx | 4 | ||||
-rw-r--r-- | svx/source/sdr/properties/textproperties.cxx | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 454d7b974506..5ad4d9e0b956 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -522,7 +522,7 @@ namespace sdr { bool bHintUsed(false); - SfxStyleSheetHint *pStyleHint = PTR_CAST(SfxStyleSheetHint, &rHint); + const SfxStyleSheetHint* pStyleHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint); if(pStyleHint && pStyleHint->GetStyleSheet() == GetStyleSheet()) { diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx index 716dfb50c469..afb4b68f032a 100644 --- a/svx/source/sdr/properties/customshapeproperties.cxx +++ b/svx/source/sdr/properties/customshapeproperties.cxx @@ -212,8 +212,8 @@ namespace sdr TextProperties::Notify( rBC, rHint ); bool bRemoveRenderGeometry = false; - const SfxStyleSheetHint *pStyleHint = PTR_CAST( SfxStyleSheetHint, &rHint ); - const SfxSimpleHint *pSimpleHint = PTR_CAST( SfxSimpleHint, &rHint ); + const SfxStyleSheetHint* pStyleHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint); + const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint); if ( pStyleHint && pStyleHint->GetStyleSheet() == GetStyleSheet() ) { diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index e4a2a5f89744..0196faa3b44d 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -554,7 +554,7 @@ namespace sdr const svx::ITextProvider& rTextProvider(getTextProvider()); if(HAS_BASE(SfxStyleSheet, &rBC)) { - SfxSimpleHint* pSimple = PTR_CAST(SfxSimpleHint, &rHint); + const SfxSimpleHint* pSimple = dynamic_cast<const SfxSimpleHint*>(&rHint); sal_uInt32 nId(pSimple ? pSimple->GetId() : 0L); if(SFX_HINT_DATACHANGED == nId) @@ -595,7 +595,7 @@ namespace sdr } else if(HAS_BASE(SfxStyleSheetBasePool, &rBC)) { - SfxStyleSheetHintExtended* pExtendedHint = PTR_CAST(SfxStyleSheetHintExtended, &rHint); + const SfxStyleSheetHintExtended* pExtendedHint = dynamic_cast<const SfxStyleSheetHintExtended*>(&rHint); if(pExtendedHint && SFX_STYLESHEET_MODIFIED == pExtendedHint->GetHint()) |