diff options
Diffstat (limited to 'xfa/src/fxbarcode/qrcode')
38 files changed, 83 insertions, 27 deletions
diff --git a/xfa/src/fxbarcode/qrcode/BC_FinderPatternInfo.cpp b/xfa/src/fxbarcode/qrcode/BC_FinderPatternInfo.cpp index c3aa28c593..1a2069030e 100644 --- a/xfa/src/fxbarcode/qrcode/BC_FinderPatternInfo.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_FinderPatternInfo.cpp @@ -21,9 +21,9 @@ */ #include "xfa/src/fxbarcode/BC_ResultPoint.h" -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/qrcode/BC_FinderPatternInfo.h" #include "xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.h" + CBC_QRFinderPatternInfo::CBC_QRFinderPatternInfo(CFX_PtrArray* patternCenters) { m_bottomLeft = (CBC_QRFinderPattern*)(*patternCenters)[0]; m_topLeft = (CBC_QRFinderPattern*)(*patternCenters)[1]; diff --git a/xfa/src/fxbarcode/qrcode/BC_FinderPatternInfo.h b/xfa/src/fxbarcode/qrcode/BC_FinderPatternInfo.h index 245f407b80..14316e5a16 100644 --- a/xfa/src/fxbarcode/qrcode/BC_FinderPatternInfo.h +++ b/xfa/src/fxbarcode/qrcode/BC_FinderPatternInfo.h @@ -7,7 +7,10 @@ #ifndef XFA_SRC_FXBARCODE_QRCODE_BC_FINDERPATTERNINFO_H_ #define XFA_SRC_FXBARCODE_QRCODE_BC_FINDERPATTERNINFO_H_ +#include "core/include/fxcrt/fx_basic.h" + class CBC_QRFinderPattern; + class CBC_QRFinderPatternInfo { private: CBC_QRFinderPattern* m_bottomLeft; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp b/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp index 3eb70f9cc7..50b25f8535 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp @@ -21,8 +21,8 @@ */ #include "xfa/src/fxbarcode/BC_ResultPoint.h" -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.h" + CBC_QRAlignmentPattern::CBC_QRAlignmentPattern(FX_FLOAT posX, FX_FLOAT posY, FX_FLOAT estimateModuleSize) diff --git a/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp b/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp index c9de17729d..19d3f2b411 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp @@ -21,10 +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/qrcode/BC_QRAlignmentPattern.h" #include "xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.h" + CBC_QRAlignmentPatternFinder::CBC_QRAlignmentPatternFinder( CBC_CommonBitMatrix* image, int32_t startX, diff --git a/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.h b/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.h index 922c2bb891..d1fff0aa3c 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.h +++ b/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.h @@ -7,8 +7,12 @@ #ifndef XFA_SRC_FXBARCODE_QRCODE_BC_QRALIGNMENTPATTERNFINDER_H_ #define XFA_SRC_FXBARCODE_QRCODE_BC_QRALIGNMENTPATTERNFINDER_H_ +#include "core/include/fxcrt/fx_basic.h" +#include "xfa/src/fxbarcode/utils.h" + class CBC_CommonBitMatrix; class CBC_QRAlignmentPattern; + class CBC_QRAlignmentPatternFinder { private: CBC_CommonBitMatrix* m_image; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRBitMatrixParser.cpp b/xfa/src/fxbarcode/qrcode/BC_QRBitMatrixParser.cpp index 4bd502665f..d4d0cb6148 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRBitMatrixParser.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRBitMatrixParser.cpp @@ -20,12 +20,13 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h" #include "xfa/src/fxbarcode/qrcode/BC_QRBitMatrixParser.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h" #include "xfa/src/fxbarcode/qrcode/BC_QRDataMask.h" +#include "xfa/src/fxbarcode/utils.h" + CBC_QRBitMatrixParser::CBC_QRBitMatrixParser() {} void CBC_QRBitMatrixParser::Init(CBC_CommonBitMatrix* bitMatrix, int32_t& e) { m_dimension = bitMatrix->GetDimension(e); diff --git a/xfa/src/fxbarcode/qrcode/BC_QRBitMatrixParser.h b/xfa/src/fxbarcode/qrcode/BC_QRBitMatrixParser.h index 0142f8209f..8964b86d62 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRBitMatrixParser.h +++ b/xfa/src/fxbarcode/qrcode/BC_QRBitMatrixParser.h @@ -7,10 +7,13 @@ #ifndef XFA_SRC_FXBARCODE_QRCODE_BC_QRBITMATRIXPARSER_H_ #define XFA_SRC_FXBARCODE_QRCODE_BC_QRBITMATRIXPARSER_H_ +#include "core/include/fxcrt/fx_basic.h" + class CBC_CommonBitMatrix; class CBC_QRCoderVersion; class CBC_QRCoderFormatInformation; class CBC_QRDataMask; + class CBC_QRBitMatrixParser { private: CBC_CommonBitMatrix* m_bitMatrix; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCodeReader.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCodeReader.cpp index e74f8e7f3a..9eaffa119d 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCodeReader.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCodeReader.cpp @@ -26,7 +26,6 @@ #include "xfa/src/fxbarcode/BC_LuminanceSource.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_CommonDecoderResult.h" #include "xfa/src/fxbarcode/common/BC_GlobalHistogramBinarizer.h" #include "xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.h" @@ -40,6 +39,7 @@ #include "xfa/src/fxbarcode/qrcode/BC_QRDataMask.h" #include "xfa/src/fxbarcode/qrcode/BC_QRDetector.h" #include "xfa/src/fxbarcode/qrcode/BC_QRDetectorResult.h" + CBC_QRCodeReader::CBC_QRCodeReader() : m_decoder(NULL) {} void CBC_QRCodeReader::Init() { m_decoder = new CBC_QRCoderDecoder; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCodeWriter.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCodeWriter.cpp index ebb55aea34..e51b9260ef 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCodeWriter.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCodeWriter.cpp @@ -22,13 +22,13 @@ #include "xfa/src/fxbarcode/BC_Reader.h" #include "xfa/src/fxbarcode/BC_TwoDimWriter.h" -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonByteMatrix.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCodeReader.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCodeWriter.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoder.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h" + CBC_QRCodeWriter::CBC_QRCodeWriter() { m_bFixedSize = TRUE; m_iCorrectLevel = 1; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoder.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoder.cpp index 9b0effcd30..ab370f8842 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoder.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoder.cpp @@ -20,11 +20,12 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonByteMatrix.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoder.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderMode.h" +#include "xfa/src/fxbarcode/utils.h" + CBC_QRCoder::CBC_QRCoder() { m_mode = NULL; m_ecLevel = NULL; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderBitVector.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderBitVector.cpp index cfd50d135e..28f30cab09 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderBitVector.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderBitVector.cpp @@ -20,8 +20,10 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" +#include "core/include/fxcrt/fx_memory.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderBitVector.h" +#include "xfa/src/fxbarcode/utils.h" + CBC_QRCoderBitVector::CBC_QRCoderBitVector() { m_sizeInBits = 0; m_size = 32; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderBitVector.h b/xfa/src/fxbarcode/qrcode/BC_QRCoderBitVector.h index 5613de1f89..86c40527a1 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderBitVector.h +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderBitVector.h @@ -7,6 +7,8 @@ #ifndef XFA_SRC_FXBARCODE_QRCODE_BC_QRCODERBITVECTOR_H_ #define XFA_SRC_FXBARCODE_QRCODE_BC_QRCODERBITVECTOR_H_ +#include <stdint.h> + class CBC_QRCoderBitVector { private: int32_t m_sizeInBits; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderBlockPair.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderBlockPair.cpp index ac20c03a6c..b3ed5d4d9b 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderBlockPair.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderBlockPair.cpp @@ -20,9 +20,9 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonByteArray.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderBlockPair.h" + CBC_QRCoderBlockPair::CBC_QRCoderBlockPair( CBC_CommonByteArray* data, CBC_CommonByteArray* errorCorrection) { diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderDecoder.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderDecoder.cpp index 4a337b12cd..fcef73acbf 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderDecoder.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderDecoder.cpp @@ -20,7 +20,6 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h" #include "xfa/src/fxbarcode/common/BC_CommonDecoderResult.h" #include "xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.h" @@ -31,6 +30,7 @@ #include "xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h" #include "xfa/src/fxbarcode/qrcode/BC_QRDataBlock.h" #include "xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h" + CBC_QRCoderDecoder::CBC_QRCoderDecoder() { m_rsDecoder = NULL; } diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderECB.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderECB.cpp index 91e2ba7fa4..4dc394daae 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderECB.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderECB.cpp @@ -20,8 +20,8 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderECB.h" + CBC_QRCoderECB::CBC_QRCoderECB(int32_t count, int32_t dataCodeWords) { m_dataCodeWords = dataCodeWords; m_count = count; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderECB.h b/xfa/src/fxbarcode/qrcode/BC_QRCoderECB.h index 67b3987efa..c269e38093 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderECB.h +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderECB.h @@ -7,6 +7,8 @@ #ifndef XFA_SRC_FXBARCODE_QRCODE_BC_QRCODERECB_H_ #define XFA_SRC_FXBARCODE_QRCODE_BC_QRCODERECB_H_ +#include <stdint.h> + class CBC_QRCoderECB { private: int32_t m_count; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderECBlocks.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderECBlocks.cpp index c63ee63c5a..c418651483 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderECBlocks.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderECBlocks.cpp @@ -20,9 +20,9 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderECB.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderECBlocks.h" + CBC_QRCoderECBlocks::CBC_QRCoderECBlocks(int32_t ecCodeWordsPerBlock, CBC_QRCoderECB* ecBlocks) { m_ecCodeWordsPerBlock = ecCodeWordsPerBlock; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderECBlocks.h b/xfa/src/fxbarcode/qrcode/BC_QRCoderECBlocks.h index d2ba509631..7d25eee42b 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderECBlocks.h +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderECBlocks.h @@ -7,7 +7,10 @@ #ifndef XFA_SRC_FXBARCODE_QRCODE_BC_QRCODERECBLOCKS_H_ #define XFA_SRC_FXBARCODE_QRCODE_BC_QRCODERECBLOCKS_H_ +#include "core/include/fxcrt/fx_basic.h" + class CBC_QRCoderECB; + class CBC_QRCoderECBlocks { private: int32_t m_ecCodeWordsPerBlock; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.cpp index 1ebd35203a..a451ab50b8 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.cpp @@ -23,7 +23,6 @@ #include <algorithm> #include "xfa/src/fxbarcode/BC_UtilCodingConvert.h" -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonByteArray.h" #include "xfa/src/fxbarcode/common/BC_CommonByteMatrix.h" #include "xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomon.h" @@ -38,6 +37,7 @@ #include "xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderMode.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h" + const int32_t CBC_QRCoderEncoder::m_alphaNumbericTable[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -45,6 +45,7 @@ const int32_t CBC_QRCoderEncoder::m_alphaNumbericTable[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1}; + CBC_QRCoderEncoder::CBC_QRCoderEncoder() {} CBC_QRCoderEncoder::~CBC_QRCoderEncoder() {} class Make_Pair { diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.cpp index 8d3f567cec..ea239bdc0c 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.cpp @@ -20,12 +20,13 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h" + CBC_QRCoderErrorCorrectionLevel* CBC_QRCoderErrorCorrectionLevel::L = NULL; CBC_QRCoderErrorCorrectionLevel* CBC_QRCoderErrorCorrectionLevel::M = NULL; CBC_QRCoderErrorCorrectionLevel* CBC_QRCoderErrorCorrectionLevel::Q = NULL; CBC_QRCoderErrorCorrectionLevel* CBC_QRCoderErrorCorrectionLevel::H = NULL; + CBC_QRCoderErrorCorrectionLevel::CBC_QRCoderErrorCorrectionLevel( int32_t ordinal, int32_t bits, diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h b/xfa/src/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h index fbe050d352..77142423bf 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h @@ -7,6 +7,8 @@ #ifndef XFA_SRC_FXBARCODE_QRCODE_BC_QRCODERERRORCORRECTIONLEVEL_H_ #define XFA_SRC_FXBARCODE_QRCODE_BC_QRCODERERRORCORRECTIONLEVEL_H_ +#include "core/include/fxcrt/fx_string.h" + class CBC_QRCoderErrorCorrectionLevel { private: int32_t m_ordinal; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.cpp index b4d21e3a2d..1bb5a295a0 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.cpp @@ -20,9 +20,10 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.h" +#include "xfa/src/fxbarcode/utils.h" + const int32_t CBC_QRCoderFormatInformation::FORMAT_INFO_MASK_QR = 0X5412; const int32_t CBC_QRCoderFormatInformation::FORMAT_INFO_DECODE_LOOKUP[32][2] = { {0x5412, 0x00}, {0x5125, 0x01}, {0x5E7C, 0x02}, {0x5B4B, 0x03}, @@ -36,6 +37,7 @@ const int32_t CBC_QRCoderFormatInformation::FORMAT_INFO_DECODE_LOOKUP[32][2] = { }; const int32_t CBC_QRCoderFormatInformation::BITS_SET_IN_HALF_BYTE[] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4}; + CBC_QRCoderFormatInformation::CBC_QRCoderFormatInformation(int32_t formatInfo) { m_errorCorrectLevl = CBC_QRCoderErrorCorrectionLevel::ForBits((formatInfo >> 3) & 0x03); diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp index e8c8373242..840d542fc3 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp @@ -20,11 +20,12 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonByteMatrix.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoder.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderMaskUtil.h" +#include "xfa/src/fxbarcode/utils.h" + CBC_QRCoderMaskUtil::CBC_QRCoderMaskUtil() {} CBC_QRCoderMaskUtil::~CBC_QRCoderMaskUtil() {} int32_t CBC_QRCoderMaskUtil::ApplyMaskPenaltyRule1( diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp index 0fd46d5bbb..bf1d258d2a 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp @@ -20,13 +20,14 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonByteMatrix.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoder.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderBitVector.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderMaskUtil.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h" +#include "xfa/src/fxbarcode/utils.h" + const int32_t CBC_QRCoderMatrixUtil::POSITION_DETECTION_PATTERN[7][7] = { {1, 1, 1, 1, 1, 1, 1}, {1, 0, 0, 0, 0, 0, 1}, @@ -77,6 +78,7 @@ const int32_t CBC_QRCoderMatrixUtil::TYPE_INFO_COORDINATES[15][2] = { const int32_t CBC_QRCoderMatrixUtil::VERSION_INFO_POLY = 0x1f25; const int32_t CBC_QRCoderMatrixUtil::TYPE_INFO_POLY = 0x0537; const int32_t CBC_QRCoderMatrixUtil::TYPE_INFO_MASK_PATTERN = 0x5412; + void CBC_QRCoderMatrixUtil::ClearMatrix(CBC_CommonByteMatrix* matrix, int32_t& e) { if (matrix == NULL) { diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp index 405cf5489d..7ec3df2b08 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp @@ -20,9 +20,10 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderMode.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h" +#include "xfa/src/fxbarcode/utils.h" + CBC_QRCoderMode* CBC_QRCoderMode::sBYTE = NULL; CBC_QRCoderMode* CBC_QRCoderMode::sNUMERIC = NULL; CBC_QRCoderMode* CBC_QRCoderMode::sALPHANUMERIC = NULL; @@ -33,6 +34,7 @@ CBC_QRCoderMode* CBC_QRCoderMode::sTERMINATOR = NULL; CBC_QRCoderMode* CBC_QRCoderMode::sFNC1_FIRST_POSITION = NULL; CBC_QRCoderMode* CBC_QRCoderMode::sFNC1_SECOND_POSITION = NULL; CBC_QRCoderMode* CBC_QRCoderMode::sSTRUCTURED_APPEND = NULL; + CBC_QRCoderMode::CBC_QRCoderMode(int32_t* characterCountBitsForVersions, int32_t x1, int32_t x2, diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.h b/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.h index 354daf51c1..9098b35beb 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.h +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.h @@ -7,7 +7,12 @@ #ifndef XFA_SRC_FXBARCODE_QRCODE_BC_QRCODERMODE_H_ #define XFA_SRC_FXBARCODE_QRCODE_BC_QRCODERMODE_H_ +#include <stdint.h> + +#include "core/include/fxcrt/fx_string.h" + class CBC_QRCoderVersion; + class CBC_QRCoderMode { private: int32_t* m_characterCountBitsForVersions; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.cpp index 9fae0ef0c6..86e08c933c 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.cpp @@ -20,7 +20,6 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderBitVector.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderECB.h" @@ -29,6 +28,7 @@ #include "xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h" #include "xfa/src/fxbarcode/utils.h" + const int32_t CBC_QRCoderVersion::VERSION_DECODE_INFO[] = { 0x07C94, 0x085BC, 0x09A99, 0x0A4D3, 0x0BBF6, 0x0C762, 0x0D847, 0x0E60D, 0x0F928, 0x10B78, 0x1145D, 0x12A17, 0x13532, 0x149A6, @@ -36,6 +36,7 @@ const int32_t CBC_QRCoderVersion::VERSION_DECODE_INFO[] = { 0x1CC1A, 0x1D33F, 0x1ED75, 0x1F250, 0x209D5, 0x216F0, 0x228BA, 0x2379F, 0x24B0B, 0x2542E, 0x26A64, 0x27541, 0x28C69}; CFX_PtrArray* CBC_QRCoderVersion::VERSION = NULL; + void CBC_QRCoderVersion::Initialize() { VERSION = new CFX_PtrArray(); } diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h b/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h index 1f64faa98e..755a7345dc 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h @@ -7,9 +7,12 @@ #ifndef XFA_SRC_FXBARCODE_QRCODE_BC_QRCODERVERSION_H_ #define XFA_SRC_FXBARCODE_QRCODE_BC_QRCODERVERSION_H_ +#include "core/include/fxcrt/fx_basic.h" + class CBC_QRCoderECBlocks; class CBC_CommonBitMatrix; class CBC_QRCoderErrorCorrectionLevel; + class CBC_QRCoderVersion { private: const static int32_t VERSION_DECODE_INFO[34]; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRDataBlock.cpp b/xfa/src/fxbarcode/qrcode/BC_QRDataBlock.cpp index c8cf58a6dc..1e36dc1614 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRDataBlock.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRDataBlock.cpp @@ -20,11 +20,12 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderECB.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderECBlocks.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h" #include "xfa/src/fxbarcode/qrcode/BC_QRDataBlock.h" +#include "xfa/src/fxbarcode/utils.h" + CBC_QRDataBlock::CBC_QRDataBlock(int32_t numDataCodewords, CFX_ByteArray* codewords) : m_numDataCodewords(numDataCodewords), m_codewords(codewords) {} diff --git a/xfa/src/fxbarcode/qrcode/BC_QRDataMask.cpp b/xfa/src/fxbarcode/qrcode/BC_QRDataMask.cpp index dc4fddbbea..a5a8a3a73b 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRDataMask.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRDataMask.cpp @@ -20,11 +20,13 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h" #include "xfa/src/fxbarcode/qrcode/BC_QRDataMask.h" +#include "xfa/src/fxbarcode/utils.h" + static int32_t N_DATA_MASKS = 0; CFX_PtrArray* CBC_QRDataMask::DATA_MASKS = NULL; + void CBC_QRDataMask::Initialize() { DATA_MASKS = new CFX_PtrArray(); N_DATA_MASKS = BuildDataMasks(); diff --git a/xfa/src/fxbarcode/qrcode/BC_QRDataMask.h b/xfa/src/fxbarcode/qrcode/BC_QRDataMask.h index b32a35d822..cbf8d47a0e 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRDataMask.h +++ b/xfa/src/fxbarcode/qrcode/BC_QRDataMask.h @@ -7,7 +7,10 @@ #ifndef XFA_SRC_FXBARCODE_QRCODE_BC_QRDATAMASK_H_ #define XFA_SRC_FXBARCODE_QRCODE_BC_QRDATAMASK_H_ +#include "core/include/fxcrt/fx_basic.h" + class CBC_CommonBitMatrix; + class CBC_QRDataMask { public: static CFX_PtrArray* DATA_MASKS; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp index d967892eb1..ed97280932 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp @@ -21,18 +21,19 @@ */ #include "xfa/src/fxbarcode/BC_UtilCodingConvert.h" -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonBitSource.h" #include "xfa/src/fxbarcode/common/BC_CommonCharacterSetECI.h" #include "xfa/src/fxbarcode/common/BC_CommonDecoderResult.h" #include "xfa/src/fxbarcode/common/BC_CommonECI.h" #include "xfa/src/fxbarcode/qrcode/BC_QRCoderMode.h" #include "xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h" + const FX_CHAR* CBC_QRDecodedBitStreamParser::UTF_8 = "utf8"; const FX_CHAR CBC_QRDecodedBitStreamParser::ALPHANUMERIC_CHARS[45] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', '$', '%', '*', '+', '-', '.', '/', ':'}; + CBC_QRDecodedBitStreamParser::CBC_QRDecodedBitStreamParser() {} CBC_QRDecodedBitStreamParser::~CBC_QRDecodedBitStreamParser() {} CBC_CommonDecoderResult* CBC_QRDecodedBitStreamParser::Decode( diff --git a/xfa/src/fxbarcode/qrcode/BC_QRDetector.cpp b/xfa/src/fxbarcode/qrcode/BC_QRDetector.cpp index ac1e4b5298..b6a6f7e10b 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRDetector.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRDetector.cpp @@ -23,7 +23,6 @@ #include <algorithm> #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/qrcode/BC_FinderPatternInfo.h" #include "xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.h" @@ -33,6 +32,7 @@ #include "xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.h" #include "xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.h" #include "xfa/src/fxbarcode/qrcode/BC_QRGridSampler.h" + CBC_QRDetector::CBC_QRDetector(CBC_CommonBitMatrix* image) : m_image(image) {} CBC_QRDetector::~CBC_QRDetector() {} CBC_QRDetectorResult* CBC_QRDetector::Detect(int32_t hints, int32_t& e) { diff --git a/xfa/src/fxbarcode/qrcode/BC_QRDetectorResult.cpp b/xfa/src/fxbarcode/qrcode/BC_QRDetectorResult.cpp index 10eb839e74..fad100816f 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRDetectorResult.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRDetectorResult.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/qrcode/BC_QRDetectorResult.h" + CBC_QRDetectorResult::CBC_QRDetectorResult(CBC_CommonBitMatrix* bits, CFX_PtrArray* points) : m_bits(bits), m_points(points) {} diff --git a/xfa/src/fxbarcode/qrcode/BC_QRDetectorResult.h b/xfa/src/fxbarcode/qrcode/BC_QRDetectorResult.h index 3086cb8c95..50381d9742 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRDetectorResult.h +++ b/xfa/src/fxbarcode/qrcode/BC_QRDetectorResult.h @@ -7,8 +7,11 @@ #ifndef XFA_SRC_FXBARCODE_QRCODE_BC_QRDETECTORRESULT_H_ #define XFA_SRC_FXBARCODE_QRCODE_BC_QRDETECTORRESULT_H_ +#include "core/include/fxcrt/fx_basic.h" + class CBC_CommonBitMatrix; class CBC_ResultPoint; + class CBC_QRDetectorResult { private: CBC_CommonBitMatrix* m_bits; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.cpp b/xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.cpp index c368f5742a..b4482cae1d 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.cpp @@ -21,8 +21,8 @@ */ #include "xfa/src/fxbarcode/BC_ResultPoint.h" -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.h" + CBC_QRFinderPattern::CBC_QRFinderPattern(FX_FLOAT x, FX_FLOAT posY, FX_FLOAT estimatedModuleSize) diff --git a/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp b/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp index 58ac1c0df4..d143e276bb 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp @@ -20,16 +20,19 @@ * 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/common/BC_CommonBitMatrix.h" #include "xfa/src/fxbarcode/qrcode/BC_FinderPatternInfo.h" #include "xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.h" #include "xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.h" +#include "xfa/src/fxbarcode/utils.h" + const int32_t CBC_QRFinderPatternFinder::CENTER_QUORUM = 2; const int32_t CBC_QRFinderPatternFinder::MIN_SKIP = 3; const int32_t CBC_QRFinderPatternFinder::MAX_MODULES = 57; const int32_t CBC_QRFinderPatternFinder::INTEGER_MATH_SHIFT = 8; + CBC_QRFinderPatternFinder::CBC_QRFinderPatternFinder( CBC_CommonBitMatrix* image) { m_image = image; diff --git a/xfa/src/fxbarcode/qrcode/BC_QRGridSampler.cpp b/xfa/src/fxbarcode/qrcode/BC_QRGridSampler.cpp index f78c543476..7b9fe7b4f3 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRGridSampler.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRGridSampler.cpp @@ -20,11 +20,13 @@ * limitations under the License. */ -#include "xfa/src/fxbarcode/barcode.h" #include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h" #include "xfa/src/fxbarcode/common/BC_CommonPerspectiveTransform.h" #include "xfa/src/fxbarcode/qrcode/BC_QRGridSampler.h" +#include "xfa/src/fxbarcode/utils.h" + CBC_QRGridSampler CBC_QRGridSampler::m_gridSampler; + CBC_QRGridSampler::CBC_QRGridSampler() {} CBC_QRGridSampler::~CBC_QRGridSampler() {} CBC_QRGridSampler& CBC_QRGridSampler::GetInstance() { |