summaryrefslogtreecommitdiffstats
path: root/sd/source/ui/tools/PreviewRenderer.cxx
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 /sd/source/ui/tools/PreviewRenderer.cxx
parentMake OOO_EXIT_POST_STARTUP behave more nicely when blank (diff)
downloadcore-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 'sd/source/ui/tools/PreviewRenderer.cxx')
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx21
1 files changed, 8 insertions, 13 deletions
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index 1dda905404ad..ee06476b6ffc 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -490,20 +490,15 @@ Image PreviewRenderer::ScaleBitmap (
void PreviewRenderer::Notify(SfxBroadcaster&, const SfxHint& rHint)
{
- if (rHint.IsA(TYPE(SfxSimpleHint))
- && mpDocShellOfView != NULL)
+ const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
+ if (pSimpleHint && mpDocShellOfView && pSimpleHint->GetId() == SFX_HINT_DYING)
{
- const SfxSimpleHint* pSimpleHint = PTR_CAST(SfxSimpleHint, &rHint);
- if (pSimpleHint != NULL
- && pSimpleHint->GetId() == SFX_HINT_DYING)
- {
- // The doc shell is dying. Our view uses its item pool and
- // has to be destroyed as well. The next call to
- // ProvideView will create a new one (for another
- // doc shell, of course.)
- mpView.reset();
- mpDocShellOfView = NULL;
- }
+ // The doc shell is dying. Our view uses its item pool and
+ // has to be destroyed as well. The next call to
+ // ProvideView will create a new one (for another
+ // doc shell, of course.)
+ mpView.reset();
+ mpDocShellOfView = NULL;
}
}