[ooo-build-commit] Branch 'ooo/OOO310' - psprint/source vcl/aqua
Jan Holesovsky
kendy at kemper.freedesktop.org
Wed Jul 8 18:18:30 PDT 2009
psprint/source/fontsubset/sft.c | 2 +-
vcl/aqua/source/gdi/salprn.cxx | 15 +++++++++++----
2 files changed, 12 insertions(+), 5 deletions(-)
New commits:
commit f5ea171e966f817070647b8c519da97ff435cbe3
Author: Oliver Bolte <obo at openoffice.org>
Date: Wed Jul 8 11:31:40 2009 +0000
CWS-TOOLING: integrate CWS ooo311gsl05
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!)
diff --git a/psprint/source/fontsubset/sft.c b/psprint/source/fontsubset/sft.c
index 86c06d5..6a592a6 100644
--- a/psprint/source/fontsubset/sft.c
+++ b/psprint/source/fontsubset/sft.c
@@ -323,7 +323,7 @@ _inline void PutInt16(sal_Int16 val, sal_uInt8 *ptr, size_t offset, int bigendia
}
-#if defined(OSL_BIG_ENDIAN)
+#if defined(OSL_BIGENDIAN)
#define Int16FromMOTA(a) (a)
#define Int32FromMOTA(a) (a)
#else
diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index a810ffb..dd21a2f 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 );
More information about the ooo-build-commit
mailing list