summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/oned
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-03-21 15:15:56 -0400
committerDan Sinclair <dsinclair@chromium.org>2016-03-21 15:15:56 -0400
commita98600aeb8d815c297834aa5006f5c3ea20dde6d (patch)
treef5e8d107353a1355378f096098c58b01b3d8f828 /xfa/fxbarcode/oned
parent69bbb0010cb83a7fa63d0901df6aef1de0ccfc0c (diff)
downloadpdfium-a98600aeb8d815c297834aa5006f5c3ea20dde6d.tar.xz
Move xfa/include/fxbarcode/BC_Barcode.h to xfa/fxbarcode.
This CL splits apart the larger header into individual class headers in the xfa/fxbarcode directory. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1816133002 .
Diffstat (limited to 'xfa/fxbarcode/oned')
-rw-r--r--xfa/fxbarcode/oned/BC_OneDimWriter.h35
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h16
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode128Reader.h4
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp6
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode128Writer.h21
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode39Reader.cpp1
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode39Reader.h16
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode39Writer.h10
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN13Reader.h13
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN13Writer.h16
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN8Reader.h5
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN8Writer.h13
-rw-r--r--xfa/fxbarcode/oned/BC_OnedUPCAReader.h18
-rw-r--r--xfa/fxbarcode/oned/BC_OnedUPCAWriter.h18
14 files changed, 125 insertions, 67 deletions
diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.h b/xfa/fxbarcode/oned/BC_OneDimWriter.h
index e91a9297e1..b015070968 100644
--- a/xfa/fxbarcode/oned/BC_OneDimWriter.h
+++ b/xfa/fxbarcode/oned/BC_OneDimWriter.h
@@ -9,7 +9,7 @@
#include "core/include/fxge/fx_ge.h"
#include "xfa/fxbarcode/BC_Writer.h"
-#include "xfa/include/fxbarcode/BC_BarCode.h"
+#include "xfa/fxbarcode/include/BC_Library.h"
class CBC_CommonBitMatrix;
class CFX_Font;
@@ -19,6 +19,7 @@ class CBC_OneDimWriter : public CBC_Writer {
public:
CBC_OneDimWriter();
virtual ~CBC_OneDimWriter();
+
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
@@ -35,6 +36,7 @@ class CBC_OneDimWriter : public CBC_Writer {
int32_t& e) {
return NULL;
}
+
virtual void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
@@ -65,21 +67,6 @@ class CBC_OneDimWriter : public CBC_Writer {
virtual FX_BOOL SetFont(CFX_Font* cFont);
protected:
- FX_BOOL m_bPrintChecksum;
- int32_t m_iDataLenth;
- FX_BOOL m_bCalcChecksum;
- CFX_Font* m_pFont;
- FX_FLOAT m_fFontSize;
- int32_t m_iFontStyle;
- FX_DWORD m_fontColor;
- BC_TEXT_LOC m_locTextLoc;
- int32_t m_iContentLen;
- FX_BOOL m_bLeftPadding;
- FX_BOOL m_bRightPadding;
- CBC_CommonBitMatrix* m_output;
- int32_t m_barWidth;
- int32_t m_multiple;
- FX_FLOAT m_outputHScale;
void CalcTextInfo(const CFX_ByteString& text,
FXTEXT_CHARPOS* charPos,
CFX_Font* cFont,
@@ -115,6 +102,22 @@ class CBC_OneDimWriter : public CBC_Writer {
int32_t startColor,
int32_t& e);
FX_WCHAR Upper(FX_WCHAR ch);
+
+ FX_BOOL m_bPrintChecksum;
+ int32_t m_iDataLenth;
+ FX_BOOL m_bCalcChecksum;
+ CFX_Font* m_pFont;
+ FX_FLOAT m_fFontSize;
+ int32_t m_iFontStyle;
+ FX_DWORD m_fontColor;
+ BC_TEXT_LOC m_locTextLoc;
+ int32_t m_iContentLen;
+ FX_BOOL m_bLeftPadding;
+ FX_BOOL m_bRightPadding;
+ CBC_CommonBitMatrix* m_output;
+ int32_t m_barWidth;
+ int32_t m_multiple;
+ FX_FLOAT m_outputHScale;
};
#endif // XFA_FXBARCODE_ONED_BC_ONEDIMWRITER_H_
diff --git a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h
index 92a31bd989..53af246796 100644
--- a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h
+++ b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h
@@ -7,13 +7,16 @@
#ifndef XFA_FXBARCODE_ONED_BC_ONEDCODABARWRITER_H_
#define XFA_FXBARCODE_ONED_BC_ONEDCODABARWRITER_H_
-enum BC_TEXT_LOC;
-class CBC_OneDimWriter;
-class CBC_OnedCodaBarWriter;
+#include "core/include/fxcrt/fx_string.h"
+#include "core/include/fxcrt/fx_system.h"
+#include "xfa/fxbarcode/include/BC_Library.h"
+#include "xfa/fxbarcode/oned/BC_OneDimWriter.h"
+
class CBC_OnedCodaBarWriter : public CBC_OneDimWriter {
public:
CBC_OnedCodaBarWriter();
virtual ~CBC_OnedCodaBarWriter();
+
uint8_t* Encode(const CFX_ByteString& contents,
int32_t& outLength,
int32_t& e);
@@ -28,6 +31,7 @@ class CBC_OnedCodaBarWriter : public CBC_OneDimWriter {
int32_t& outHeight,
int32_t hints,
int32_t& e);
+
CFX_WideString encodedContents(const CFX_WideStringC& contents);
FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
CFX_WideString FilterContents(const CFX_WideStringC& contents);
@@ -39,13 +43,15 @@ class CBC_OnedCodaBarWriter : public CBC_OneDimWriter {
FX_BOOL FindChar(FX_WCHAR ch, FX_BOOL isContent);
private:
+ static const FX_CHAR START_END_CHARS[];
+ static const FX_CHAR CONTENT_CHARS[];
+
void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
FX_BOOL isDevice,
int32_t& e);
- static const FX_CHAR START_END_CHARS[];
- static const FX_CHAR CONTENT_CHARS[];
+
FX_CHAR m_chStart;
FX_CHAR m_chEnd;
int32_t m_iWideNarrRatio;
diff --git a/xfa/fxbarcode/oned/BC_OnedCode128Reader.h b/xfa/fxbarcode/oned/BC_OnedCode128Reader.h
index d9ac4853bf..df21d7a220 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode128Reader.h
+++ b/xfa/fxbarcode/oned/BC_OnedCode128Reader.h
@@ -7,8 +7,10 @@
#ifndef XFA_FXBARCODE_ONED_BC_ONEDCODE128READER_H_
#define XFA_FXBARCODE_ONED_BC_ONEDCODE128READER_H_
-class CBC_OneDReader;
+#include "xfa/fxbarcode/oned/BC_OneDReader.h"
+
class CBC_CommonBitArray;
+
class CBC_OnedCode128Reader : public CBC_OneDReader {
public:
CBC_OnedCode128Reader();
diff --git a/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp b/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp
index 4d759b48a3..ac05e78910 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp
@@ -27,12 +27,6 @@
#include "xfa/fxbarcode/oned/BC_OnedCode128Reader.h"
#include "xfa/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/fxbarcode/oned/BC_OnedCode128Writer.h b/xfa/fxbarcode/oned/BC_OnedCode128Writer.h
index 9be05a19b0..5b68d5cd2e 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode128Writer.h
+++ b/xfa/fxbarcode/oned/BC_OnedCode128Writer.h
@@ -7,12 +7,16 @@
#ifndef XFA_FXBARCODE_ONED_BC_ONEDCODE128WRITER_H_
#define XFA_FXBARCODE_ONED_BC_ONEDCODE128WRITER_H_
-class CBC_OneDimWriter;
+#include "core/include/fxcrt/fx_string.h"
+#include "core/include/fxcrt/fx_system.h"
+#include "xfa/fxbarcode/oned/BC_OneDimWriter.h"
+
class CBC_OnedCode128Writer : public CBC_OneDimWriter {
public:
CBC_OnedCode128Writer();
- CBC_OnedCode128Writer(BC_TYPE type);
+ explicit CBC_OnedCode128Writer(BC_TYPE type);
virtual ~CBC_OnedCode128Writer();
+
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
@@ -27,23 +31,26 @@ class CBC_OnedCode128Writer : public CBC_OneDimWriter {
uint8_t* Encode(const CFX_ByteString& contents,
int32_t& outLength,
int32_t& e);
+
FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
CFX_WideString FilterContents(const CFX_WideStringC& contents);
FX_BOOL SetTextLocation(BC_TEXT_LOC location);
BC_TYPE GetType();
private:
+ static const int32_t CODE_CODE_B = 100;
+ static const int32_t CODE_CODE_C = 99;
+ static const int32_t CODE_START_B = 104;
+ static const int32_t CODE_START_C = 105;
+ static const int32_t CODE_STOP = 106;
+
FX_BOOL IsDigits(const CFX_ByteString& contents,
int32_t start,
int32_t length);
int32_t Encode128B(const CFX_ByteString& contents, CFX_PtrArray& patterns);
int32_t Encode128C(const CFX_ByteString& contents, CFX_PtrArray& patterns);
+
BC_TYPE m_codeFormat;
- static const int32_t CODE_START_B;
- static const int32_t CODE_START_C;
- static const int32_t CODE_CODE_B;
- static const int32_t CODE_CODE_C;
- static const int32_t CODE_STOP;
};
#endif // XFA_FXBARCODE_ONED_BC_ONEDCODE128WRITER_H_
diff --git a/xfa/fxbarcode/oned/BC_OnedCode39Reader.cpp b/xfa/fxbarcode/oned/BC_OnedCode39Reader.cpp
index e2f88e7a79..0eb4c990b4 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode39Reader.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCode39Reader.cpp
@@ -38,7 +38,6 @@ const int32_t CBC_OnedCode39Reader::CHARACTER_ENCODINGS[44] = {
0x04C, 0x01C, 0x103, 0x043, 0x142, 0x013, 0x112, 0x052, 0x007,
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/fxbarcode/oned/BC_OnedCode39Reader.h b/xfa/fxbarcode/oned/BC_OnedCode39Reader.h
index f1551e4761..315ffa6faf 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode39Reader.h
+++ b/xfa/fxbarcode/oned/BC_OnedCode39Reader.h
@@ -7,30 +7,36 @@
#ifndef XFA_FXBARCODE_ONED_BC_ONEDCODE39READER_H_
#define XFA_FXBARCODE_ONED_BC_ONEDCODE39READER_H_
-class CBC_OneDReader;
+#include "core/include/fxcrt/fx_system.h"
+#include "xfa/fxbarcode/oned/BC_OneDReader.h"
+
class CBC_CommonBitArray;
+
class CBC_OnedCode39Reader : public CBC_OneDReader {
public:
static const FX_CHAR* ALPHABET_STRING;
static const FX_CHAR* CHECKSUM_STRING;
static const int32_t CHARACTER_ENCODINGS[44];
- static const int32_t ASTERISK_ENCODING;
+ static const int32_t ASTERISK_ENCODING = 0x094;
+
CBC_OnedCode39Reader();
- CBC_OnedCode39Reader(FX_BOOL usingCheckDigit);
+ explicit CBC_OnedCode39Reader(FX_BOOL usingCheckDigit);
CBC_OnedCode39Reader(FX_BOOL usingCheckDigit, FX_BOOL extendedMode);
virtual ~CBC_OnedCode39Reader();
+
CFX_ByteString DecodeRow(int32_t rowNumber,
CBC_CommonBitArray* row,
int32_t hints,
int32_t& e);
private:
- FX_BOOL m_usingCheckDigit;
- FX_BOOL m_extendedMode;
CFX_Int32Array* FindAsteriskPattern(CBC_CommonBitArray* row, int32_t& e);
int32_t ToNarrowWidePattern(CFX_Int32Array* counters);
FX_CHAR PatternToChar(int32_t pattern, int32_t& e);
CFX_ByteString DecodeExtended(CFX_ByteString& encoded, int32_t& e);
+
+ FX_BOOL m_usingCheckDigit;
+ FX_BOOL m_extendedMode;
};
#endif // XFA_FXBARCODE_ONED_BC_ONEDCODE39READER_H_
diff --git a/xfa/fxbarcode/oned/BC_OnedCode39Writer.h b/xfa/fxbarcode/oned/BC_OnedCode39Writer.h
index b438727130..f2c340b3fb 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode39Writer.h
+++ b/xfa/fxbarcode/oned/BC_OnedCode39Writer.h
@@ -7,13 +7,15 @@
#ifndef XFA_FXBARCODE_ONED_BC_ONEDCODE39WRITER_H_
#define XFA_FXBARCODE_ONED_BC_ONEDCODE39WRITER_H_
-enum BC_TEXT_LOC;
-class CBC_OneDimWriter;
+#include "xfa/fxbarcode/include/BC_Library.h"
+#include "xfa/fxbarcode/oned/BC_OneDimWriter.h"
+
class CBC_OnedCode39Writer : public CBC_OneDimWriter {
public:
CBC_OnedCode39Writer();
- CBC_OnedCode39Writer(FX_BOOL extendedMode);
+ explicit CBC_OnedCode39Writer(FX_BOOL extendedMode);
virtual ~CBC_OnedCode39Writer();
+
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
@@ -33,6 +35,7 @@ class CBC_OnedCode39Writer : public CBC_OneDimWriter {
int32_t codeLength,
FX_BOOL isDevice,
int32_t& e);
+
CFX_WideString encodedContents(const CFX_WideStringC& contents, int32_t& e);
FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
FX_BOOL CheckExtendedContentValidity(const CFX_WideStringC& contents);
@@ -46,6 +49,7 @@ class CBC_OnedCode39Writer : public CBC_OneDimWriter {
private:
void ToIntArray(int32_t a, int32_t* toReturn);
FX_CHAR CalcCheckSum(const CFX_ByteString& contents, int32_t& e);
+
int32_t m_iWideNarrRatio;
FX_BOOL m_extendedMode;
};
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Reader.h b/xfa/fxbarcode/oned/BC_OnedEAN13Reader.h
index 0d9d614901..4d01e42abf 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN13Reader.h
+++ b/xfa/fxbarcode/oned/BC_OnedEAN13Reader.h
@@ -6,12 +6,18 @@
#ifndef XFA_FXBARCODE_ONED_BC_ONEDEAN13READER_H_
#define XFA_FXBARCODE_ONED_BC_ONEDEAN13READER_H_
-class CBC_OneDimReader;
+
+#include "core/include/fxcrt/fx_string.h"
+#include "core/include/fxcrt/fx_system.h"
+#include "xfa/fxbarcode/oned/BC_OneDimReader.h"
+
class CBC_CommonBitArray;
-class CBC_OnedEAN13Reader;
+class CBC_OnedUPCAReader;
+
class CBC_OnedEAN13Reader : public CBC_OneDimReader {
public:
static const int32_t FIRST_DIGIT_ENCODINGS[10];
+
CBC_OnedEAN13Reader();
virtual ~CBC_OnedEAN13Reader();
@@ -21,11 +27,12 @@ class CBC_OnedEAN13Reader : public CBC_OneDimReader {
int32_t& e);
protected:
+ friend class CBC_OnedUPCAReader;
+
int32_t DecodeMiddle(CBC_CommonBitArray* row,
CFX_Int32Array* startRange,
CFX_ByteString& resultString,
int32_t& e);
- friend class CBC_OnedUPCAReader;
};
#endif // XFA_FXBARCODE_ONED_BC_ONEDEAN13READER_H_
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h
index fd23129975..de17ac713e 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h
+++ b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h
@@ -7,12 +7,14 @@
#ifndef XFA_FXBARCODE_ONED_BC_ONEDEAN13WRITER_H_
#define XFA_FXBARCODE_ONED_BC_ONEDEAN13WRITER_H_
-class CBC_OneDimWriter;
-class CBC_OnedEAN13Writer;
-class CBC_OnedEAN13Writer : public CBC_OneDimWriter {
- private:
- int32_t m_codeWidth;
+#include "core/include/fxcrt/fx_string.h"
+#include "core/include/fxcrt/fx_system.h"
+#include "xfa/fxbarcode/oned/BC_OneDimWriter.h"
+class CFX_DIBitmap;
+class CFX_RenderDevice;
+
+class CBC_OnedEAN13Writer : public CBC_OneDimWriter {
public:
CBC_OnedEAN13Writer();
virtual ~CBC_OnedEAN13Writer();
@@ -31,6 +33,7 @@ class CBC_OnedEAN13Writer : public CBC_OneDimWriter {
uint8_t* Encode(const CFX_ByteString& contents,
int32_t& outLength,
int32_t& e);
+
void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
@@ -48,6 +51,9 @@ class CBC_OnedEAN13Writer : public CBC_OneDimWriter {
int32_t barWidth,
int32_t multiple,
int32_t& e);
+
+ private:
+ int32_t m_codeWidth;
};
#endif // XFA_FXBARCODE_ONED_BC_ONEDEAN13WRITER_H_
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN8Reader.h b/xfa/fxbarcode/oned/BC_OnedEAN8Reader.h
index fe2d33d66f..ab2d5e3178 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN8Reader.h
+++ b/xfa/fxbarcode/oned/BC_OnedEAN8Reader.h
@@ -7,9 +7,10 @@
#ifndef XFA_FXBARCODE_ONED_BC_ONEDEAN8READER_H_
#define XFA_FXBARCODE_ONED_BC_ONEDEAN8READER_H_
-class CBC_OneDimReader;
+#include "xfa/fxbarcode/oned/BC_OneDimReader.h"
+
class CBC_CommonBitArray;
-class CBC_OnedEAN8Reader;
+
class CBC_OnedEAN8Reader : public CBC_OneDimReader {
public:
CBC_OnedEAN8Reader();
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h
index fc033ffcbf..9110d94e20 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h
+++ b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h
@@ -7,9 +7,14 @@
#ifndef XFA_FXBARCODE_ONED_BC_ONEDEAN8WRITER_H_
#define XFA_FXBARCODE_ONED_BC_ONEDEAN8WRITER_H_
-enum BC_TEXT_LOC;
-class CBC_OneDimWriter;
-class CBC_OnedEAN8Writer;
+#include "core/include/fxcrt/fx_string.h"
+#include "core/include/fxcrt/fx_system.h"
+#include "xfa/fxbarcode/include/BC_Library.h"
+#include "xfa/fxbarcode/oned/BC_OneDimWriter.h"
+
+class CFX_DIBitmap;
+class CFX_RenderDevice;
+
class CBC_OnedEAN8Writer : public CBC_OneDimWriter {
private:
int32_t m_codeWidth;
@@ -17,6 +22,7 @@ class CBC_OnedEAN8Writer : public CBC_OneDimWriter {
public:
CBC_OnedEAN8Writer();
virtual ~CBC_OnedEAN8Writer();
+
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
@@ -31,6 +37,7 @@ class CBC_OnedEAN8Writer : public CBC_OneDimWriter {
uint8_t* Encode(const CFX_ByteString& contents,
int32_t& outLength,
int32_t& e);
+
void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAReader.h b/xfa/fxbarcode/oned/BC_OnedUPCAReader.h
index 306683e1cc..4d3f479b71 100644
--- a/xfa/fxbarcode/oned/BC_OnedUPCAReader.h
+++ b/xfa/fxbarcode/oned/BC_OnedUPCAReader.h
@@ -7,18 +7,21 @@
#ifndef XFA_FXBARCODE_ONED_BC_ONEDUPCAREADER_H_
#define XFA_FXBARCODE_ONED_BC_ONEDUPCAREADER_H_
+#include "core/include/fxcrt/fx_string.h"
+#include "core/include/fxcrt/fx_system.h"
+#include "xfa/fxbarcode/oned/BC_OneDimReader.h"
+
class CBC_BinaryBitmap;
class CBC_CommonBitArray;
-class CBC_OneDimReader;
class CBC_OnedEAN13Reader;
-class CBC_OnedUPCAReader;
-class CBC_OnedUPCAReader : public CBC_OneDimReader {
- private:
- CBC_OnedEAN13Reader* m_ean13Reader;
+class CBC_OnedUPCAReader : public CBC_OneDimReader {
public:
CBC_OnedUPCAReader();
virtual ~CBC_OnedUPCAReader();
+
+ virtual void Init();
+
CFX_ByteString DecodeRow(int32_t rowNumber,
CBC_CommonBitArray* row,
int32_t hints,
@@ -30,7 +33,6 @@ class CBC_OnedUPCAReader : public CBC_OneDimReader {
int32_t& e);
CFX_ByteString Decode(CBC_BinaryBitmap* image, int32_t& e);
CFX_ByteString Decode(CBC_BinaryBitmap* image, int32_t hints, int32_t& e);
- virtual void Init();
protected:
int32_t DecodeMiddle(CBC_CommonBitArray* row,
@@ -38,6 +40,10 @@ class CBC_OnedUPCAReader : public CBC_OneDimReader {
CFX_ByteString& resultString,
int32_t& e);
CFX_ByteString MaybeReturnResult(CFX_ByteString& result, int32_t& e);
+
+ private:
+ CBC_OnedEAN13Reader* m_ean13Reader;
+
};
#endif // XFA_FXBARCODE_ONED_BC_ONEDUPCAREADER_H_
diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
index f376929b1b..38f3ca57dd 100644
--- a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
+++ b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
@@ -7,16 +7,22 @@
#ifndef XFA_FXBARCODE_ONED_BC_ONEDUPCAWRITER_H_
#define XFA_FXBARCODE_ONED_BC_ONEDUPCAWRITER_H_
+#include "core/include/fxcrt/fx_string.h"
+#include "core/include/fxcrt/fx_system.h"
+#include "xfa/fxbarcode/oned/BC_OneDimWriter.h"
+
class CBC_OnedEAN13Writer;
-class CBC_OnedUPCAWriter;
-class CBC_OnedUPCAWriter : public CBC_OneDimWriter {
- private:
- CBC_OnedEAN13Writer* m_subWriter;
+class CFX_DIBitmap;
+class CFX_Matrix;
+class CFX_RenderDevice;
+class CBC_OnedUPCAWriter : public CBC_OneDimWriter {
public:
CBC_OnedUPCAWriter();
virtual ~CBC_OnedUPCAWriter();
+
virtual void Init();
+
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
@@ -33,6 +39,7 @@ class CBC_OnedUPCAWriter : public CBC_OneDimWriter {
int32_t& e) {
return nullptr;
}
+
void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
@@ -50,6 +57,9 @@ class CBC_OnedUPCAWriter : public CBC_OneDimWriter {
int32_t barWidth,
int32_t multiple,
int32_t& e);
+
+ private:
+ CBC_OnedEAN13Writer* m_subWriter;
};
#endif // XFA_FXBARCODE_ONED_BC_ONEDUPCAWRITER_H_