Issue 72240 - Printing a non-existing page leaves PrintableState at JOB_STARTED
Summary: Printing a non-existing page leaves PrintableState at JOB_STARTED
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: chne
QA Contact: issues@api
URL: http://codesnippets.services.openoffi...
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-04 09:28 UTC by tobiaskrais
Modified: 2013-02-24 21:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description tobiaskrais 2006-12-04 09:28:27 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
Comment 1 jsc 2006-12-04 10:01:17 UTC
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
Comment 2 Mathias_Bauer 2006-12-04 14:16:02 UTC
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.
Comment 3 Mathias_Bauer 2006-12-04 14:32:59 UTC
setting target
Comment 4 Mathias_Bauer 2006-12-05 17:47:43 UTC
Fixed in CWS fwk58
Comment 5 Mathias_Bauer 2007-01-17 15:27:05 UTC
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 
Comment 6 Mathias_Bauer 2007-01-17 16:20:28 UTC
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.
Comment 7 chne 2007-01-19 12:05:14 UTC
ok on Linux and Windows in fwk58
Comment 8 chne 2007-05-13 20:33:56 UTC
ok in src680_m211 => zu