changeset 1044:ff2afd0551c9

6750383: 2D_PrintingTiger\PrintDocOrientationTest fails, wrong orientated images are printed Reviewed-by: campbell, prr
author jgodinez
date Tue, 24 Feb 2009 14:32:17 -0800
parents b02162077f24
children 0c856354b669
files src/solaris/classes/sun/print/IPPPrintService.java src/solaris/classes/sun/print/UnixPrintJob.java
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/print/IPPPrintService.java	Fri Feb 06 20:49:53 2009 +0300
+++ b/src/solaris/classes/sun/print/IPPPrintService.java	Tue Feb 24 14:32:17 2009 -0800
@@ -661,6 +661,12 @@
                 }
             }
         } else if (category == OrientationRequested.class) {
+            if (flavor.equals(DocFlavor.INPUT_STREAM.POSTSCRIPT) ||
+                flavor.equals(DocFlavor.URL.POSTSCRIPT) ||
+                flavor.equals(DocFlavor.BYTE_ARRAY.POSTSCRIPT)) {
+                return null;
+            }
+
             boolean revPort = false;
             OrientationRequested[] orientSup = null;
 
--- a/src/solaris/classes/sun/print/UnixPrintJob.java	Fri Feb 06 20:49:53 2009 +0300
+++ b/src/solaris/classes/sun/print/UnixPrintJob.java	Tue Feb 24 14:32:17 2009 -0800
@@ -362,10 +362,10 @@
                  mOptions += " number-up="+nUp.getValue();
              }
 
-             if (orient == OrientationRequested.LANDSCAPE &&
+             if (orient != OrientationRequested.PORTRAIT &&
                  (flavor != null) &&
                  !flavor.equals(DocFlavor.SERVICE_FORMATTED.PAGEABLE)) {
-                 mOptions += " landscape";
+                 mOptions += " orientation-requested="+orient.getValue();
              }
 
              if (sides != null) {