summaryrefslogtreecommitdiff
path: root/vcl/aqua
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-07-16 09:56:45 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-07-16 09:56:45 +0000
commit84798a0c285ec82bcb530c7e588d55080fe4d9c6 (patch)
tree1c0a4638355bddb042b28fee4ecc9ea1da975bf7 /vcl/aqua
parentf273ae885d22cd9daa22c1f13abd78dafdc161b2 (diff)
CWS-TOOLING: integrate CWS ooo311gsl05_DEV300
2009-06-30 17:18:18 +0200 pl r273524 : add patch flags for CWS ooo311gsl05 2009-06-30 16:22:06 +0200 pl r273519 : #i102485# correct landscape printing 2009-06-30 08:45:25 +0200 hdu r273486 : #i102378# fix PDF-export on PPC (thanks cloph!)
Diffstat (limited to 'vcl/aqua')
-rw-r--r--vcl/aqua/source/gdi/salprn.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index a0062834e269..5db6ad30bb8b 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -127,20 +127,27 @@ void AquaSalInfoPrinter::SetupPrinterGraphics( CGContextRef i_rContext ) const
NSRect aImageRect = [mpPrintInfo imageablePageBounds];
if( mePageOrientation == ORIENTATION_PORTRAIT )
{
+ // move mirrored CTM back into paper
double dX = 0, dY = aPaperSize.height;
+ // move CTM to reflect imageable area
dX += aImageRect.origin.x;
dY -= aPaperSize.height - aImageRect.size.height - aImageRect.origin.y;
CGContextTranslateCTM( i_rContext, dX + mnStartPageOffsetX, dY - mnStartPageOffsetY );
+ // scale to be top/down and reflect our "virtual" DPI
CGContextScaleCTM( i_rContext, 0.1, -0.1 );
}
else
{
+ // move CTM to reflect imageable area
+ double dX = aImageRect.origin.x, dY = aPaperSize.height - aImageRect.size.height - aImageRect.origin.y;
+ CGContextTranslateCTM( i_rContext, -dX, -dY );
+ // turn by 90 degree
CGContextRotateCTM( i_rContext, M_PI/2 );
- double dX = aPaperSize.height, dY = -aPaperSize.width;
- dY += aPaperSize.height - aImageRect.size.height - aImageRect.origin.y;
- dX -= aImageRect.origin.x;
-
+ // move turned CTM back into paper
+ dX = aPaperSize.height;
+ dY = -aPaperSize.width;
CGContextTranslateCTM( i_rContext, dX + mnStartPageOffsetY, dY - mnStartPageOffsetX );
+ // scale to be top/down and reflect our "virtual" DPI
CGContextScaleCTM( i_rContext, -0.1, 0.1 );
}
mpGraphics->SetPrinterGraphics( i_rContext, nDPIX, nDPIY, 1.0 );