diff options
Diffstat (limited to 'xfa/src/fxbarcode/pdf417')
39 files changed, 83 insertions, 30 deletions
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417.cpp index 9ad72849bf..c8b7c4cffa 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417.cpp @@ -20,13 +20,14 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeRow.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Compaction.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h" +#include "xfa/src/fxbarcode/utils.h" + int32_t CBC_PDF417::START_PATTERN = 0x1fea8; int32_t CBC_PDF417::STOP_PATTERN = 0x3fa29; int32_t CBC_PDF417::CODEWORD_TABLE[][1000] = { diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417.h b/xfa/src/fxbarcode/pdf417/BC_PDF417.h index 684b290e67..55b9b6c483 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417.h +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417.h @@ -7,6 +7,7 @@ #ifndef XFA_SRC_FXBARCODE_PDF417_BC_PDF417_H_ #define XFA_SRC_FXBARCODE_PDF417_BC_PDF417_H_ +#include "core/include/fxcrt/fx_basic.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Compaction.h" class CBC_Compaction; diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp index cd9de0c4c5..fbc252e202 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp @@ -20,9 +20,9 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeRow.h" + CBC_BarcodeMatrix::CBC_BarcodeMatrix(int32_t height, int32_t width) { m_matrix.SetSize(height + 2); for (int32_t i = 0, matrixLength = m_matrix.GetSize(); i < matrixLength; diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h index 9c44cee288..15e1c3f2bb 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h @@ -7,6 +7,8 @@ #ifndef XFA_SRC_FXBARCODE_PDF417_BC_PDF417BARCODEMATRIX_H_ #define XFA_SRC_FXBARCODE_PDF417_BC_PDF417BARCODEMATRIX_H_ +#include "core/include/fxcrt/fx_basic.h" + class CBC_BarcodeRow; class CBC_BarcodeMatrix { public: diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMetadata.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMetadata.cpp index 4b53e8c458..87aacb1ff9 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMetadata.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMetadata.cpp @@ -20,8 +20,8 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMetadata.h" + CBC_BarcodeMetadata::CBC_BarcodeMetadata(int32_t columnCount, int32_t rowCountUpperPart, int32_t rowCountLowerPart, diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMetadata.h b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMetadata.h index 4bec2939ee..6d4b95e8f9 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMetadata.h +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMetadata.h @@ -7,7 +7,8 @@ #ifndef XFA_SRC_FXBARCODE_PDF417_BC_PDF417BARCODEMETADATA_H_ #define XFA_SRC_FXBARCODE_PDF417_BC_PDF417BARCODEMETADATA_H_ -class CBC_BarcodeMetadata; +#include <stdint.h> + class CBC_BarcodeMetadata { public: CBC_BarcodeMetadata(int32_t columnCount, diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp index 0fcbb9c836..41e1955c48 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp @@ -20,8 +20,8 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeRow.h" + CBC_BarcodeRow::CBC_BarcodeRow(int32_t width) { m_row.SetSize(width); m_currentLocation = 0; diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeRow.h b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeRow.h index 16f351681c..f387a62740 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeRow.h +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeRow.h @@ -7,6 +7,8 @@ #ifndef XFA_SRC_FXBARCODE_PDF417_BC_PDF417BARCODEROW_H_ #define XFA_SRC_FXBARCODE_PDF417_BC_PDF417BARCODEROW_H_ +#include "core/include/fxcrt/fx_basic.h" + class CBC_BarcodeRow { public: CBC_BarcodeRow(int32_t width); diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.cpp index 0f310f6f1f..7ecb1a7b30 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.cpp @@ -20,9 +20,9 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Common.h" + CBC_BarcodeValue::CBC_BarcodeValue() {} CBC_BarcodeValue::~CBC_BarcodeValue() {} void CBC_BarcodeValue::setValue(int32_t value) { diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.h b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.h index a02c2ab1fb..8e567d7ec8 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.h +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.h @@ -7,6 +7,8 @@ #ifndef XFA_SRC_FXBARCODE_PDF417_BC_PDF417BARCODEVALUE_H_ #define XFA_SRC_FXBARCODE_PDF417_BC_PDF417BARCODEVALUE_H_ +#include "core/include/fxcrt/fx_basic.h" + class CBC_BarcodeValue { public: CBC_BarcodeValue(); diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417BoundingBox.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417BoundingBox.cpp index c14e0de133..df1ab78ba5 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417BoundingBox.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417BoundingBox.cpp @@ -21,9 +21,10 @@ */ #include "xfa/src/fxbarcode/BC_ResultPoint.h" -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BoundingBox.h" +#include "xfa/src/fxbarcode/utils.h" + CBC_BoundingBox::CBC_BoundingBox(CBC_CommonBitMatrix* image, CBC_ResultPoint* topLeft, CBC_ResultPoint* bottomLeft, diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417BoundingBox.h b/xfa/src/fxbarcode/pdf417/BC_PDF417BoundingBox.h index 84ace71811..c241572985 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417BoundingBox.h +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417BoundingBox.h @@ -7,8 +7,11 @@ #ifndef XFA_SRC_FXBARCODE_PDF417_BC_PDF417BOUNDINGBOX_H_ #define XFA_SRC_FXBARCODE_PDF417_BC_PDF417BOUNDINGBOX_H_ +#include "core/include/fxcrt/fx_system.h" + class CBC_CommonBitMatrix; class CBC_ResultPoint; + class CBC_BoundingBox { public: CBC_BoundingBox(CBC_CommonBitMatrix* image, diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417Codeword.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417Codeword.cpp index cd6787554e..f8b627a8b4 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417Codeword.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417Codeword.cpp @@ -20,8 +20,8 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Codeword.h" + int32_t CBC_Codeword::BARCODE_ROW_UNKNOWN = -1; CBC_Codeword::CBC_Codeword(int32_t startX, int32_t endX, diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417Codeword.h b/xfa/src/fxbarcode/pdf417/BC_PDF417Codeword.h index 93ac84d384..e2eb52c9ba 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417Codeword.h +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417Codeword.h @@ -7,6 +7,8 @@ #ifndef XFA_SRC_FXBARCODE_PDF417_BC_PDF417CODEWORD_H_ #define XFA_SRC_FXBARCODE_PDF417_BC_PDF417CODEWORD_H_ +#include "core/include/fxcrt/fx_basic.h" + class CBC_Codeword { public: CBC_Codeword(int32_t startX, int32_t endX, int32_t bucket, int32_t value); diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp index 171f658325..8bb2c1ebc8 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp @@ -20,12 +20,14 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Common.h" + #define SYMBOL_TABLE_Length 2787 #define Float_MAX_VALUE 2147483647 + FX_FLOAT CBC_PDF417CodewordDecoder::RATIOS_TABLE[2787][8] = {{0}}; + CBC_PDF417CodewordDecoder::CBC_PDF417CodewordDecoder() {} CBC_PDF417CodewordDecoder::~CBC_PDF417CodewordDecoder() {} void CBC_PDF417CodewordDecoder::Initialize() { diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.h b/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.h index 41612c1a71..149a640676 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.h +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.h @@ -7,6 +7,8 @@ #ifndef XFA_SRC_FXBARCODE_PDF417_BC_PDF417CODEWORDDECODER_H_ #define XFA_SRC_FXBARCODE_PDF417_BC_PDF417CODEWORDDECODER_H_ +#include "core/include/fxcrt/fx_basic.h" + class CBC_PDF417CodewordDecoder { public: CBC_PDF417CodewordDecoder(); diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417Common.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417Common.cpp index 074325ec51..5bd2dafbe8 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417Common.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417Common.cpp @@ -20,8 +20,8 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Common.h" + int32_t CBC_PDF417Common::NUMBER_OF_CODEWORDS = 929; int32_t CBC_PDF417Common::MAX_CODEWORDS_IN_BARCODE = NUMBER_OF_CODEWORDS - 1; int32_t CBC_PDF417Common::MIN_ROWS_IN_BARCODE = 3; @@ -615,6 +615,7 @@ int32_t CBC_PDF417Common::CODEWORD_TABLE[] = { 934, 931, 1879, 1876, 1873, 1870, 945, 1885, 1882, 1323, 1273, 1270, 2105, 1202, 1199, 1196, 1211, 2061, 2057, 1576, 1543, 1540, 1484, 1481, 1478, 1491, 1700}; + CBC_PDF417Common::CBC_PDF417Common() {} CBC_PDF417Common::~CBC_PDF417Common() {} int32_t CBC_PDF417Common::getBitCountSum(CFX_Int32Array& moduleBitCount) { diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417Common.h b/xfa/src/fxbarcode/pdf417/BC_PDF417Common.h index 16882e3bd4..f145b25383 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417Common.h +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417Common.h @@ -7,6 +7,8 @@ #ifndef XFA_SRC_FXBARCODE_PDF417_BC_PDF417COMMON_H_ #define XFA_SRC_FXBARCODE_PDF417_BC_PDF417COMMON_H_ +#include "core/include/fxcrt/fx_basic.h" + class CBC_PDF417Common { public: CBC_PDF417Common(); diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417Compaction.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417Compaction.cpp index 22481c4d05..01e85d64c0 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417Compaction.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417Compaction.cpp @@ -20,7 +20,7 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Compaction.h" + CBC_Compaction::CBC_Compaction() {} CBC_Compaction::~CBC_Compaction() {} diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp index 79d195aee4..7a04fddebe 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp @@ -26,9 +26,9 @@ #include "third_party/bigint/BigIntegerLibrary.hh" #include "xfa/src/fxbarcode/BC_DecoderResult.h" -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonDecoderResult.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417ResultMetadata.h" +#include "xfa/src/fxbarcode/utils.h" #define TEXT_COMPACTION_MODE_LATCH 900 #define BYTE_COMPACTION_MODE_LATCH 901 @@ -55,6 +55,7 @@ FX_CHAR CBC_DecodedBitStreamPaser::PUNCT_CHARS[29] = { FX_CHAR CBC_DecodedBitStreamPaser::MIXED_CHARS[30] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '&', '\r', '\t', ',', ':', '#', '-', '.', '$', '/', '+', '%', '*', '=', '^'}; + void CBC_DecodedBitStreamPaser::Initialize() {} void CBC_DecodedBitStreamPaser::Finalize() {} CBC_DecodedBitStreamPaser::CBC_DecodedBitStreamPaser() {} diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResult.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResult.cpp index 107ab39c51..f48faa3bb7 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResult.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResult.cpp @@ -20,7 +20,6 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMetadata.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BoundingBox.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Codeword.h" @@ -28,7 +27,9 @@ #include "xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResult.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResultColumn.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResultRowIndicatorColumn.h" + int32_t CBC_DetectionResult::ADJUST_ROW_NUMBER_SKIP = 2; + CBC_DetectionResult::CBC_DetectionResult(CBC_BarcodeMetadata* barcodeMetadata, CBC_BoundingBox* boundingBox) { m_barcodeMetadata = barcodeMetadata; diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResultColumn.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResultColumn.cpp index 39dea3ab53..9c492ba010 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResultColumn.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResultColumn.cpp @@ -20,11 +20,12 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BoundingBox.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Codeword.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResultColumn.h" + int32_t CBC_DetectionResultColumn::MAX_NEARBY_DISTANCE = 5; + CBC_DetectionResultColumn::CBC_DetectionResultColumn( CBC_BoundingBox* boundingBox) { m_boundingBox = boundingBox; diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResultRowIndicatorColumn.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResultRowIndicatorColumn.cpp index 14a87d60a2..a5d61b9210 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResultRowIndicatorColumn.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResultRowIndicatorColumn.cpp @@ -20,8 +20,8 @@ * limitations under the License. */ +#include "core/include/fxcrt/fx_basic.h" #include "xfa/src/fxbarcode/BC_ResultPoint.h" -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMetadata.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BoundingBox.h" @@ -29,6 +29,8 @@ #include "xfa/src/fxbarcode/pdf417/BC_PDF417Common.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResultColumn.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResultRowIndicatorColumn.h" +#include "xfa/src/fxbarcode/utils.h" + CBC_DetectionResultRowIndicatorColumn::CBC_DetectionResultRowIndicatorColumn( CBC_BoundingBox* boundingBox, FX_BOOL isLeft) diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp index ca845ff04a..273f4906d1 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp @@ -22,12 +22,14 @@ #include "xfa/src/fxbarcode/BC_BinaryBitmap.h" #include "xfa/src/fxbarcode/BC_ResultPoint.h" -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonBitArray.h" #include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Detector.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417DetectorResult.h" -#define INTERGER_MAX 2147483647 +#include "xfa/src/fxbarcode/utils.h" + +#define INTEGER_MAX 2147483647 + int32_t CBC_Detector::INDEXES_START_PATTERN[] = {0, 4, 1, 5}; int32_t CBC_Detector::INDEXES_STOP_PATTERN[] = {6, 2, 7, 3}; int32_t CBC_Detector::INTEGER_MATH_SHIFT = 8; @@ -44,6 +46,7 @@ int32_t CBC_Detector::MAX_PATTERN_DRIFT = 5; int32_t CBC_Detector::SKIPPED_ROW_COUNT_MAX = 25; int32_t CBC_Detector::ROW_STEP = 5; int32_t CBC_Detector::BARCODE_MIN_HEIGHT = 10; + CBC_Detector::CBC_Detector() {} CBC_Detector::~CBC_Detector() {} CBC_PDF417DetectorResult* CBC_Detector::detect(CBC_BinaryBitmap* image, @@ -330,7 +333,7 @@ int32_t CBC_Detector::patternMatchVariance(CFX_Int32Array& counters, patternLength += pattern[i]; } if (total < patternLength) { - return INTERGER_MAX; + return INTEGER_MAX; } int32_t unitBarWidth = (total << INTEGER_MATH_SHIFT) / patternLength; maxIndividualVariance = @@ -342,7 +345,7 @@ int32_t CBC_Detector::patternMatchVariance(CFX_Int32Array& counters, int32_t variance = counter > scaledPattern ? counter - scaledPattern : scaledPattern - counter; if (variance > maxIndividualVariance) { - return INTERGER_MAX; + return INTEGER_MAX; } totalVariance += variance; } diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417DetectorResult.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417DetectorResult.cpp index 8a46c44877..395c53954b 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417DetectorResult.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417DetectorResult.cpp @@ -21,9 +21,9 @@ */ #include "xfa/src/fxbarcode/BC_ResultPoint.h" -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417DetectorResult.h" + CBC_PDF417DetectorResult::CBC_PDF417DetectorResult(CBC_CommonBitMatrix* bits, CFX_PtrArray* points) { m_bits = bits; diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417DetectorResult.h b/xfa/src/fxbarcode/pdf417/BC_PDF417DetectorResult.h index dbc2ffcf35..b0b365e9a9 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417DetectorResult.h +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417DetectorResult.h @@ -7,7 +7,10 @@ #ifndef XFA_SRC_FXBARCODE_PDF417_BC_PDF417DETECTORRESULT_H_ #define XFA_SRC_FXBARCODE_PDF417_BC_PDF417DETECTORRESULT_H_ +#include "core/include/fxcrt/fx_basic.h" + class CBC_CommonBitMatrix; + class CBC_PDF417DetectorResult { public: CBC_PDF417DetectorResult(CBC_CommonBitMatrix* bits, CFX_PtrArray* points); diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417Dimensions.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417Dimensions.cpp index d0d7fab8da..18edeacddb 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417Dimensions.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417Dimensions.cpp @@ -20,8 +20,8 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Dimensions.h" + CBC_Dimensions::CBC_Dimensions(int32_t minCols, int32_t maxCols, int32_t minRows, diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417Dimensions.h b/xfa/src/fxbarcode/pdf417/BC_PDF417Dimensions.h index d7d1623452..9b69fc4a8a 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417Dimensions.h +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417Dimensions.h @@ -7,6 +7,8 @@ #ifndef XFA_SRC_FXBARCODE_PDF417_BC_PDF417DIMENSIONS_H_ #define XFA_SRC_FXBARCODE_PDF417_BC_PDF417DIMENSIONS_H_ +#include <stdint.h> + class CBC_Dimensions { public: CBC_Dimensions(int32_t minCols, diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp index c4c65e24bf..aea60df578 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp @@ -20,12 +20,14 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Common.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusGF.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusPoly.h" +#include "xfa/src/fxbarcode/utils.h" + CBC_PDF417ECModulusGF* CBC_PDF417ECErrorCorrection::m_field = NULL; + void CBC_PDF417ECErrorCorrection::Initialize(int32_t& e) { m_field = new CBC_PDF417ECModulusGF(CBC_PDF417Common::NUMBER_OF_CODEWORDS, 3, e); diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusGF.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusGF.cpp index b8de25da76..1ba77dac16 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusGF.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusGF.cpp @@ -20,10 +20,11 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Common.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusGF.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusPoly.h" +#include "xfa/src/fxbarcode/utils.h" + CBC_PDF417ECModulusGF* CBC_PDF417ECModulusGF::PDF417_GF = NULL; void CBC_PDF417ECModulusGF::Initialize(int32_t& e) { PDF417_GF = diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusPoly.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusPoly.cpp index aad247a615..04f7752b65 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusPoly.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusPoly.cpp @@ -20,10 +20,11 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Common.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusGF.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusPoly.h" +#include "xfa/src/fxbarcode/utils.h" + CBC_PDF417ECModulusPoly::CBC_PDF417ECModulusPoly(CBC_PDF417ECModulusGF* field, CFX_Int32Array& coefficients, int32_t& e) { diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp index 920860bb42..5fb2d8e21e 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp @@ -20,8 +20,9 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.h" +#include "xfa/src/fxbarcode/utils.h" + int32_t CBC_PDF417ErrorCorrection::EC_COEFFICIENTS[][2500] = { {27, 917}, {522, 568, 723, 809}, @@ -96,6 +97,7 @@ int32_t CBC_PDF417ErrorCorrection::EC_COEFFICIENTS[][2500] = { 284, 736, 138, 646, 411, 877, 669, 141, 919, 45, 780, 407, 164, 332, 899, 165, 726, 600, 325, 498, 655, 357, 752, 768, 223, 849, 647, 63, 310, 863, 251, 366, 304, 282, 738, 675, 410, 389, 244, 31, 121, 303, 263}}; + CBC_PDF417ErrorCorrection::CBC_PDF417ErrorCorrection() {} CBC_PDF417ErrorCorrection::~CBC_PDF417ErrorCorrection() {} int32_t CBC_PDF417ErrorCorrection::getErrorCorrectionCodewordCount( diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.h b/xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.h index e043bacfdf..1c73173e55 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.h +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.h @@ -7,6 +7,10 @@ #ifndef XFA_SRC_FXBARCODE_PDF417_BC_PDF417ERRORCORRECTION_H_ #define XFA_SRC_FXBARCODE_PDF417_BC_PDF417ERRORCORRECTION_H_ +#include <stdint.h> + +#include "core/include/fxcrt/fx_string.h" + class CBC_PDF417ErrorCorrection { public: CBC_PDF417ErrorCorrection(); diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp index 9610498565..8bd4fe1ba4 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp @@ -24,12 +24,13 @@ #include "third_party/bigint/BigIntegerLibrary.hh" #include "xfa/src/fxbarcode/BC_UtilCodingConvert.h" -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Compaction.h" +#include "xfa/src/fxbarcode/utils.h" #define SUBMODE_ALPHA 0 #define SUBMODE_LOWER 1 #define SUBMODE_MIXED 2 + int32_t CBC_PDF417HighLevelEncoder::TEXT_COMPACTION = 0; int32_t CBC_PDF417HighLevelEncoder::BYTE_COMPACTION = 1; int32_t CBC_PDF417HighLevelEncoder::NUMERIC_COMPACTION = 2; @@ -47,6 +48,7 @@ uint8_t CBC_PDF417HighLevelEncoder::TEXT_PUNCTUATION_RAW[] = { 10, 45, 46, 36, 47, 34, 124, 42, 40, 41, 63, 123, 125, 39, 0}; int32_t CBC_PDF417HighLevelEncoder::MIXED[128] = {0}; int32_t CBC_PDF417HighLevelEncoder::PUNCTUATION[128] = {0}; + void CBC_PDF417HighLevelEncoder::Initialize() { Inverse(); } diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp index a8167816c4..7e5d0d8851 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp @@ -25,7 +25,6 @@ #include "xfa/src/fxbarcode/BC_DecoderResult.h" #include "xfa/src/fxbarcode/BC_Reader.h" #include "xfa/src/fxbarcode/BC_ResultPoint.h" -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonBitArray.h" #include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h" #include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h" @@ -50,7 +49,10 @@ #include "xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusPoly.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Reader.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417ScanningDecoder.h" +#include "xfa/src/fxbarcode/utils.h" + #define Integer_MAX_VALUE 2147483647 + CBC_PDF417Reader::CBC_PDF417Reader() {} CBC_PDF417Reader::~CBC_PDF417Reader() {} CFX_ByteString CBC_PDF417Reader::Decode(CBC_BinaryBitmap* image, int32_t& e) { diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417ResultMetadata.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417ResultMetadata.cpp index 09fbcef2e3..5bfcdee412 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417ResultMetadata.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417ResultMetadata.cpp @@ -20,8 +20,8 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417ResultMetadata.h" + CBC_PDF417ResultMetadata::CBC_PDF417ResultMetadata() {} CBC_PDF417ResultMetadata::~CBC_PDF417ResultMetadata() {} int32_t CBC_PDF417ResultMetadata::getSegmentIndex() { diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417ResultMetadata.h b/xfa/src/fxbarcode/pdf417/BC_PDF417ResultMetadata.h index a95203d600..a70d3efc4a 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417ResultMetadata.h +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417ResultMetadata.h @@ -7,6 +7,8 @@ #ifndef XFA_SRC_FXBARCODE_PDF417_BC_PDF417RESULTMETADATA_H_ #define XFA_SRC_FXBARCODE_PDF417_BC_PDF417RESULTMETADATA_H_ +#include "core/include/fxcrt/fx_basic.h" + class CBC_PDF417ResultMetadata { public: CBC_PDF417ResultMetadata(); diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp index df36e30926..8090c79975 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp @@ -22,7 +22,6 @@ #include "xfa/src/fxbarcode/BC_DecoderResult.h" #include "xfa/src/fxbarcode/BC_ResultPoint.h" -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMetadata.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.h" @@ -40,10 +39,13 @@ #include "xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusGF.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417ECModulusPoly.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417ScanningDecoder.h" +#include "xfa/src/fxbarcode/utils.h" + int32_t CBC_PDF417ScanningDecoder::CODEWORD_SKEW_SIZE = 2; int32_t CBC_PDF417ScanningDecoder::MAX_ERRORS = 3; int32_t CBC_PDF417ScanningDecoder::MAX_EC_CODEWORDS = 512; CBC_PDF417ECErrorCorrection* CBC_PDF417ScanningDecoder::errorCorrection = NULL; + CBC_PDF417ScanningDecoder::CBC_PDF417ScanningDecoder() {} CBC_PDF417ScanningDecoder::~CBC_PDF417ScanningDecoder() {} void CBC_PDF417ScanningDecoder::Initialize() { diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417Writer.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417Writer.cpp index 7b4a200978..97cd9d82c4 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417Writer.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417Writer.cpp @@ -21,13 +21,13 @@ */ #include "xfa/src/fxbarcode/BC_TwoDimWriter.h" -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonBitArray.h" #include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Compaction.h" #include "xfa/src/fxbarcode/pdf417/BC_PDF417Writer.h" + CBC_PDF417Writer::CBC_PDF417Writer() { m_bFixedSize = FALSE; } |