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/mnuctrls | |
parent | Make OOO_EXIT_POST_STARTUP behave more nicely when blank (diff) | |
download | core-5bce32904091ffe28884fd5c0f4801ee82bad101.tar.gz core-5bce32904091ffe28884fd5c0f4801ee82bad101.zip |
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/mnuctrls')
-rw-r--r-- | svx/source/mnuctrls/fntctl.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/svx/source/mnuctrls/fntctl.cxx b/svx/source/mnuctrls/fntctl.cxx index 65ca2d5073d9..5f4e7966d570 100644 --- a/svx/source/mnuctrls/fntctl.cxx +++ b/svx/source/mnuctrls/fntctl.cxx @@ -119,8 +119,9 @@ void SvxFontMenuControl::StateChanged( void SvxFontMenuControl::Notify( SfxBroadcaster&, const SfxHint& rHint ) { - if ( rHint.Type() != TYPE(SfxSimpleHint) && - ( (SfxSimpleHint&)rHint ).GetId() == SFX_HINT_DOCCHANGED ) + const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>( &rHint ); + if ( pSimpleHint && + pSimpleHint->GetId() == SFX_HINT_DOCCHANGED ) FillMenu(); } |