summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-27 16:57:21 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-09-06 15:47:44 -0500
commit5bce32904091ffe28884fd5c0f4801ee82bad101 (patch)
treefc2573078a858de456a0dc7b7810176d433241c7 /editeng
parent10143717834d8401d85fdf9564e782a58b9983ec (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 'editeng')
-rw-r--r--editeng/source/editeng/impedit5.cxx14
-rw-r--r--editeng/source/uno/unoedhlp.cxx5
2 files changed, 7 insertions, 12 deletions
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx
index a884eb2fbd39..3e1a59909d95 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -146,17 +146,17 @@ void ImpEditEngine::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SfxStyleSheet* pStyle = NULL;
sal_uLong nId = 0;
- if ( rHint.ISA( SfxStyleSheetHint ) )
+ const SfxStyleSheetHint* pStyleSheetHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint);
+ if ( pStyleSheetHint )
{
- const SfxStyleSheetHint& rH = (const SfxStyleSheetHint&) rHint;
- DBG_ASSERT( rH.GetStyleSheet()->ISA( SfxStyleSheet ), "No SfxStyleSheet!" );
- pStyle = (SfxStyleSheet*) rH.GetStyleSheet();
- nId = rH.GetHint();
+ DBG_ASSERT( pStyleSheetHint->GetStyleSheet()->ISA( SfxStyleSheet ), "No SfxStyleSheet!" );
+ pStyle = (SfxStyleSheet*) pStyleSheetHint->GetStyleSheet();
+ nId = pStyleSheetHint->GetHint();
}
- else if ( ( rHint.Type() == TYPE(SfxSimpleHint ) ) && ( rBC.ISA( SfxStyleSheet ) ) )
+ else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) && rBC.ISA( SfxStyleSheet ) )
{
pStyle = (SfxStyleSheet*)&rBC;
- nId = ((SfxSimpleHint&)rHint).GetId();
+ nId = dynamic_cast<const SfxSimpleHint*>(&rHint)->GetId();
}
if ( pStyle )
diff --git a/editeng/source/uno/unoedhlp.cxx b/editeng/source/uno/unoedhlp.cxx
index eb42e67b546f..83a6fd3bdb4d 100644
--- a/editeng/source/uno/unoedhlp.cxx
+++ b/editeng/source/uno/unoedhlp.cxx
@@ -24,8 +24,6 @@
-TYPEINIT1( SvxEditSourceHint, TextHint );
-
SvxEditSourceHint::SvxEditSourceHint( sal_uLong _nId ) :
TextHint( _nId ),
mnStart( 0 ),
@@ -46,9 +44,6 @@ sal_uLong SvxEditSourceHint::GetValue() const
}
-TYPEINIT1( SvxEditSourceHintEndPara , SvxEditSourceHint );
-
-
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SfxHint> SvxEditSourceHelper::EENotification2Hint( EENotify* aNotify )
{