summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/oned
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxbarcode/oned')
-rw-r--r--xfa/fxbarcode/oned/BC_OneDReader.cpp6
-rw-r--r--xfa/fxbarcode/oned/BC_OneDReader.h17
-rw-r--r--xfa/fxbarcode/oned/BC_OneDimReader.h20
-rw-r--r--xfa/fxbarcode/oned/BC_OneDimWriter.cpp24
-rw-r--r--xfa/fxbarcode/oned/BC_OneDimWriter.h67
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCodaBarReader.h7
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h31
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode128Reader.h12
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode128Writer.h15
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode39Reader.h5
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode39Writer.h34
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN13Reader.h16
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN13Writer.h19
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN8Reader.h4
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN8Writer.h26
-rw-r--r--xfa/fxbarcode/oned/BC_OnedUPCAReader.h17
-rw-r--r--xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp6
-rw-r--r--xfa/fxbarcode/oned/BC_OnedUPCAWriter.h19
18 files changed, 198 insertions, 147 deletions
diff --git a/xfa/fxbarcode/oned/BC_OneDReader.cpp b/xfa/fxbarcode/oned/BC_OneDReader.cpp
index c66ec0bebd..53ff9a480c 100644
--- a/xfa/fxbarcode/oned/BC_OneDReader.cpp
+++ b/xfa/fxbarcode/oned/BC_OneDReader.cpp
@@ -43,6 +43,12 @@ CFX_ByteString CBC_OneDReader::Decode(CBC_BinaryBitmap* image,
BC_EXCEPTION_CHECK_ReturnValue(e, "");
return strtemp;
}
+CFX_ByteString CBC_OneDReader::DecodeRow(int32_t rowNumber,
+ CBC_CommonBitArray* row,
+ int32_t hints,
+ int32_t& e) {
+ return "";
+}
CFX_ByteString CBC_OneDReader::DeDecode(CBC_BinaryBitmap* image,
int32_t hints,
int32_t& e) {
diff --git a/xfa/fxbarcode/oned/BC_OneDReader.h b/xfa/fxbarcode/oned/BC_OneDReader.h
index 2bab06e9b8..77e04777a4 100644
--- a/xfa/fxbarcode/oned/BC_OneDReader.h
+++ b/xfa/fxbarcode/oned/BC_OneDReader.h
@@ -15,17 +15,18 @@ class CBC_CommonBitArray;
class CBC_OneDReader : public CBC_Reader {
public:
CBC_OneDReader();
- virtual ~CBC_OneDReader();
- virtual CFX_ByteString Decode(CBC_BinaryBitmap* image, int32_t& e);
- virtual CFX_ByteString Decode(CBC_BinaryBitmap* image,
- int32_t hints,
- int32_t& e);
+ ~CBC_OneDReader() override;
+
+ // CBC_Reader
+ CFX_ByteString Decode(CBC_BinaryBitmap* image, int32_t& e) override;
+ CFX_ByteString Decode(CBC_BinaryBitmap* image,
+ int32_t hints,
+ int32_t& e) override;
+
virtual CFX_ByteString DecodeRow(int32_t rowNumber,
CBC_CommonBitArray* row,
int32_t hints,
- int32_t& e) {
- return "";
- }
+ int32_t& e);
private:
CFX_ByteString DeDecode(CBC_BinaryBitmap* image, int32_t hints, int32_t& e);
diff --git a/xfa/fxbarcode/oned/BC_OneDimReader.h b/xfa/fxbarcode/oned/BC_OneDimReader.h
index f572d6fd1e..bd46a189f4 100644
--- a/xfa/fxbarcode/oned/BC_OneDimReader.h
+++ b/xfa/fxbarcode/oned/BC_OneDimReader.h
@@ -26,17 +26,19 @@ class CBC_OneDimReader : public CBC_OneDReader {
static const int32_t L_AND_G_PATTERNS[20][4];
CBC_OneDimReader();
- virtual ~CBC_OneDimReader();
+ ~CBC_OneDimReader() override;
+ // CBC_OneDReader
CFX_ByteString DecodeRow(int32_t rowNumber,
CBC_CommonBitArray* row,
int32_t hints,
- int32_t& e);
- CFX_ByteString DecodeRow(int32_t rowNumber,
- CBC_CommonBitArray* row,
- CFX_Int32Array* startGuardRange,
- int32_t hints,
- int32_t& e);
+ int32_t& e) override;
+
+ virtual CFX_ByteString DecodeRow(int32_t rowNumber,
+ CBC_CommonBitArray* row,
+ CFX_Int32Array* startGuardRange,
+ int32_t hints,
+ int32_t& e);
protected:
CFX_Int32Array* FindStartGuardPattern(CBC_CommonBitArray* row, int32_t& e);
@@ -55,9 +57,7 @@ class CBC_OneDimReader : public CBC_OneDReader {
virtual int32_t DecodeMiddle(CBC_CommonBitArray* row,
CFX_Int32Array* startRange,
CFX_ByteString& resultResult,
- int32_t& e) {
- return 0;
- }
+ int32_t& e) = 0;
virtual CFX_Int32Array* DecodeEnd(CBC_CommonBitArray* row,
int32_t endStart,
int32_t& e);
diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
index eee2893dde..109fb8f992 100644
--- a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -101,6 +101,13 @@ uint8_t* CBC_OneDimWriter::Encode(const CFX_ByteString& contents,
BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return ret;
}
+
+uint8_t* CBC_OneDimWriter::Encode(const CFX_ByteString& contents,
+ int32_t& outLength,
+ int32_t& e) {
+ return nullptr;
+}
+
int32_t CBC_OneDimWriter::AppendPattern(uint8_t* target,
int32_t pos,
const int32_t* pattern,
@@ -123,6 +130,7 @@ int32_t CBC_OneDimWriter::AppendPattern(uint8_t* target,
}
return numAdded;
}
+
void CBC_OneDimWriter::CalcTextInfo(const CFX_ByteString& text,
FXTEXT_CHARPOS* charPos,
CFX_Font* cFont,
@@ -361,6 +369,7 @@ void CBC_OneDimWriter::RenderDeviceResult(CFX_RenderDevice* device,
BC_EXCEPTION_CHECK_ReturnVoid(e);
}
}
+
void CBC_OneDimWriter::RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
@@ -436,3 +445,18 @@ void CBC_OneDimWriter::RenderResult(const CFX_WideStringC& contents,
outputX += m_multiple;
}
}
+
+FX_BOOL CBC_OneDimWriter::CheckContentValidity(
+ const CFX_WideStringC& contents) {
+ return TRUE;
+}
+
+CFX_WideString CBC_OneDimWriter::FilterContents(
+ const CFX_WideStringC& contents) {
+ return CFX_WideString();
+}
+
+CFX_WideString CBC_OneDimWriter::RenderTextContents(
+ const CFX_WideStringC& contents) {
+ return CFX_WideString();
+}
diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.h b/xfa/fxbarcode/oned/BC_OneDimWriter.h
index a0a076217a..10eccf9eea 100644
--- a/xfa/fxbarcode/oned/BC_OneDimWriter.h
+++ b/xfa/fxbarcode/oned/BC_OneDimWriter.h
@@ -18,24 +18,22 @@ class CFX_RenderDevice;
class CBC_OneDimWriter : public CBC_Writer {
public:
CBC_OneDimWriter();
- virtual ~CBC_OneDimWriter();
+ ~CBC_OneDimWriter() override;
- uint8_t* Encode(const CFX_ByteString& contents,
- BCFORMAT format,
- int32_t& outWidth,
- int32_t& outHeight,
- int32_t& e);
- uint8_t* Encode(const CFX_ByteString& contents,
- BCFORMAT format,
- int32_t& outWidth,
- int32_t& outHeight,
- int32_t hints,
- int32_t& e);
+ virtual uint8_t* Encode(const CFX_ByteString& contents,
+ BCFORMAT format,
+ int32_t& outWidth,
+ int32_t& outHeight,
+ int32_t& e);
+ virtual uint8_t* Encode(const CFX_ByteString& contents,
+ BCFORMAT format,
+ int32_t& outWidth,
+ int32_t& outHeight,
+ int32_t hints,
+ int32_t& e);
virtual uint8_t* Encode(const CFX_ByteString& contents,
int32_t& outLength,
- int32_t& e) {
- return nullptr;
- }
+ int32_t& e);
virtual void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
@@ -49,30 +47,24 @@ class CBC_OneDimWriter : public CBC_Writer {
const CFX_Matrix* matrix,
const CFX_WideStringC& contents,
int32_t& e);
- virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) {
- return TRUE;
- }
- virtual CFX_WideString FilterContents(const CFX_WideStringC& contents) {
- return CFX_WideString();
- }
- virtual CFX_WideString RenderTextContents(const CFX_WideStringC& contents) {
- return CFX_WideString();
- }
+ virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
+ virtual CFX_WideString FilterContents(const CFX_WideStringC& contents);
+ virtual CFX_WideString RenderTextContents(const CFX_WideStringC& contents);
virtual void SetPrintChecksum(FX_BOOL checksum);
virtual void SetDataLength(int32_t length);
virtual void SetCalcChecksum(int32_t state);
virtual void SetFontSize(FX_FLOAT size);
virtual void SetFontStyle(int32_t style);
virtual void SetFontColor(FX_ARGB color);
- virtual FX_BOOL SetFont(CFX_Font* cFont);
+ FX_BOOL SetFont(CFX_Font* cFont);
protected:
- void CalcTextInfo(const CFX_ByteString& text,
- FXTEXT_CHARPOS* charPos,
- CFX_Font* cFont,
- FX_FLOAT geWidth,
- int32_t fontSize,
- FX_FLOAT& charsLen);
+ virtual void CalcTextInfo(const CFX_ByteString& text,
+ FXTEXT_CHARPOS* charPos,
+ CFX_Font* cFont,
+ FX_FLOAT geWidth,
+ int32_t fontSize,
+ FX_FLOAT& charsLen);
virtual void ShowChars(const CFX_WideStringC& contents,
CFX_DIBitmap* pOutBitmap,
CFX_RenderDevice* device,
@@ -95,12 +87,13 @@ class CBC_OneDimWriter : public CBC_Writer {
FX_FLOAT locX,
FX_FLOAT locY,
int32_t barWidth);
- int32_t AppendPattern(uint8_t* target,
- int32_t pos,
- const int32_t* pattern,
- int32_t patternLength,
- int32_t startColor,
- int32_t& e);
+ virtual int32_t AppendPattern(uint8_t* target,
+ int32_t pos,
+ const int32_t* pattern,
+ int32_t patternLength,
+ int32_t startColor,
+ int32_t& e);
+
FX_WCHAR Upper(FX_WCHAR ch);
FX_BOOL m_bPrintChecksum;
diff --git a/xfa/fxbarcode/oned/BC_OnedCodaBarReader.h b/xfa/fxbarcode/oned/BC_OnedCodaBarReader.h
index 8fd2177a04..ce902bff5e 100644
--- a/xfa/fxbarcode/oned/BC_OnedCodaBarReader.h
+++ b/xfa/fxbarcode/oned/BC_OnedCodaBarReader.h
@@ -16,11 +16,14 @@ class CBC_OneDReader;
class CBC_OnedCodaBarReader : public CBC_OneDReader {
public:
CBC_OnedCodaBarReader();
- virtual ~CBC_OnedCodaBarReader();
+ ~CBC_OnedCodaBarReader() override;
+
+ // CBC_OneDReader
CFX_ByteString DecodeRow(int32_t rowNumber,
CBC_CommonBitArray* row,
int32_t hints,
- int32_t& e);
+ int32_t& e) override;
+
CFX_Int32Array* FindAsteriskPattern(CBC_CommonBitArray* row, int32_t& e);
FX_BOOL ArrayContains(const FX_CHAR array[], FX_CHAR key);
FX_CHAR ToNarrowWidePattern(CFX_Int32Array* counter);
diff --git a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h
index d13601731b..99c6bfb039 100644
--- a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h
+++ b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h
@@ -15,32 +15,33 @@
class CBC_OnedCodaBarWriter : public CBC_OneDimWriter {
public:
CBC_OnedCodaBarWriter();
- virtual ~CBC_OnedCodaBarWriter();
+ ~CBC_OnedCodaBarWriter() override;
+ // CBC_OneDimWriter
uint8_t* Encode(const CFX_ByteString& contents,
int32_t& outLength,
- int32_t& e);
+ int32_t& e) override;
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
int32_t& outHeight,
- int32_t& e);
+ int32_t& e) override;
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
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);
- FX_BOOL SetStartChar(FX_CHAR start);
- FX_BOOL SetEndChar(FX_CHAR end);
- void SetDataLength(int32_t length);
- FX_BOOL SetTextLocation(BC_TEXT_LOC location);
- FX_BOOL SetWideNarrowRatio(int32_t ratio);
- FX_BOOL FindChar(FX_WCHAR ch, FX_BOOL isContent);
+ int32_t& e) override;
+ FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override;
+ CFX_WideString FilterContents(const CFX_WideStringC& contents) override;
+ void SetDataLength(int32_t length) override;
+
+ virtual CFX_WideString encodedContents(const CFX_WideStringC& contents);
+ virtual FX_BOOL SetStartChar(FX_CHAR start);
+ virtual FX_BOOL SetEndChar(FX_CHAR end);
+ virtual FX_BOOL SetTextLocation(BC_TEXT_LOC location);
+ virtual FX_BOOL SetWideNarrowRatio(int32_t ratio);
+ virtual FX_BOOL FindChar(FX_WCHAR ch, FX_BOOL isContent);
private:
static const FX_CHAR START_END_CHARS[];
@@ -50,7 +51,7 @@ class CBC_OnedCodaBarWriter : public CBC_OneDimWriter {
uint8_t* code,
int32_t codeLength,
FX_BOOL isDevice,
- int32_t& e);
+ int32_t& e) override;
FX_CHAR m_chStart;
FX_CHAR m_chEnd;
diff --git a/xfa/fxbarcode/oned/BC_OnedCode128Reader.h b/xfa/fxbarcode/oned/BC_OnedCode128Reader.h
index df21d7a220..b63b054984 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode128Reader.h
+++ b/xfa/fxbarcode/oned/BC_OnedCode128Reader.h
@@ -14,11 +14,13 @@ class CBC_CommonBitArray;
class CBC_OnedCode128Reader : public CBC_OneDReader {
public:
CBC_OnedCode128Reader();
- virtual ~CBC_OnedCode128Reader();
- virtual CFX_ByteString DecodeRow(int32_t rowNumber,
- CBC_CommonBitArray* row,
- int32_t hints,
- int32_t& e);
+ ~CBC_OnedCode128Reader() override;
+
+ // CBC_OneDReader
+ CFX_ByteString DecodeRow(int32_t rowNumber,
+ CBC_CommonBitArray* row,
+ int32_t hints,
+ int32_t& e) override;
static const int32_t CODE_PATTERNS[107][7];
diff --git a/xfa/fxbarcode/oned/BC_OnedCode128Writer.h b/xfa/fxbarcode/oned/BC_OnedCode128Writer.h
index b2530642af..7338b56952 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode128Writer.h
+++ b/xfa/fxbarcode/oned/BC_OnedCode128Writer.h
@@ -15,26 +15,29 @@ class CBC_OnedCode128Writer : public CBC_OneDimWriter {
public:
CBC_OnedCode128Writer();
explicit CBC_OnedCode128Writer(BC_TYPE type);
- virtual ~CBC_OnedCode128Writer();
+ ~CBC_OnedCode128Writer() override;
+ // CBC_OneDimWriter
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
int32_t& outHeight,
int32_t hints,
- int32_t& e);
+ int32_t& e) override;
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
int32_t& outHeight,
- int32_t& e);
+ int32_t& e) override;
uint8_t* Encode(const CFX_ByteString& contents,
int32_t& outLength,
- int32_t& e);
+ int32_t& e) override;
+
+ FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override;
+ CFX_WideString FilterContents(const CFX_WideStringC& contents) override;
- 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:
diff --git a/xfa/fxbarcode/oned/BC_OnedCode39Reader.h b/xfa/fxbarcode/oned/BC_OnedCode39Reader.h
index 0d4591f95b..0e1a728a47 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode39Reader.h
+++ b/xfa/fxbarcode/oned/BC_OnedCode39Reader.h
@@ -22,12 +22,13 @@ class CBC_OnedCode39Reader : public CBC_OneDReader {
CBC_OnedCode39Reader();
explicit CBC_OnedCode39Reader(FX_BOOL usingCheckDigit);
CBC_OnedCode39Reader(FX_BOOL usingCheckDigit, FX_BOOL extendedMode);
- virtual ~CBC_OnedCode39Reader();
+ ~CBC_OnedCode39Reader() override;
+ // CBC_OneDReader
CFX_ByteString DecodeRow(int32_t rowNumber,
CBC_CommonBitArray* row,
int32_t hints,
- int32_t& e);
+ int32_t& e) override;
private:
CFX_Int32Array* FindAsteriskPattern(CBC_CommonBitArray* row, int32_t& e);
diff --git a/xfa/fxbarcode/oned/BC_OnedCode39Writer.h b/xfa/fxbarcode/oned/BC_OnedCode39Writer.h
index f2c340b3fb..7dc314f968 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode39Writer.h
+++ b/xfa/fxbarcode/oned/BC_OnedCode39Writer.h
@@ -14,37 +14,41 @@ class CBC_OnedCode39Writer : public CBC_OneDimWriter {
public:
CBC_OnedCode39Writer();
explicit CBC_OnedCode39Writer(FX_BOOL extendedMode);
- virtual ~CBC_OnedCode39Writer();
+ ~CBC_OnedCode39Writer() override;
+ // CBC_OneDimWriter
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
int32_t& outHeight,
- int32_t& e);
+ int32_t& e) override;
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
int32_t& outHeight,
int32_t hints,
- int32_t& e);
+ int32_t& e) override;
uint8_t* Encode(const CFX_ByteString& contents,
int32_t& outLength,
- int32_t& e);
+ int32_t& e) override;
void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
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);
- CFX_WideString FilterContents(const CFX_WideStringC& contents);
- CFX_WideString FilterExtendedContents(const CFX_WideStringC& contents);
- CFX_WideString RenderTextContents(const CFX_WideStringC& contents);
- CFX_WideString RenderExtendedTextContents(const CFX_WideStringC& contents);
- FX_BOOL SetTextLocation(BC_TEXT_LOC loction);
- FX_BOOL SetWideNarrowRatio(int32_t ratio);
+ int32_t& e) override;
+ FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override;
+ CFX_WideString FilterContents(const CFX_WideStringC& contents) override;
+ CFX_WideString RenderTextContents(const CFX_WideStringC& contents) override;
+
+ virtual CFX_WideString encodedContents(const CFX_WideStringC& contents,
+ int32_t& e);
+ virtual FX_BOOL CheckExtendedContentValidity(const CFX_WideStringC& contents);
+ virtual CFX_WideString FilterExtendedContents(
+ const CFX_WideStringC& contents);
+ virtual CFX_WideString RenderExtendedTextContents(
+ const CFX_WideStringC& contents);
+ virtual FX_BOOL SetTextLocation(BC_TEXT_LOC loction);
+ virtual FX_BOOL SetWideNarrowRatio(int32_t ratio);
private:
void ToIntArray(int32_t a, int32_t* toReturn);
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Reader.h b/xfa/fxbarcode/oned/BC_OnedEAN13Reader.h
index 5656540250..ac53fd4f24 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN13Reader.h
+++ b/xfa/fxbarcode/oned/BC_OnedEAN13Reader.h
@@ -16,15 +16,10 @@ class CBC_OnedUPCAReader;
class CBC_OnedEAN13Reader : public CBC_OneDimReader {
public:
- static const int32_t FIRST_DIGIT_ENCODINGS[10];
-
CBC_OnedEAN13Reader();
- virtual ~CBC_OnedEAN13Reader();
+ ~CBC_OnedEAN13Reader() override;
- private:
- void DetermineFirstDigit(CFX_ByteString& result,
- int32_t lgPatternFound,
- int32_t& e);
+ static const int32_t FIRST_DIGIT_ENCODINGS[10];
protected:
friend class CBC_OnedUPCAReader;
@@ -32,7 +27,12 @@ class CBC_OnedEAN13Reader : public CBC_OneDimReader {
int32_t DecodeMiddle(CBC_CommonBitArray* row,
CFX_Int32Array* startRange,
CFX_ByteString& resultString,
- int32_t& e);
+ int32_t& e) override;
+
+ private:
+ void DetermineFirstDigit(CFX_ByteString& result,
+ int32_t lgPatternFound,
+ int32_t& e);
};
#endif // XFA_FXBARCODE_ONED_BC_ONEDEAN13READER_H_
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h
index 75debc2508..b2b85d20e9 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h
+++ b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h
@@ -17,30 +17,31 @@ class CFX_RenderDevice;
class CBC_OnedEAN13Writer : public CBC_OneDimWriter {
public:
CBC_OnedEAN13Writer();
- virtual ~CBC_OnedEAN13Writer();
+ ~CBC_OnedEAN13Writer() override;
+ // CBC_OneDimWriter
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
int32_t& outHeight,
- int32_t& e);
+ int32_t& e) override;
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
int32_t& outHeight,
int32_t hints,
- int32_t& e);
+ int32_t& e) override;
uint8_t* Encode(const CFX_ByteString& contents,
int32_t& outLength,
- int32_t& e);
-
+ int32_t& e) override;
void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
FX_BOOL isDevice,
- int32_t& e);
- FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
- CFX_WideString FilterContents(const CFX_WideStringC& contents);
+ int32_t& e) override;
+ FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override;
+ CFX_WideString FilterContents(const CFX_WideStringC& contents) override;
+
int32_t CalcChecksum(const CFX_ByteString& contents);
protected:
@@ -50,7 +51,7 @@ class CBC_OnedEAN13Writer : public CBC_OneDimWriter {
const CFX_Matrix* matrix,
int32_t barWidth,
int32_t multiple,
- int32_t& e);
+ int32_t& e) override;
private:
int32_t m_codeWidth;
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN8Reader.h b/xfa/fxbarcode/oned/BC_OnedEAN8Reader.h
index ab2d5e3178..756565dd8f 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN8Reader.h
+++ b/xfa/fxbarcode/oned/BC_OnedEAN8Reader.h
@@ -14,13 +14,13 @@ class CBC_CommonBitArray;
class CBC_OnedEAN8Reader : public CBC_OneDimReader {
public:
CBC_OnedEAN8Reader();
- virtual ~CBC_OnedEAN8Reader();
+ ~CBC_OnedEAN8Reader() override;
protected:
int32_t DecodeMiddle(CBC_CommonBitArray*,
CFX_Int32Array* startRange,
CFX_ByteString& result,
- int32_t& e);
+ int32_t& e) override;
};
#endif // XFA_FXBARCODE_ONED_BC_ONEDEAN8READER_H_
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h
index 706393eb03..dab1b25de0 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h
+++ b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h
@@ -16,36 +16,35 @@ class CFX_DIBitmap;
class CFX_RenderDevice;
class CBC_OnedEAN8Writer : public CBC_OneDimWriter {
- private:
- int32_t m_codeWidth;
-
public:
CBC_OnedEAN8Writer();
- virtual ~CBC_OnedEAN8Writer();
+ ~CBC_OnedEAN8Writer() override;
+ // CBC_OneDimWriter
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
int32_t& outHeight,
- int32_t& e);
+ int32_t& e) override;
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
int32_t& outHeight,
int32_t hints,
- int32_t& e);
+ int32_t& e) override;
uint8_t* Encode(const CFX_ByteString& contents,
int32_t& outLength,
- int32_t& e);
+ int32_t& e) override;
void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
FX_BOOL isDevice,
- int32_t& e);
- FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
- CFX_WideString FilterContents(const CFX_WideStringC& contents);
- void SetDataLength(int32_t length);
+ int32_t& e) override;
+ FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override;
+ CFX_WideString FilterContents(const CFX_WideStringC& contents) override;
+ void SetDataLength(int32_t length) override;
+
FX_BOOL SetTextLocation(BC_TEXT_LOC location);
int32_t CalcChecksum(const CFX_ByteString& contents);
@@ -56,7 +55,10 @@ class CBC_OnedEAN8Writer : public CBC_OneDimWriter {
const CFX_Matrix* matrix,
int32_t barWidth,
int32_t multiple,
- int32_t& e);
+ int32_t& e) override;
+
+ private:
+ int32_t m_codeWidth;
};
#endif // XFA_FXBARCODE_ONED_BC_ONEDEAN8WRITER_H_
diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAReader.h b/xfa/fxbarcode/oned/BC_OnedUPCAReader.h
index c073930c5b..28e03fc21f 100644
--- a/xfa/fxbarcode/oned/BC_OnedUPCAReader.h
+++ b/xfa/fxbarcode/oned/BC_OnedUPCAReader.h
@@ -18,27 +18,32 @@ class CBC_OnedEAN13Reader;
class CBC_OnedUPCAReader : public CBC_OneDimReader {
public:
CBC_OnedUPCAReader();
- virtual ~CBC_OnedUPCAReader();
+ ~CBC_OnedUPCAReader() override;
virtual void Init();
+ // CBC_OneDimReader
CFX_ByteString DecodeRow(int32_t rowNumber,
CBC_CommonBitArray* row,
int32_t hints,
- int32_t& e);
+ int32_t& e) override;
CFX_ByteString DecodeRow(int32_t rowNumber,
CBC_CommonBitArray* row,
CFX_Int32Array* startGuardRange,
int32_t hints,
- int32_t& e);
- CFX_ByteString Decode(CBC_BinaryBitmap* image, int32_t& e);
- CFX_ByteString Decode(CBC_BinaryBitmap* image, int32_t hints, int32_t& e);
+ int32_t& e) override;
+
+ // CBC_OneDReader
+ CFX_ByteString Decode(CBC_BinaryBitmap* image, int32_t& e) override;
+ CFX_ByteString Decode(CBC_BinaryBitmap* image,
+ int32_t hints,
+ int32_t& e) override;
protected:
int32_t DecodeMiddle(CBC_CommonBitArray* row,
CFX_Int32Array* startRange,
CFX_ByteString& resultString,
- int32_t& e);
+ int32_t& e) override;
CFX_ByteString MaybeReturnResult(CFX_ByteString& result, int32_t& e);
private:
diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
index 580e1a8444..2b06c8519b 100644
--- a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
@@ -105,6 +105,12 @@ uint8_t* CBC_OnedUPCAWriter::Encode(const CFX_ByteString& contents,
return ret;
}
+uint8_t* CBC_OnedUPCAWriter::Encode(const CFX_ByteString& contents,
+ int32_t& outLength,
+ int32_t& e) {
+ return nullptr;
+}
+
void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents,
CFX_DIBitmap* pOutBitmap,
CFX_RenderDevice* device,
diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
index 45d4eac620..8257dfa4b6 100644
--- a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
+++ b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
@@ -19,34 +19,33 @@ class CFX_RenderDevice;
class CBC_OnedUPCAWriter : public CBC_OneDimWriter {
public:
CBC_OnedUPCAWriter();
- virtual ~CBC_OnedUPCAWriter();
+ ~CBC_OnedUPCAWriter() override;
virtual void Init();
+ // CBC_OneDimWriter
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
int32_t& outHeight,
- int32_t& e);
+ int32_t& e) override;
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
int32_t& outHeight,
int32_t hints,
- int32_t& e);
+ int32_t& e) override;
uint8_t* Encode(const CFX_ByteString& contents,
int32_t& outLength,
- int32_t& e) {
- return nullptr;
- }
+ int32_t& e) override;
void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
FX_BOOL isDevice,
- int32_t& e);
- FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
- CFX_WideString FilterContents(const CFX_WideStringC& contents);
+ int32_t& e) override;
+ FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override;
+ CFX_WideString FilterContents(const CFX_WideStringC& contents) override;
int32_t CalcChecksum(const CFX_ByteString& contents);
protected:
@@ -56,7 +55,7 @@ class CBC_OnedUPCAWriter : public CBC_OneDimWriter {
const CFX_Matrix* matrix,
int32_t barWidth,
int32_t multiple,
- int32_t& e);
+ int32_t& e) override;
private:
CBC_OnedEAN13Writer* m_subWriter;