Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: xfa/src/fxbarcode/BC_BarCode.cpp

Issue 842043002: Organize barcode codes into modules. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa.gyp ('k') | xfa/src/fxbarcode/BC_Binarizer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2011 ZXing authors 8 * Copyright 2011 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");
11 * you may not use this file except in compliance with the License. 11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at 12 * You may obtain a copy of the License at
13 * 13 *
14 * http://www.apache.org/licenses/LICENSE-2.0 14 * http://www.apache.org/licenses/LICENSE-2.0
15 * 15 *
16 * Unless required by applicable law or agreed to in writing, software 16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS, 17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and 19 * See the License for the specific language governing permissions and
20 * limitations under the License. 20 * limitations under the License.
21 */ 21 */
22 22
23 #include "barcode.h" 23 #include "barcode.h"
24 #include "include/BC_Reader.h" 24 #include "BC_Reader.h"
25 #include "include/BC_OneDReader.h" 25 #include "BC_Writer.h"
26 #include "include/BC_OneDimReader.h" 26 #include "BC_DecoderResult.h"
27 #include "include/BC_Writer.h" 27 #include "BC_LuminanceSource.h"
28 #include "include/BC_OneDimWriter.h" 28 #include "BC_BufferedImageLuminanceSource.h"
29 #include "include/BC_OnedCode39Reader.h" 29 #include "BC_Binarizer.h"
30 #include "include/BC_OnedCode39Writer.h" 30 #include "BC_BinaryBitmap.h"
31 #include "include/BC_OnedCodaBarReader.h" 31 #include "BC_UtilCodingConvert.h"
32 #include "include/BC_OnedCodaBarWriter.h" 32 #include "BC_ResultPoint.h"
33 #include "include/BC_OnedCode128Reader.h" 33 #include "BC_BinaryBitmap.h"
34 #include "include/BC_OnedCode128Writer.h" 34 #include "BC_TwoDimWriter.h"
35 #include "include/BC_OnedEAN8Reader.h" 35 #include "common/BC_GlobalHistogramBinarizer.h"
36 #include "include/BC_OnedEAN8Writer.h" 36 #include "common/BC_CommonBitMatrix.h"
37 #include "include/BC_OnedEAN13Reader.h" 37 #include "common/BC_CommonBitArray.h"
38 #include "include/BC_OnedEAN13Writer.h" 38 #include "common/BC_CommonBitMatrix.h"
39 #include "include/BC_OnedUPCAReader.h" 39 #include "common/BC_CommonDecoderResult.h"
40 #include "include/BC_OnedUPCAWriter.h" 40 #include "datamatrix/BC_DataMatrixReader.h"
41 #include "include/BC_QRCodeReader.h" 41 #include "datamatrix/BC_DataMatrixWriter.h"
42 #include "include/BC_QRCodeWriter.h" 42 #include "oned/BC_OneDReader.h"
43 #include "include/BC_PDF417Compaction.h" 43 #include "oned/BC_OneDimReader.h"
44 #include "include/BC_PDF417.h" 44 #include "oned/BC_OneDimWriter.h"
45 #include "include/BC_PDF417Writer.h" 45 #include "oned/BC_OnedCode39Reader.h"
46 #include "include/BC_DataMatrixReader.h" 46 #include "oned/BC_OnedCode39Writer.h"
47 #include "include/BC_DataMatrixWriter.h" 47 #include "oned/BC_OnedCodaBarReader.h"
48 #include "include/BC_LuminanceSource.h" 48 #include "oned/BC_OnedCodaBarWriter.h"
49 #include "include/BC_BufferedImageLuminanceSource.h" 49 #include "oned/BC_OnedCode128Reader.h"
50 #include "include/BC_Binarizer.h" 50 #include "oned/BC_OnedCode128Writer.h"
51 #include "include/BC_GlobalHistogramBinarizer.h" 51 #include "oned/BC_OnedEAN8Reader.h"
52 #include "include/BC_BinaryBitmap.h" 52 #include "oned/BC_OnedEAN8Writer.h"
53 #include "include/BC_UtilCodingConvert.h" 53 #include "oned/BC_OnedEAN13Reader.h"
54 #include "include/BC_PDF417HighLevelEncoder.h" 54 #include "oned/BC_OnedEAN13Writer.h"
55 #include "include/BC_ResultPoint.h" 55 #include "oned/BC_OnedUPCAReader.h"
56 #include "include/BC_PDF417DetectorResult.h" 56 #include "oned/BC_OnedUPCAWriter.h"
57 #include "include/BC_BinaryBitmap.h" 57 #include "pdf417/BC_PDF417DetectorResult.h"
58 #include "include/BC_CommonBitMatrix.h" 58 #include "pdf417/BC_PDF417Compaction.h"
59 #include "include/BC_CommonBitArray.h" 59 #include "pdf417/BC_PDF417.h"
60 #include "include/BC_PDF417Detector.h" 60 #include "pdf417/BC_PDF417Writer.h"
61 #include "include/BC_PDF417DetectorResult.h" 61 #include "pdf417/BC_PDF417Detector.h"
62 #include "include/BC_DecoderResult.h" 62 #include "pdf417/BC_PDF417DetectorResult.h"
63 #include "include/BC_PDF417Codeword.h" 63 #include "pdf417/BC_PDF417Codeword.h"
64 #include "include/BC_CommonBitMatrix.h" 64 #include "pdf417/BC_PDF417Common.h"
65 #include "include/BC_PDF417Common.h" 65 #include "pdf417/BC_PDF417BarcodeValue.h"
66 #include "include/BC_PDF417BarcodeValue.h" 66 #include "pdf417/BC_PDF417BarcodeMetadata.h"
67 #include "include/BC_PDF417BarcodeMetadata.h" 67 #include "pdf417/BC_PDF417BoundingBox.h"
68 #include "include/BC_PDF417BoundingBox.h" 68 #include "pdf417/BC_PDF417DetectionResultColumn.h"
69 #include "include/BC_PDF417DetectionResultColumn.h" 69 #include "pdf417/BC_PDF417DetectionResultRowIndicatorColumn.h"
70 #include "include/BC_PDF417DetectionResultRowIndicatorColumn.h" 70 #include "pdf417/BC_PDF417DetectionResult.h"
71 #include "include/BC_PDF417DetectionResult.h" 71 #include "pdf417/BC_PDF417DecodedBitStreamParser.h"
72 #include "include/BC_PDF417DecodedBitStreamParser.h" 72 #include "pdf417/BC_PDF417CodewordDecoder.h"
73 #include "include/BC_PDF417CodewordDecoder.h" 73 #include "pdf417/BC_PDF417DecodedBitStreamParser.h"
74 #include "include/BC_PDF417DecodedBitStreamParser.h" 74 #include "pdf417/BC_PDF417ECModulusPoly.h"
75 #include "include/BC_PDF417ECModulusPoly.h" 75 #include "pdf417/BC_PDF417ECModulusGF.h"
76 #include "include/BC_PDF417ECModulusGF.h" 76 #include "pdf417/BC_PDF417ECErrorCorrection.h"
77 #include "include/BC_PDF417ECErrorCorrection.h" 77 #include "pdf417/BC_PDF417DecodedBitStreamParser.h"
78 #include "include/BC_PDF417DecodedBitStreamParser.h" 78 #include "pdf417/BC_PDF417ScanningDecoder.h"
79 #include "include/BC_CommonDecoderResult.h" 79 #include "pdf417/BC_PDF417Reader.h"
80 #include "include/BC_PDF417ScanningDecoder.h" 80 #include "pdf417/BC_PDF417HighLevelEncoder.h"
81 #include "include/BC_PDF417Reader.h" 81 #include "qrcode/BC_QRCodeReader.h"
82 #include "qrcode/BC_QRCodeWriter.h"
82 CBC_CodeBase :: CBC_CodeBase() 83 CBC_CodeBase :: CBC_CodeBase()
83 { 84 {
84 } 85 }
85 CBC_CodeBase :: ~CBC_CodeBase() 86 CBC_CodeBase :: ~CBC_CodeBase()
86 { 87 {
87 } 88 }
88 FX_BOOL CBC_CodeBase::SetCharEncoding(FX_INT32 encoding) 89 FX_BOOL CBC_CodeBase::SetCharEncoding(FX_INT32 encoding)
89 { 90 {
90 if (m_pBCWriter) { 91 if (m_pBCWriter) {
91 return m_pBCWriter->SetCharEncoding(encoding); 92 return m_pBCWriter->SetCharEncoding(encoding);
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 } 864 }
864 CFX_WideString CBC_DataMatrix::Decode(CFX_DIBitmap *pBitmap, FX_INT32 &e) 865 CFX_WideString CBC_DataMatrix::Decode(CFX_DIBitmap *pBitmap, FX_INT32 &e)
865 { 866 {
866 CBC_BufferedImageLuminanceSource source(pBitmap); 867 CBC_BufferedImageLuminanceSource source(pBitmap);
867 CBC_GlobalHistogramBinarizer binarizer(&source); 868 CBC_GlobalHistogramBinarizer binarizer(&source);
868 CBC_BinaryBitmap bitmap(&binarizer); 869 CBC_BinaryBitmap bitmap(&binarizer);
869 CFX_ByteString retStr = m_pBCReader->Decode(&bitmap, 0, e); 870 CFX_ByteString retStr = m_pBCReader->Decode(&bitmap, 0, e);
870 BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L"")); 871 BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
871 return CFX_WideString::FromUTF8(retStr, retStr.GetLength()); 872 return CFX_WideString::FromUTF8(retStr, retStr.GetLength());
872 } 873 }
OLDNEW
« no previous file with comments | « xfa.gyp ('k') | xfa/src/fxbarcode/BC_Binarizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698