summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorOliver-Rainer Wittmann <orw@apache.org>2013-04-19 10:41:08 +0000
committerOliver-Rainer Wittmann <orw@apache.org>2013-04-19 10:41:08 +0000
commitaad8d0b80c56b956ce674e713d4d09a077e20f68 (patch)
treefb3d43e3d261a1f35106d20da9c5999f4b3663e9 /vcl
parent1a169fa0ca55cd10b76205d09ecebc5717afdc77 (diff)
120529: abort print controller job, if no pages will be printed
Notes
Notes: merged as: 3bcbc800a5598854be473a7397eac384e0d8a07e
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/print3.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 0963fd878dbc..a1296b7ea065 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -656,7 +656,13 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
{
mbJobActive = sal_True;
i_pController->createProgressDialog();
- int nPages = i_pController->getFilteredPageCount();
+ const int nPages = i_pController->getFilteredPageCount();
+ // abort job, if no pages will be printed.
+ if ( nPages == 0 )
+ {
+ i_pController->abortJob();
+ bAborted = true;
+ }
for( int nOuterIteration = 0; nOuterIteration < nOuterRepeatCount && ! bAborted; nOuterIteration++ )
{
for( int nPage = 0; nPage < nPages && ! bAborted; nPage++ )