summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2012-12-19 13:28:48 +0000
committerNoel Power <noel.power@suse.com>2012-12-20 19:26:56 +0000
commit86a6acaa60b514a07948ecc8063f5e674dda8f34 (patch)
tree893d51a17902d5fea547fc37025986a378e59c98
parent8289c2c9c71fa3e931f4f3ce684064d7d6d38be6 (diff)
post OnPrint event ( application & document ) when printing starts fdo#58269
this event used to get posted, somehow it seems it got dropped somewhere along the line ( looks like the printer and printer monitor code got reworked ) Change-Id: Ib75ee9e7ecd41614275033d2be2a351785326e24
-rw-r--r--sfx2/inc/sfx2/sfx.hrc1
-rw-r--r--sfx2/source/view/viewprn.cxx1
2 files changed, 2 insertions, 0 deletions
diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc
index cd1ecdc05d15..7173366956e8 100644
--- a/sfx2/inc/sfx2/sfx.hrc
+++ b/sfx2/inc/sfx2/sfx.hrc
@@ -50,6 +50,7 @@
#define SFX_EVENT_SAVEASDOC (EVENT_SFX_START + 6)
#define SFX_EVENT_ACTIVATEDOC (EVENT_SFX_START + 7)
#define SFX_EVENT_DEACTIVATEDOC (EVENT_SFX_START + 8)
+#define SFX_EVENT_PRINTDOC (EVENT_SFX_START + 9)
#define SFX_EVENT_LOADFINISHED (EVENT_SFX_START + 11)
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 2139008560f7..e65aefcdbb88 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -320,6 +320,7 @@ void SfxPrinterController::jobStarted()
now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(),
now.GetDay(), now.GetMonth(), now.GetYear() ) );
+ SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_PRINTDOC, GlobalEventConfig::GetEventName( STR_EVENT_PRINTDOC ), mpObjectShell ) );
// FIXME: how to get all print options incl. AdditionalOptions easily?
uno::Sequence < beans::PropertyValue > aOpts;
mpObjectShell->Broadcast( SfxPrintingHint( view::PrintableState_JOB_STARTED, aOpts ) );