summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/printhelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/printhelper.cxx')
-rw-r--r--sfx2/source/doc/printhelper.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 8ef4d4eb1e4d..ddb766e72225 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -756,9 +756,13 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
void IMPL_PrintListener_DataContainer::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const SfxPrintingHint* pPrintHint = dynamic_cast<const SfxPrintingHint*>(&rHint);
+ if (rHint.GetId() != SfxHintId::ThisIsAnSfxEventHint)
+ return;
+ const SfxEventHint& rEventHint = static_cast<const SfxEventHint&>(rHint);
+ if (rEventHint.GetEventId() != SfxEventHintId::PrintDoc)
+ return;
+ const SfxPrintingHint* pPrintHint = static_cast<const SfxPrintingHint*>(&rHint);
if ( &rBC != m_pObjectShell.get()
- || !pPrintHint
|| pPrintHint->GetWhich() == SFX_PRINTABLESTATE_CANCELJOB )
return;