X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=core%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Foned%2FMultiFormatUPCEANReader.java;h=502b086f14ae9ccb91561c8667b68b22bb33fedb;hb=7ca7b8f6a94aae2c7e65d7179c2576c35d153bc2;hp=eb03890f3dd616b105b91bb47b0b705815943094;hpb=57383809de2081afa51b04a395f0168a7a6244e0;p=zxing.git diff --git a/core/src/com/google/zxing/oned/MultiFormatUPCEANReader.java b/core/src/com/google/zxing/oned/MultiFormatUPCEANReader.java index eb03890f..502b086f 100644 --- a/core/src/com/google/zxing/oned/MultiFormatUPCEANReader.java +++ b/core/src/com/google/zxing/oned/MultiFormatUPCEANReader.java @@ -37,7 +37,8 @@ public final class MultiFormatUPCEANReader extends AbstractOneDReader { private final Vector readers; public MultiFormatUPCEANReader(Hashtable hints) { - Vector possibleFormats = hints == null ? null : (Vector) hints.get(DecodeHintType.POSSIBLE_FORMATS); + Vector possibleFormats = hints == null ? null : + (Vector) hints.get(DecodeHintType.POSSIBLE_FORMATS); readers = new Vector(); if (possibleFormats != null) { if (possibleFormats.contains(BarcodeFormat.EAN_13)) { @@ -68,7 +69,7 @@ public final class MultiFormatUPCEANReader extends AbstractOneDReader { UPCEANReader reader = (UPCEANReader) readers.elementAt(i); Result result; try { - result = reader.decodeRow(rowNumber, row, startGuardPattern); + result = reader.decodeRow(rowNumber, row, startGuardPattern, hints); } catch (ReaderException re) { continue; } @@ -82,8 +83,10 @@ public final class MultiFormatUPCEANReader extends AbstractOneDReader { // a UPC-A code. But for efficiency we only run the EAN-13 decoder to also read // UPC-A. So we special case it here, and convert an EAN-13 result to a UPC-A // result if appropriate. - if (result.getBarcodeFormat().equals(BarcodeFormat.EAN_13) && result.getText().charAt(0) == '0') { - return new Result(result.getText().substring(1), null, result.getResultPoints(), BarcodeFormat.UPC_A); + if (result.getBarcodeFormat().equals(BarcodeFormat.EAN_13) && + result.getText().charAt(0) == '0') { + return new Result(result.getText().substring(1), null, result.getResultPoints(), + BarcodeFormat.UPC_A); } return result; }