To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=89072
User mba changed the following:
What |Old value |New value
================================================================================
Status|NEW |STARTED
--------------------------------------------------------------------------------
------- Additional comments from [email protected] Mon May 11 10:09:36 +0000
2009 -------
The right approach seems to be:
return Error in virtual method SfxViewShell::SetPrinter(), as this is the
"offending" code part. Not only a second print job, but every attempt to set a
new printer while the old one is printing, will leads to a crash.
In case of printing the error will be handled in SfxViewShell::DoPrint.
Interesting observation: via API this crash can't happen as setPrinter() waits
until printing on the current printer has finished. I prefer to let the call
fail.
@akre: a "Wait" property exists already, so your suggested workaround can be
used. Unfortunately (and for historical reasons - as always ;-)) the parameters
differ for the dispatching and the "real" API:
Dispatching:
dim args1(1) as new com.sun.star.beans.PropertyValue
args1(0).Name = "PrinterName"
args1(0).Value = printer
args1(1).Name = "Asynchron"
args1(1).Value = false
dispatcher.executeDispatch(document, ".uno:Print", "", 0, args1())
Using XPrintable at the document:
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Name"
args1(0).Value = printer
doc.setPrinter( args1() )
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "Wait"
args2(0).Value = true
doc.print( args2() )
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]