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 /sc/source/ui/view/tabvwsh5.cxx | |
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 'sc/source/ui/view/tabvwsh5.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwsh5.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx index 53223c4e5853..e2c77bd65011 100644 --- a/sc/source/ui/view/tabvwsh5.cxx +++ b/sc/source/ui/view/tabvwsh5.cxx @@ -42,7 +42,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { - if (rHint.ISA(SfxSimpleHint)) // ohne Parameter + if (dynamic_cast<const SfxSimpleHint*>(&rHint)) // ohne Parameter { sal_uLong nSlot = ((SfxSimpleHint&)rHint).GetId(); switch ( nSlot ) @@ -131,7 +131,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) break; } } - else if (rHint.ISA(ScPaintHint)) // neu zeichnen + else if (dynamic_cast<const ScPaintHint*>(&rHint)) // neu zeichnen { ScPaintHint* pHint = (ScPaintHint*) &rHint; sal_uInt16 nParts = pHint->GetParts(); @@ -166,7 +166,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) HideNoteMarker(); } } - else if (rHint.ISA(ScEditViewHint)) // Edit-View anlegen + else if (dynamic_cast<const ScEditViewHint*>(&rHint)) // Edit-View anlegen { // ScEditViewHint kommt nur an aktiver View an @@ -197,7 +197,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) } } } - else if (rHint.ISA(ScTablesHint)) // Tabelle eingefuegt / geloescht + else if (dynamic_cast<const ScTablesHint*>(&rHint)) // Tabelle eingefuegt / geloescht { // aktuelle Tabelle zuerst holen (kann bei DeleteTab an ViewData geaendert werden) SCTAB nActiveTab = GetViewData().GetTabNo(); @@ -288,7 +288,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) bool bForce = !bStayOnActiveTab; SetTabNo( nNewTab, bForce, false, bStayOnActiveTab ); } - else if (rHint.ISA(ScIndexHint)) + else if (dynamic_cast<const ScIndexHint*>(&rHint)) { const ScIndexHint& rIndexHint = (const ScIndexHint&)rHint; sal_uInt16 nId = rIndexHint.GetId(); |