< prev index next >

src/java.desktop/unix/classes/sun/print/UnixPrintService.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2000, 2018, 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 --- 1,7 ---- /* ! * Copyright (c) 2000, 2019, 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
*** 287,297 **** for(int i = 0; i < posPrinters.length; i++) { // Remove the header lines if (posPrinters[i].startsWith("---") || posPrinters[i].startsWith("Queue") || ! posPrinters[i].equals("")) continue; // Check if there is a ":" in the end of the first colomn. // This means that it is not a valid printer definition. splitPart = posPrinters[i].split(" "); if(splitPart.length >= 1 && !splitPart[0].trim().endsWith(":")) { --- 287,297 ---- for(int i = 0; i < posPrinters.length; i++) { // Remove the header lines if (posPrinters[i].startsWith("---") || posPrinters[i].startsWith("Queue") || ! posPrinters[i].isEmpty()) continue; // Check if there is a ":" in the end of the first colomn. // This means that it is not a valid printer definition. splitPart = posPrinters[i].split(" "); if(splitPart.length >= 1 && !splitPart[0].trim().endsWith(":")) {
*** 692,713 **** } else if (category == JobSheets.class) { return JobSheets.STANDARD; } else if (category == Media.class) { String defaultCountry = Locale.getDefault().getCountry(); if (defaultCountry != null && ! (defaultCountry.equals("") || defaultCountry.equals(Locale.US.getCountry()) || defaultCountry.equals(Locale.CANADA.getCountry()))) { return MediaSizeName.NA_LETTER; } else { return MediaSizeName.ISO_A4; } } else if (category == MediaPrintableArea.class) { String defaultCountry = Locale.getDefault().getCountry(); float iw, ih; if (defaultCountry != null && ! (defaultCountry.equals("") || defaultCountry.equals(Locale.US.getCountry()) || defaultCountry.equals(Locale.CANADA.getCountry()))) { iw = MediaSize.NA.LETTER.getX(Size2DSyntax.INCH) - 0.5f; ih = MediaSize.NA.LETTER.getY(Size2DSyntax.INCH) - 0.5f; } else { --- 692,713 ---- } else if (category == JobSheets.class) { return JobSheets.STANDARD; } else if (category == Media.class) { String defaultCountry = Locale.getDefault().getCountry(); if (defaultCountry != null && ! (defaultCountry.isEmpty() || defaultCountry.equals(Locale.US.getCountry()) || defaultCountry.equals(Locale.CANADA.getCountry()))) { return MediaSizeName.NA_LETTER; } else { return MediaSizeName.ISO_A4; } } else if (category == MediaPrintableArea.class) { String defaultCountry = Locale.getDefault().getCountry(); float iw, ih; if (defaultCountry != null && ! (defaultCountry.isEmpty() || defaultCountry.equals(Locale.US.getCountry()) || defaultCountry.equals(Locale.CANADA.getCountry()))) { iw = MediaSize.NA.LETTER.getX(Size2DSyntax.INCH) - 0.5f; ih = MediaSize.NA.LETTER.getY(Size2DSyntax.INCH) - 0.5f; } else {
*** 995,1005 **** flavor.equals(DocFlavor.BYTE_ARRAY.POSTSCRIPT))) && isSupportedCopies((Copies)attr); } else if (attr.getCategory() == Destination.class) { URI uri = ((Destination)attr).getURI(); if ("file".equals(uri.getScheme()) && ! !(uri.getSchemeSpecificPart().equals(""))) { return true; } else { return false; } } else if (attr.getCategory() == Media.class) { --- 995,1005 ---- flavor.equals(DocFlavor.BYTE_ARRAY.POSTSCRIPT))) && isSupportedCopies((Copies)attr); } else if (attr.getCategory() == Destination.class) { URI uri = ((Destination)attr).getURI(); if ("file".equals(uri.getScheme()) && ! !uri.getSchemeSpecificPart().isEmpty()) { return true; } else { return false; } } else if (attr.getCategory() == Media.class) {
< prev index next >