diff options
Diffstat (limited to 'vcl/aqua/source/gdi/aquaprintview.mm')
-rwxr-xr-x | vcl/aqua/source/gdi/aquaprintview.mm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vcl/aqua/source/gdi/aquaprintview.mm b/vcl/aqua/source/gdi/aquaprintview.mm index ba139da5f5a4..870b7cbab6f0 100755 --- a/vcl/aqua/source/gdi/aquaprintview.mm +++ b/vcl/aqua/source/gdi/aquaprintview.mm @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: aquaprintview.mm,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.56.1 $ * * This file is part of OpenOffice.org. * @@ -33,15 +33,15 @@ #include "aquaprintview.h" #include "salprn.h" -#include "vcl/impprn.hxx" +#include "vcl/print.hxx" @implementation AquaPrintView --(id)initWithQPrinter: (ImplQPrinter*)pPrinter withInfoPrinter: (AquaSalInfoPrinter*)pInfoPrinter +-(id)initWithController: (vcl::PrinterController*)pController withInfoPrinter: (AquaSalInfoPrinter*)pInfoPrinter { NSRect aRect = { { 0, 0 }, [pInfoPrinter->getPrintInfo() paperSize] }; if( (self = [super initWithFrame: aRect]) != nil ) { - mpQPrinter = pPrinter; + mpController = pController; mpInfoPrinter = pInfoPrinter; } return self; @@ -79,6 +79,7 @@ int nPage = (int)(aPaperSize.width * rect.origin.y + rect.origin.x); // page count is 1 based - mpQPrinter->PrintPage( nPage-1 + mpInfoPrinter->getCurPageRangeStart() ); + if( nPage - 1 < (mpInfoPrinter->getCurPageRangeStart() + mpInfoPrinter->getCurPageRangeCount() ) ) + mpController->printFilteredPage( nPage-1 ); } @end |