diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-05-06 13:01:57 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-05-06 13:02:41 +0100 |
commit | 7847a338f13071dcd591617f0e8d8fd69b2b0818 (patch) | |
tree | 2c2f1b4f90b88dc6b086e361ec90f70afd81e37f /vcl | |
parent | c47f7dfb3045b7b029859ea1fac80143b996945b (diff) |
cancel doesn't cancel printing
regression from
commit e0ad036eed6b151ea81311fcf9ba46f1726b103c
Author: Luboš Luňák <l.lunak@collabora.com>
Date: Thu Feb 19 16:39:06 2015 +0100
mailmerge doesn't need to use the singlefile technique for printing
Change-Id: Ib1a7ae3033c03d13ba930cb6b94d85bd8041334c
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/print3.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 6b181b6155a9..e55329389d5d 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -297,7 +297,7 @@ void Printer::PrintJob(const std::shared_ptr<PrinterController>& i_xController, } } -void Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController, +bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController, const JobSetup& i_rInitSetup) { // check if there is a default printer; if not, show an error box (if appropriate) @@ -459,7 +459,7 @@ void Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController, nullptr, "ErrorNoContentDialog", "vcl/ui/errornocontentdialog.ui"); aBox->Execute(); - return; + return false; } } @@ -476,7 +476,7 @@ void Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController, if( ! aDlg->Execute() ) { xController->abortJob(); - return; + return false; } if( aDlg->isPrintToFile() ) { @@ -484,7 +484,7 @@ void Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController, if( aFile.isEmpty() ) { xController->abortJob(); - return; + return false; } xController->setValue( OUString( "LocalFileName" ), makeAny( aFile ) ); @@ -501,6 +501,7 @@ void Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController, } xController->pushPropertiesToPrinter(); + return true; } bool Printer::ExecutePrintJob(std::shared_ptr<PrinterController> xController) @@ -522,9 +523,11 @@ void Printer::FinishPrintJob(std::shared_ptr<PrinterController> xController) void Printer::ImplPrintJob(std::shared_ptr<PrinterController> xController, const JobSetup& i_rInitSetup) { - PreparePrintJob( xController, i_rInitSetup ); - ExecutePrintJob( xController ); - FinishPrintJob( xController ); + if (PreparePrintJob(xController, i_rInitSetup)) + { + ExecutePrintJob( xController ); + FinishPrintJob( xController ); + } } bool Printer::StartJob( const OUString& i_rJobName, std::shared_ptr<vcl::PrinterController>& i_xController) |