Apache OpenOffice (AOO) Bugzilla – Issue 72240
Printing a non-existing page leaves PrintableState at JOB_STARTED
Last modified: 2013-02-24 21:09:05 UTC
Hi together, Please see the code snippet mentioned in the URL (you don't need the printer tray stuff). If you print a non-existing page (e.g. page 1 000 000), the com.sun.star.view.PrintableState will remain at status "JOB_STARTED" forever. Thus my PrintJobListener hangs in a loop. Greetings, Tobias
jsc -> mba: it seems that you was already involved in the discussion. I changed the prio form P1 to P2 related to our issue policies
Even P2 is exaggerated. :-) Anyway, as it is easy to fix I have set the target to the next possible version. The fix will be that also no "StartPrint" event will be fired as this is what happens here: no printing is done at all.
setting target
Fixed in CWS fwk58
Here's a test case for Basic. If a non-existing page is specified, no print event should happen. If the document is printed normally events should be processed: sub main Dim oListener oListener = CreateUnoListener("PrintListener_","com.sun.star.view.XPrintJobListener") ThisComponent.addPrintJobListener( oListener ) end sub Sub PrintListener_disposing( oEvent ) MsgBox "disposing" End Sub Sub PrintListener_printJobEvent( oEvent ) MsgBox oEvent.State End Sub
Please verify. If you print an arbitrary document you should get two notifications with the events JOB_STARTED( 0 ) and JOB_COMPLETED( 1 ). If you print a document and specify a page that doesn't exist you should get no notification at all.
ok on Linux and Windows in fwk58
ok in src680_m211 => zu