< prev index next >

src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -141,16 +141,16 @@
     //  the -[NSPrintInfo orientation] into account when setting the Paper
     //  rectangle.
 
     NSSize paperSize = [src paperSize];
     switch ([src orientation]) {
-        case NSPortraitOrientation:
+        case NSPaperOrientationPortrait:
             jPaperW = paperSize.width;
             jPaperH = paperSize.height;
             break;
 
-        case NSLandscapeOrientation:
+        case NSPaperOrientationLandscape:
             jPaperW = paperSize.height;
             jPaperH = paperSize.width;
             break;
 
         default:

@@ -215,17 +215,17 @@
     static JNF_MEMBER_CACHE(jm_setOrientation, sjc_PageFormat, "setOrientation", "(I)V");
     static JNF_MEMBER_CACHE(jm_setPaper, sjc_PageFormat, "setPaper", "(Ljava/awt/print/Paper;)V");
     static JNF_CTOR_CACHE(jm_Paper_ctor, sjc_Paper, "()V");
 
     jint jOrientation;
-    NSPrintingOrientation nsOrientation = [src orientation];
+    NSPaperOrientation nsOrientation = [src orientation];
     switch (nsOrientation) {
-        case NSPortraitOrientation:
+        case NSPaperOrientationPortrait:
             jOrientation = java_awt_print_PageFormat_PORTRAIT;
             break;
 
-        case NSLandscapeOrientation:
+        case NSPaperOrientationLandscape:
             jOrientation = java_awt_print_PageFormat_LANDSCAPE; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
             break;
 
 /*
         // AppKit printing doesn't support REVERSE_LANDSCAPE. Radar 2960295.

@@ -271,24 +271,24 @@
     javaPaperToNSPrintInfo(env, paper, dstPrintInfo);
     (*env)->DeleteLocalRef(env, paper);
 
     switch (JNFCallIntMethod(env, srcPageFormat, jm_getOrientation)) { // AWT_THREADING Safe (!appKit)
         case java_awt_print_PageFormat_PORTRAIT:
-            [dstPrintInfo setOrientation:NSPortraitOrientation];
+            [dstPrintInfo setOrientation:NSPaperOrientationPortrait];
             break;
 
         case java_awt_print_PageFormat_LANDSCAPE:
-            [dstPrintInfo setOrientation:NSLandscapeOrientation]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
+            [dstPrintInfo setOrientation:NSPaperOrientationLandscape]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
             break;
 
         // AppKit printing doesn't support REVERSE_LANDSCAPE. Radar 2960295.
         case java_awt_print_PageFormat_REVERSE_LANDSCAPE:
-            [dstPrintInfo setOrientation:NSLandscapeOrientation]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
+            [dstPrintInfo setOrientation:NSPaperOrientationLandscape]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
             break;
 
         default:
-            [dstPrintInfo setOrientation:NSPortraitOrientation];
+            [dstPrintInfo setOrientation:NSPaperOrientationPortrait];
             break;
     }
 
     // <rdar://problem/4022422> NSPrinterInfo is not correctly set to the selected printer
     // from the Java side of CPrinterJob. Has always assumed the default printer was the one we wanted.
< prev index next >