summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/oned
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fxbarcode/oned')
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDReader.cpp4
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDReader.h4
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDimReader.cpp4
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp1
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp5
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp3
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp3
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp3
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp4
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode39Writer.cpp2
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.cpp4
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp2
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.cpp3
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp2
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedUPCAReader.cpp4
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp2
16 files changed, 34 insertions, 16 deletions
diff --git a/xfa/src/fxbarcode/oned/BC_OneDReader.cpp b/xfa/src/fxbarcode/oned/BC_OneDReader.cpp
index 7e872d565a..0b699c9624 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDReader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OneDReader.cpp
@@ -24,11 +24,13 @@
#include "xfa/src/fxbarcode/BC_BinaryBitmap.h"
#include "xfa/src/fxbarcode/BC_Reader.h"
-#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitArray.h"
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
+#include "xfa/src/fxbarcode/utils.h"
+
const int32_t CBC_OneDReader::INTEGER_MATH_SHIFT = 8;
const int32_t CBC_OneDReader::PATTERN_MATCH_RESULT_SCALE_FACTOR = 1 << 8;
+
CBC_OneDReader::CBC_OneDReader() {}
CBC_OneDReader::~CBC_OneDReader() {}
CFX_ByteString CBC_OneDReader::Decode(CBC_BinaryBitmap* image, int32_t& e) {
diff --git a/xfa/src/fxbarcode/oned/BC_OneDReader.h b/xfa/src/fxbarcode/oned/BC_OneDReader.h
index 17e0934287..5a55d1f5e2 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDReader.h
+++ b/xfa/src/fxbarcode/oned/BC_OneDReader.h
@@ -7,10 +7,12 @@
#ifndef XFA_SRC_FXBARCODE_ONED_BC_ONEDREADER_H_
#define XFA_SRC_FXBARCODE_ONED_BC_ONEDREADER_H_
+#include "core/include/fxcrt/fx_basic.h"
+
class CBC_Reader;
class CBC_BinaryBitmap;
class CBC_CommonBitArray;
-class CBC_OneDReader;
+
class CBC_OneDReader : public CBC_Reader {
public:
CBC_OneDReader();
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp b/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
index 8de79c12c4..075e69f219 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
@@ -21,10 +21,11 @@
*/
#include "xfa/src/fxbarcode/BC_Reader.h"
-#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitArray.h"
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/oned/BC_OneDimReader.h"
+#include "xfa/src/fxbarcode/utils.h"
+
const int32_t CBC_OneDimReader::MAX_AVG_VARIANCE = (int32_t)(256 * 0.48f);
const int32_t CBC_OneDimReader::MAX_INDIVIDUAL_VARIANCE = (int32_t)(256 * 0.7f);
const int32_t CBC_OneDimReader::START_END_PATTERN[3] = {1, 1, 1};
@@ -37,6 +38,7 @@ const int32_t CBC_OneDimReader::L_AND_G_PATTERNS[20][4] = {
{1, 2, 3, 1}, {1, 1, 1, 4}, {1, 3, 1, 2}, {1, 2, 1, 3}, {3, 1, 1, 2},
{1, 1, 2, 3}, {1, 2, 2, 2}, {2, 2, 1, 2}, {1, 1, 4, 1}, {2, 3, 1, 1},
{1, 3, 2, 1}, {4, 1, 1, 1}, {2, 1, 3, 1}, {3, 1, 2, 1}, {2, 1, 1, 3}};
+
CBC_OneDimReader::CBC_OneDimReader() {}
CBC_OneDimReader::~CBC_OneDimReader() {}
CFX_Int32Array* CBC_OneDimReader::FindStartGuardPattern(CBC_CommonBitArray* row,
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
index be2a71b1ef..ed93e9852b 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -26,7 +26,6 @@
#include <memory>
#include "xfa/src/fxbarcode/BC_Writer.h"
-#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h"
CBC_OneDimWriter::CBC_OneDimWriter() {
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp
index 0c395712cb..d7caf68226 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp
@@ -22,12 +22,14 @@
#include <algorithm>
+#include "core/include/fxcrt/fx_basic.h"
#include "xfa/src/fxbarcode/BC_Reader.h"
-#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitArray.h"
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h"
#include "xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h"
+#include "xfa/src/fxbarcode/utils.h"
+
const FX_CHAR* CBC_OnedCodaBarReader::ALPHABET_STRING =
"0123456789-$:/.+ABCDTN";
const int32_t CBC_OnedCodaBarReader::CHARACTER_ENCODINGS[22] = {
@@ -37,6 +39,7 @@ const int32_t CBC_OnedCodaBarReader::CHARACTER_ENCODINGS[22] = {
const int32_t CBC_OnedCodaBarReader::minCharacterLength = 3;
const FX_CHAR CBC_OnedCodaBarReader::STARTEND_ENCODING[8] = {
'E', '*', 'A', 'B', 'C', 'D', 'T', 'N'};
+
CBC_OnedCodaBarReader::CBC_OnedCodaBarReader() {}
CBC_OnedCodaBarReader::~CBC_OnedCodaBarReader() {}
CFX_ByteString CBC_OnedCodaBarReader::DecodeRow(int32_t rowNumber,
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
index a70415fb3a..f056c17616 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
@@ -22,18 +22,19 @@
#include "xfa/src/fxbarcode/BC_Reader.h"
#include "xfa/src/fxbarcode/BC_Writer.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/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/oned/BC_OneDimWriter.h"
#include "xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h"
#include "xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h"
+
const FX_CHAR CBC_OnedCodaBarWriter::START_END_CHARS[] = {
'A', 'B', 'C', 'D', 'T', 'N', '*', 'E', 'a', 'b', 'c', 'd', 't', 'n', 'e'};
const FX_CHAR CBC_OnedCodaBarWriter::CONTENT_CHARS[] = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', '-', '$', '/', ':', '+', '.'};
+
CBC_OnedCodaBarWriter::CBC_OnedCodaBarWriter() {
m_chStart = 'A';
m_chEnd = 'B';
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp
index b2e978c650..8d9671089b 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp
@@ -23,10 +23,11 @@
#include <algorithm>
#include "xfa/src/fxbarcode/BC_Reader.h"
-#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitArray.h"
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/oned/BC_OnedCode128Reader.h"
+#include "xfa/src/fxbarcode/utils.h"
+
const int32_t CBC_OnedCode128Reader::CODE_PATTERNS[107][7] = {
{2, 1, 2, 2, 2, 2, 0}, {2, 2, 2, 1, 2, 2, 0}, {2, 2, 2, 2, 2, 1, 0},
{1, 2, 1, 2, 2, 3, 0}, {1, 2, 1, 3, 2, 2, 0}, {1, 3, 1, 2, 2, 2, 0},
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp
index 045dacb6ea..c8977d3171 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp
@@ -22,16 +22,17 @@
#include "xfa/src/fxbarcode/BC_Reader.h"
#include "xfa/src/fxbarcode/BC_Writer.h"
-#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/oned/BC_OneDimWriter.h"
#include "xfa/src/fxbarcode/oned/BC_OnedCode128Reader.h"
#include "xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h"
+
const int32_t CBC_OnedCode128Writer::CODE_CODE_B = 100;
const int32_t CBC_OnedCode128Writer::CODE_CODE_C = 99;
const int32_t CBC_OnedCode128Writer::CODE_START_B = 104;
const int32_t CBC_OnedCode128Writer::CODE_START_C = 105;
const int32_t CBC_OnedCode128Writer::CODE_STOP = 106;
+
CBC_OnedCode128Writer::CBC_OnedCode128Writer() {
m_codeFormat = BC_CODE128_B;
}
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp
index 3b13b671ca..73999a4818 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp
@@ -23,10 +23,11 @@
#include <algorithm>
#include "xfa/src/fxbarcode/BC_Reader.h"
-#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitArray.h"
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h"
+#include "xfa/src/fxbarcode/utils.h"
+
const FX_CHAR* CBC_OnedCode39Reader::ALPHABET_STRING =
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%";
const FX_CHAR* CBC_OnedCode39Reader::CHECKSUM_STRING =
@@ -38,6 +39,7 @@ const int32_t CBC_OnedCode39Reader::CHARACTER_ENCODINGS[44] = {
0x106, 0x046, 0x016, 0x181, 0x0C1, 0x1C0, 0x091, 0x190, 0x0D0,
0x085, 0x184, 0x0C4, 0x094, 0x0A8, 0x0A2, 0x08A, 0x02A};
const int32_t CBC_OnedCode39Reader::ASTERISK_ENCODING = 0x094;
+
CBC_OnedCode39Reader::CBC_OnedCode39Reader()
: m_usingCheckDigit(FALSE), m_extendedMode(FALSE) {
}
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.cpp
index 02de5f224f..5b33965622 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.cpp
@@ -22,12 +22,12 @@
#include "xfa/src/fxbarcode/BC_Reader.h"
#include "xfa/src/fxbarcode/BC_Writer.h"
-#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h"
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/oned/BC_OneDimWriter.h"
#include "xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h"
#include "xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h"
+
CBC_OnedCode39Writer::CBC_OnedCode39Writer() {
m_extendedMode = FALSE;
m_iWideNarrRatio = 3;
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.cpp
index d5ac09ed39..fe05069d4f 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.cpp
@@ -21,13 +21,15 @@
*/
#include "xfa/src/fxbarcode/BC_Reader.h"
-#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitArray.h"
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/oned/BC_OneDimReader.h"
#include "xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.h"
+#include "xfa/src/fxbarcode/utils.h"
+
const int32_t CBC_OnedEAN13Reader::FIRST_DIGIT_ENCODINGS[10] = {
0x00, 0x0B, 0x0D, 0xE, 0x13, 0x19, 0x1C, 0x15, 0x16, 0x1A};
+
CBC_OnedEAN13Reader::CBC_OnedEAN13Reader() {}
CBC_OnedEAN13Reader::~CBC_OnedEAN13Reader() {}
void CBC_OnedEAN13Reader::DetermineFirstDigit(CFX_ByteString& result,
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp
index a291b1ac24..9b8456d6ed 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp
@@ -22,12 +22,12 @@
#include "xfa/src/fxbarcode/BC_Reader.h"
#include "xfa/src/fxbarcode/BC_Writer.h"
-#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/oned/BC_OneDimReader.h"
#include "xfa/src/fxbarcode/oned/BC_OneDimWriter.h"
#include "xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.h"
#include "xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.h"
+
CBC_OnedEAN13Writer::CBC_OnedEAN13Writer() {
m_bLeftPadding = TRUE;
m_codeWidth = 3 + (7 * 6) + 5 + (7 * 6) + 3;
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.cpp
index 21a6fb30e3..503454f71f 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.cpp
@@ -21,11 +21,12 @@
*/
#include "xfa/src/fxbarcode/BC_Reader.h"
-#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitArray.h"
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/oned/BC_OneDimReader.h"
#include "xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.h"
+#include "xfa/src/fxbarcode/utils.h"
+
CBC_OnedEAN8Reader::CBC_OnedEAN8Reader() {}
CBC_OnedEAN8Reader::~CBC_OnedEAN8Reader() {}
int32_t CBC_OnedEAN8Reader::DecodeMiddle(CBC_CommonBitArray* row,
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp
index ae557866ec..f552531e63 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp
@@ -22,12 +22,12 @@
#include "xfa/src/fxbarcode/BC_Reader.h"
#include "xfa/src/fxbarcode/BC_Writer.h"
-#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h"
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/oned/BC_OneDimReader.h"
#include "xfa/src/fxbarcode/oned/BC_OneDimWriter.h"
#include "xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.h"
+
CBC_OnedEAN8Writer::CBC_OnedEAN8Writer() {
m_iDataLenth = 8;
m_codeWidth = 3 + (7 * 4) + 5 + (7 * 4) + 3;
diff --git a/xfa/src/fxbarcode/oned/BC_OnedUPCAReader.cpp b/xfa/src/fxbarcode/oned/BC_OnedUPCAReader.cpp
index 3f524cd210..14040632a7 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedUPCAReader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedUPCAReader.cpp
@@ -20,12 +20,14 @@
* limitations under the License.
*/
+#include "core/include/fxcrt/fx_basic.h"
#include "xfa/src/fxbarcode/BC_Reader.h"
-#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/oned/BC_OneDimReader.h"
#include "xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.h"
#include "xfa/src/fxbarcode/oned/BC_OnedUPCAReader.h"
+#include "xfa/src/fxbarcode/utils.h"
+
CBC_OnedUPCAReader::CBC_OnedUPCAReader() {
m_ean13Reader = NULL;
}
diff --git a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp
index be626c6a1e..08a849f362 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp
@@ -21,10 +21,10 @@
*/
#include "xfa/src/fxbarcode/BC_Writer.h"
-#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/oned/BC_OneDimWriter.h"
#include "xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.h"
#include "xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h"
+
CBC_OnedUPCAWriter::CBC_OnedUPCAWriter() {
m_subWriter = NULL;
m_bLeftPadding = TRUE;