summaryrefslogtreecommitdiff
path: root/sfx2/source/view/prnmon.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-01-23 06:14:41 +0000
committerOliver Bolte <obo@openoffice.org>2007-01-23 06:14:41 +0000
commit1e385c73ba0874d052559ce4871f15361fd36220 (patch)
tree04fc012a46e572e33e28b760a8825e839ab2e7cd /sfx2/source/view/prnmon.cxx
parent4d9243e6248a69e695d1c0fea76683a4bd267357 (diff)
INTEGRATION: CWS fwk58 (1.20.102); FILE MERGED
2007/01/17 15:59:05 mba 1.20.102.2: #i72240#: new StartPrintHandler 2006/12/06 15:16:14 mba 1.20.102.1: #i72240#: don't send JOB_STARTED event before printing acually started
Diffstat (limited to 'sfx2/source/view/prnmon.cxx')
-rw-r--r--sfx2/source/view/prnmon.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/sfx2/source/view/prnmon.cxx b/sfx2/source/view/prnmon.cxx
index 6ad87b99d8..7b61a86932 100644
--- a/sfx2/source/view/prnmon.cxx
+++ b/sfx2/source/view/prnmon.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: prnmon.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: obo $ $Date: 2006-09-17 16:50:24 $
+ * last change: $Author: obo $ $Date: 2007-01-23 07:14:41 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -84,6 +84,7 @@
#include "sfxresid.hxx"
#include "event.hxx"
#include "request.hxx"
+#include "app.hxx"
#include "view.hrc"
@@ -146,7 +147,7 @@ public:
const TypeId& rHintType );
};
-void SfxPrintProgress_Impl::SFX_NOTIFY(
+void SfxPrintProgress_Impl::SFX_NOTIFY(
SfxBroadcaster& /*rBC*/,
const TypeId& rBCType,
const SfxHint& rHint,
@@ -303,6 +304,7 @@ SfxPrintProgress::SfxPrintProgress( SfxViewShell* pViewSh, FASTBOOL bShow )
{
pImp->pPrinter->SetEndPrintHdl( LINK( this, SfxPrintProgress, EndPrintNotify ) );
pImp->pPrinter->SetErrorHdl( LINK( this, SfxPrintProgress, PrintErrorNotify ) );
+ pImp->pPrinter->SetStartPrintHdl( LINK( this, SfxPrintProgress, StartPrintNotify ) );
pImp->bCallbacks = TRUE;
SfxObjectShell* pDoc = pViewSh->GetObjectShell();
@@ -411,6 +413,14 @@ IMPL_LINK_INLINE_END( SfxPrintProgress, PrintErrorNotify, void *, EMPTYARG )
//------------------------------------------------------------------------
+IMPL_LINK( SfxPrintProgress, StartPrintNotify, void *, EMPTYARG )
+{
+ SfxObjectShell *pObjShell = pImp->pViewShell->GetObjectShell();
+ SFX_APP()->NotifyEvent(SfxEventHint(SFX_EVENT_PRINTDOC, pObjShell));
+ pObjShell->Broadcast( SfxPrintingHint( com::sun::star::view::PrintableState_JOB_STARTED, NULL, NULL ) );
+ return 0;
+}
+
IMPL_LINK( SfxPrintProgress, EndPrintNotify, void *, EMPTYARG )
{
if ( pImp->pMonitor )