[Libreoffice-commits] core.git: include/vcl vcl/source
Caolán McNamara
caolanm at redhat.com
Wed May 6 05:03:08 PDT 2015
include/vcl/print.hxx | 2 +-
vcl/source/gdi/print3.cxx | 17 ++++++++++-------
2 files changed, 11 insertions(+), 8 deletions(-)
New commits:
commit 7847a338f13071dcd591617f0e8d8fd69b2b0818
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 6 13:01:57 2015 +0100
cancel doesn't cancel printing
regression from
commit e0ad036eed6b151ea81311fcf9ba46f1726b103c
Author: Luboš Luňák <l.lunak at 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
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index e6d3b28..7fe9e79 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -408,7 +408,7 @@ public:
// These 3 together are more modular PrintJob(), allowing printing more documents as one print job
// by repeated calls to ExecutePrintJob(). Used by mailmerge.
- static void PreparePrintJob( std::shared_ptr<vcl::PrinterController> i_pController,
+ static bool PreparePrintJob( std::shared_ptr<vcl::PrinterController> i_pController,
const JobSetup& i_rInitSetup );
static bool ExecutePrintJob( std::shared_ptr<vcl::PrinterController> i_pController );
static void FinishPrintJob( std::shared_ptr<vcl::PrinterController> i_pController );
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 6b181b6..e553293 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)
More information about the Libreoffice-commits
mailing list