Kaydet (Commit) 603a37eb authored tarafından Herbert Dürr's avatar Herbert Dürr

#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.
üst 2786d200
......@@ -76,8 +76,13 @@ AquaSalInfoPrinter::AquaSalInfoPrinter( const SalPrinterQueueInfo& i_rQueue ) :
{
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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment