diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2010-08-12 13:10:39 +0200 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2010-08-12 13:10:39 +0200 |
commit | 95e33c19c083f800dc188ffc63bb5c550950724a (patch) | |
tree | 023f62f991bfa6c6448d0180507d47ff5888981c /vcl | |
parent | 7809a5b0996a2d8da3f182782b5003138b1c0cf8 (diff) | |
parent | 9508308e2a25be243ec8e65147b0b407f3dbe846 (diff) |
merge with ooo33gsl04
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/aqua/source/gdi/salprn.cxx | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | vcl/source/gdi/print3.cxx | 28 |
2 files changed, 25 insertions, 7 deletions
diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx index 1c0401f769b5..ff4edcbf83f9 100644 --- a/vcl/aqua/source/gdi/salprn.cxx +++ b/vcl/aqua/source/gdi/salprn.cxx @@ -445,7 +445,7 @@ ULONG AquaSalInfoPrinter::GetCapabilities( const ImplJobSetup* i_pSetupData, USH case PRINTER_CAPABILITIES_COPIES: return 0xffff; case PRINTER_CAPABILITIES_COLLATECOPIES: - return 0; + return 0xffff; case PRINTER_CAPABILITIES_SETORIENTATION: return 1; case PRINTER_CAPABILITIES_SETDUPLEX: @@ -634,6 +634,8 @@ BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName, } [pPrintDict setObject: [[NSNumber numberWithInt: nCopies] autorelease] forKey: NSPrintCopies]; + if( nCopies > 1 ) + [pPrintDict setObject: [[NSNumber numberWithBool: pPrinter->IsCollateCopy()] autorelease] forKey: NSPrintMustCollate]; [pPrintDict setObject: [[NSNumber numberWithBool: YES] autorelease] forKey: NSPrintDetailedErrorReporting]; [pPrintDict setObject: [[NSNumber numberWithInt: 1] autorelease] forKey: NSPrintFirstPage]; // #i103253# weird: for some reason, autoreleasing the value below like the others above diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 191f8f26dc75..0aeb928856fc 100644..100755 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -594,12 +594,20 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl:: i_pController->jobStarted(); int nJobs = 1; - int nRepeatCount = bUserCopy ? mnCopyCount : 1; + int nOuterRepeatCount = 1; + int nInnerRepeatCount = 1; + if( bUserCopy ) + { + if( mbCollateCopy ) + nOuterRepeatCount = mnCopyCount; + else + nInnerRepeatCount = mnCopyCount; + } if( bSinglePrintJobs ) { nJobs = mnCopyCount; nCopies = 1; - nRepeatCount = 1; + nOuterRepeatCount = nInnerRepeatCount = 1; } for( int nJobIteration = 0; nJobIteration < nJobs; nJobIteration++ ) @@ -616,13 +624,21 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl:: mbJobActive = TRUE; i_pController->createProgressDialog(); int nPages = i_pController->getFilteredPageCount(); - for( int nIteration = 0; nIteration < nRepeatCount; nIteration++ ) + for( int nOuterIteration = 0; nOuterIteration < nOuterRepeatCount; nOuterIteration++ ) { for( int nPage = 0; nPage < nPages; nPage++ ) { - if( nPage == nPages-1 && nIteration == nRepeatCount-1 && nJobIteration == nJobs-1 ) - i_pController->setLastPage( sal_True ); - i_pController->printFilteredPage( nPage ); + for( int nInnerIteration = 0; nInnerIteration < nInnerRepeatCount; nInnerIteration++ ) + { + if( nPage == nPages-1 && + nOuterIteration == nOuterRepeatCount-1 && + nInnerIteration == nInnerRepeatCount-1 && + nJobIteration == nJobs-1 ) + { + i_pController->setLastPage( sal_True ); + } + i_pController->printFilteredPage( nPage ); + } } // FIXME: duplex ? } |