Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On 16/11/11 17:30, Michael Stahl wrote:
On 16/11/11 17:15, Ivan Timofeev wrote:
2011/11/16 Michael Stahl <mstahl@redhat.com>:
When canceling in the print dialog, PrinterController::abortJob() is
called, and abortJob calls getPageFile. Your code above returns
*before* the call to printPage and this causes troubles so that the
last page will not be printed.

What is the solution for this?

i have added this because the preceding call to
getPageParametersProtected could have aborted the printing.
but actually i think we should be able to survive a call to render()
even if the document has been closed already (this should throw an
exception and call abortJob again, no problem...).

correction: it will hopefully not call abortJob() but only set the state
to PrintableState_JOB_ABORTED (because i had an infinite recursion
problem there), so there is indeed hope :)

please try it out: remove the 4 lines, then try print and cancel, then
try print and close-the-document (to get a high page count just print
1000 copies), see that we survive that in Calc and Writer.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.