summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/sfxbasemodel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/sfxbasemodel.cxx')
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index a217dc252a85..2db0f2b857a3 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2983,8 +2983,8 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
}
Any aSupplement;
- if (const SfxPrintingHint* pPrintingHint = dynamic_cast<const SfxPrintingHint*>(&rHint))
- aSupplement <<= pPrintingHint->GetWhich();
+ if (rNamedHint.GetEventId() == SfxEventHintId::PrintDoc)
+ aSupplement <<= static_cast<const SfxPrintingHint*>(&rHint)->GetWhich();
const SfxViewEventHint* pViewHint = dynamic_cast<const SfxViewEventHint*>(&rHint);
postEvent_Impl( rNamedHint.GetEventName(), pViewHint ? pViewHint->GetController() : Reference< frame::XController2 >(), aSupplement );
}