OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 // Original code is licensed as follows: | 6 // Original code is licensed as follows: |
7 /* | 7 /* |
8 * Copyright 2013 ZXing authors | 8 * Copyright 2013 ZXing authors |
9 * | 9 * |
10 * Licensed under the Apache License, Version 2.0 (the "License"); | 10 * Licensed under the Apache License, Version 2.0 (the "License"); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 barcodeRowCountUpperPart.getValue()->GetAt(0) + | 203 barcodeRowCountUpperPart.getValue()->GetAt(0) + |
204 barcodeRowCountLowerPart.getValue()->GetAt(0) < | 204 barcodeRowCountLowerPart.getValue()->GetAt(0) < |
205 CBC_PDF417Common::MIN_ROWS_IN_BARCODE || | 205 CBC_PDF417Common::MIN_ROWS_IN_BARCODE || |
206 barcodeRowCountUpperPart.getValue()->GetAt(0) + | 206 barcodeRowCountUpperPart.getValue()->GetAt(0) + |
207 barcodeRowCountLowerPart.getValue()->GetAt(0) > | 207 barcodeRowCountLowerPart.getValue()->GetAt(0) > |
208 CBC_PDF417Common::MAX_ROWS_IN_BARCODE) { | 208 CBC_PDF417Common::MAX_ROWS_IN_BARCODE) { |
209 return NULL; | 209 return NULL; |
210 } | 210 } |
211 CBC_BarcodeMetadata* barcodeMetadata = | 211 CBC_BarcodeMetadata* barcodeMetadata = |
212 new CBC_BarcodeMetadata(barcodeColumnCount.getValue()->GetAt(0), | 212 new CBC_BarcodeMetadata(barcodeColumnCount.getValue()->GetAt(0), |
213 barcodeRowCountUpperPart.getValue()->GetAt(0), | 213 barcodeRowCountUpperPart.getValue()->GetAt(0), |
214 barcodeRowCountLowerPart.getValue()->GetAt(0), | 214 barcodeRowCountLowerPart.getValue()->GetAt(0), |
215 barcodeECLevel.getValue()->GetAt(0)); | 215 barcodeECLevel.getValue()->GetAt(0)); |
216 removeIncorrectCodewords(codewords, *barcodeMetadata); | 216 removeIncorrectCodewords(codewords, *barcodeMetadata); |
217 return barcodeMetadata; | 217 return barcodeMetadata; |
218 } | 218 } |
219 FX_BOOL CBC_DetectionResultRowIndicatorColumn::isLeft() { | 219 FX_BOOL CBC_DetectionResultRowIndicatorColumn::isLeft() { |
220 return m_isLeft; | 220 return m_isLeft; |
221 } | 221 } |
222 CFX_ByteString CBC_DetectionResultRowIndicatorColumn::toString() { | 222 CFX_ByteString CBC_DetectionResultRowIndicatorColumn::toString() { |
223 return (CFX_ByteString) "IsLeft: " + (CFX_ByteString)m_isLeft + '\n' + | 223 return (CFX_ByteString) "IsLeft: " + (CFX_ByteString)m_isLeft + '\n' + |
224 CBC_DetectionResultColumn::toString(); | 224 CBC_DetectionResultColumn::toString(); |
225 } | 225 } |
(...skipping 30 matching lines...) Expand all Loading... |
256 } | 256 } |
257 break; | 257 break; |
258 case 2: | 258 case 2: |
259 if (rowIndicatorValue + 1 != barcodeMetadata.getColumnCount()) { | 259 if (rowIndicatorValue + 1 != barcodeMetadata.getColumnCount()) { |
260 codewords->SetAt(codewordRow, NULL); | 260 codewords->SetAt(codewordRow, NULL); |
261 } | 261 } |
262 break; | 262 break; |
263 } | 263 } |
264 } | 264 } |
265 } | 265 } |
OLD | NEW |