Author: hdu
Date: Tue Oct 21 07:43:39 2014
New Revision: 1633297
URL: http://svn.apache.org/r1633297
Log:
#i125776# handle OSX SDK 10.9 changes regarding NSPrintingOrientation ->
NSPaperOrientation
SDK 10.9 changed the NSPrintInfo::orientation method to take a parameter of type
NSPaperOrientation (i.e. enum) instead of NSPrintingOrientation (i.e.
NSUInteger).
The actual values are the same so the binaries work fine on older and newer
platforms,
but the type mismatch on the newer SDK would break the build.
Modified:
openoffice/trunk/main/vcl/aqua/source/gdi/salprn.cxx
Modified: openoffice/trunk/main/vcl/aqua/source/gdi/salprn.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/gdi/salprn.cxx?rev=1633297&r1=1633296&r2=1633297&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/gdi/salprn.cxx (original)
+++ openoffice/trunk/main/vcl/aqua/source/gdi/salprn.cxx Tue Oct 21 07:43:39
2014
@@ -76,8 +76,13 @@ AquaSalInfoPrinter::AquaSalInfoPrinter(
{
mpPrintInfo = [pShared copy];
[mpPrintInfo setPrinter: mpPrinter];
+#ifdef __MAC_10_9 // code for SDK 10.9 or newer
+ mePageOrientation = ([mpPrintInfo orientation] ==
NSPaperOrientationLandscape) ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT;
+ [mpPrintInfo setOrientation: NSPaperOrientationPortrait];
+#else // code for SDK 10.8 or older
mePageOrientation = ([mpPrintInfo orientation] ==
NSLandscapeOrientation) ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT;
[mpPrintInfo setOrientation: NSPortraitOrientation];
+#endif
}
mpGraphics = new AquaSalGraphics();