salprn.cxx (1df6489c) salprn.cxx (ce29a7ce)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 62 unchanged lines hidden (view full) ---

71 mpPrinter = [NSPrinter printerWithName: pStr];
72 [pStr release];
73
74 NSPrintInfo* pShared = [NSPrintInfo sharedPrintInfo];
75 if( pShared )
76 {
77 mpPrintInfo = [pShared copy];
78 [mpPrintInfo setPrinter: mpPrinter];
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 62 unchanged lines hidden (view full) ---

71 mpPrinter = [NSPrinter printerWithName: pStr];
72 [pStr release];
73
74 NSPrintInfo* pShared = [NSPrintInfo sharedPrintInfo];
75 if( pShared )
76 {
77 mpPrintInfo = [pShared copy];
78 [mpPrintInfo setPrinter: mpPrinter];
79#ifdef __MAC_10_9 // code for SDK 10.9 or newer
79#if 1 // code for SDK 10.9 or newer
80 mePageOrientation = ([mpPrintInfo orientation] == NSPaperOrientationLandscape) ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT;
81 [mpPrintInfo setOrientation: NSPaperOrientationPortrait];
82#else // code for SDK 10.8 or older
83 mePageOrientation = ([mpPrintInfo orientation] == NSLandscapeOrientation) ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT;
84 [mpPrintInfo setOrientation: NSPortraitOrientation];
85#endif
86 }
87

--- 740 unchanged lines hidden ---
80 mePageOrientation = ([mpPrintInfo orientation] == NSPaperOrientationLandscape) ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT;
81 [mpPrintInfo setOrientation: NSPaperOrientationPortrait];
82#else // code for SDK 10.8 or older
83 mePageOrientation = ([mpPrintInfo orientation] == NSLandscapeOrientation) ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT;
84 [mpPrintInfo setOrientation: NSPortraitOrientation];
85#endif
86 }
87

--- 740 unchanged lines hidden ---