Apache OpenOffice (AOO) Bugzilla – Issue 114817
missing com.sun.star.view.XPrintJobListener JOB_STARTED/JOB_COMPLETED events
Last modified: 2017-05-20 11:29:40 UTC
We noticed in OO 3.2 "PrintableState" events during print were: 0 - JOB_STARTED 1 - JOB_COMPLETED In OO 330m9 there is only a 2 - JOB_SPOOLED so programs waiting for a "JOB_COMPLETED" in OO 3.2 can fail to print in OO 330 ... maybe this is related to issue http://www.openoffice.org/issues/show_bug.cgi?id=113479 (On particular printers only 1 copy printed although No of copies > 1 and not collated) please have a look at the attachment
Created attachment 71885 [details] PrintableState_Demo
@ hi/pl: Please have a look.
actually this was supposed to be a cleanup; OOo has currently no means to know when a job might be completed, it only knows when the job is delivered to the system specific print subsystem (whence "spooled" instead of "completed"). However I don't feel strongly about this and could also send "completed" again. @mba: any opinion on this ?
taking @mba: ping ?
@cd: the instances of PrintableState_JOB_SPOOLED in vcl could be harmlessly replaced by PrintableState_JOB_COMPLETED (if desired) The more problematic thing however is that PrintableState_JOB_STARTED is lost somewhere; this notification should be done in sfx2/source/view/viewprn.cxx:289 (in fxPrinterController::jobStarted) where this is broadcasted. I verified that we go through that code, but what happens then I don't know.
set target to 3.x since not release relevant for 3.4 release.
For the JOB_STARTED part: void IMPL_PrintListener_DataContainer::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/doc/printhelper.cxx?revision=1413471&view=markup#l786 793 if ( pPrintHint->GetWhich() == com::sun::star::view::PrintableState_JOB_STARTED ) 794 { // ... 798 } 799 else if ( pPrintHint->GetWhich() != -2 ) // -2 : CancelPrintJob 800 { // notify listeners 810 } The if ... else ... makes that com::sun::star::view::PrintableState_JOB_STARTED is never notified. About JOB_COMPLETED, see the comment 3 from Philip Lohmann. @brizing: as everything got broken in 3.3, I'm not sure if reverting back to notify JOB_COMPLETED for 4.0, or leaving things as they are (fixing the JOB_STARTED bug). What do you think?
> I'm not sure if reverting back to notify JOB_COMPLETED for 4.0, >or leaving things as they are (fixing the JOB_STARTED bug). What do you think? @ariel: good question ;-) we fixed our custom print dialog in the meantime so it will work with oo 3.2 and oo3.3/3.4.1. but i think it would be helpfull to send a JOB_STARTED and if it make sense ("OOo has currently no means to know when a job might be completed...", a JOB_COMPLETED, too.
"arielch" committed SVN revision 1449532 into trunk: i114817 - Fix missing css::view::PrintableState_JOB_STARTED notification
(In reply to comment #9) > "arielch" committed SVN revision 1449532 into trunk: > i114817 - Fix missing css::view::PrintableState_JOB_STARTED notification This fixes only the PrintableState_JOB_STARTED While fixing bug 121810, revision 1449533 fixes also the bug that the css::view::XPrintJob (the css::lang::EventObject::Source in printJobEvent() ) returned an empty css::beans::PropertyValue sequence in ::getPrintOptions()
Reset assigne to the default "issues@openoffice.apache.org".