summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/oned
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-02 15:43:18 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-02 15:43:19 -0700
commitd19e912dd469e4bdad9f3020e1f6eb98f10f3470 (patch)
tree239cb568a80445f14a1ab9b63dcaaddcce67e1cc /xfa/fxbarcode/oned
parent12f3e4a58f05850b93af35619cb04f0231d86acc (diff)
downloadpdfium-d19e912dd469e4bdad9f3020e1f6eb98f10f3470.tar.xz
Remove FX_BOOL from xfa.
Review-Url: https://codereview.chromium.org/2467203003
Diffstat (limited to 'xfa/fxbarcode/oned')
-rw-r--r--xfa/fxbarcode/oned/BC_OneDimWriter.cpp25
-rw-r--r--xfa/fxbarcode/oned/BC_OneDimWriter.h18
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp48
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h14
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp24
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode128Writer.h8
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp20
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode39Writer.h8
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp10
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN13Writer.h4
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp15
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN8Writer.h6
-rw-r--r--xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp13
-rw-r--r--xfa/fxbarcode/oned/BC_OnedUPCAWriter.h4
14 files changed, 106 insertions, 111 deletions
diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
index cb145f52ed..0555ba65fd 100644
--- a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -36,21 +36,21 @@
CBC_OneDimWriter::CBC_OneDimWriter() {
m_locTextLoc = BC_TEXT_LOC_BELOWEMBED;
- m_bPrintChecksum = TRUE;
+ m_bPrintChecksum = true;
m_iDataLenth = 0;
- m_bCalcChecksum = FALSE;
+ m_bCalcChecksum = false;
m_pFont = nullptr;
m_fFontSize = 10;
m_iFontStyle = 0;
m_fontColor = 0xff000000;
m_iContentLen = 0;
- m_bLeftPadding = FALSE;
- m_bRightPadding = FALSE;
+ m_bLeftPadding = false;
+ m_bRightPadding = false;
}
CBC_OneDimWriter::~CBC_OneDimWriter() {}
-void CBC_OneDimWriter::SetPrintChecksum(FX_BOOL checksum) {
+void CBC_OneDimWriter::SetPrintChecksum(bool checksum) {
m_bPrintChecksum = checksum;
}
@@ -58,16 +58,16 @@ void CBC_OneDimWriter::SetDataLength(int32_t length) {
m_iDataLenth = length;
}
-void CBC_OneDimWriter::SetCalcChecksum(FX_BOOL state) {
+void CBC_OneDimWriter::SetCalcChecksum(bool state) {
m_bCalcChecksum = state;
}
-FX_BOOL CBC_OneDimWriter::SetFont(CFX_Font* cFont) {
+bool CBC_OneDimWriter::SetFont(CFX_Font* cFont) {
if (!cFont)
- return FALSE;
+ return false;
m_pFont = cFont;
- return TRUE;
+ return true;
}
void CBC_OneDimWriter::SetFontSize(FX_FLOAT size) {
@@ -387,7 +387,7 @@ void CBC_OneDimWriter::RenderDeviceResult(CFX_RenderDevice* device,
void CBC_OneDimWriter::RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
- FX_BOOL isDevice,
+ bool isDevice,
int32_t& e) {
if (codeLength < 1) {
BC_EXCEPTION_CHECK_ReturnVoid(e);
@@ -460,9 +460,8 @@ void CBC_OneDimWriter::RenderResult(const CFX_WideStringC& contents,
}
}
-FX_BOOL CBC_OneDimWriter::CheckContentValidity(
- const CFX_WideStringC& contents) {
- return TRUE;
+bool CBC_OneDimWriter::CheckContentValidity(const CFX_WideStringC& contents) {
+ return true;
}
CFX_WideString CBC_OneDimWriter::FilterContents(
diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.h b/xfa/fxbarcode/oned/BC_OneDimWriter.h
index 16d02e903d..e37d774341 100644
--- a/xfa/fxbarcode/oned/BC_OneDimWriter.h
+++ b/xfa/fxbarcode/oned/BC_OneDimWriter.h
@@ -40,7 +40,7 @@ class CBC_OneDimWriter : public CBC_Writer {
virtual void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
- FX_BOOL isDevice,
+ bool isDevice,
int32_t& e);
virtual void RenderBitmapResult(CFX_DIBitmap*& pOutBitmap,
const CFX_WideStringC& contents,
@@ -49,16 +49,16 @@ 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);
+ virtual 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 SetPrintChecksum(bool checksum);
virtual void SetDataLength(int32_t length);
- virtual void SetCalcChecksum(FX_BOOL state);
+ virtual void SetCalcChecksum(bool state);
virtual void SetFontSize(FX_FLOAT size);
virtual void SetFontStyle(int32_t style);
virtual void SetFontColor(FX_ARGB color);
- FX_BOOL SetFont(CFX_Font* cFont);
+ bool SetFont(CFX_Font* cFont);
protected:
virtual void CalcTextInfo(const CFX_ByteString& text,
@@ -98,17 +98,17 @@ class CBC_OneDimWriter : public CBC_Writer {
FX_WCHAR Upper(FX_WCHAR ch);
- FX_BOOL m_bPrintChecksum;
+ bool m_bPrintChecksum;
int32_t m_iDataLenth;
- FX_BOOL m_bCalcChecksum;
+ bool m_bCalcChecksum;
CFX_Font* m_pFont;
FX_FLOAT m_fFontSize;
int32_t m_iFontStyle;
uint32_t m_fontColor;
BC_TEXT_LOC m_locTextLoc;
int32_t m_iContentLen;
- FX_BOOL m_bLeftPadding;
- FX_BOOL m_bRightPadding;
+ bool m_bLeftPadding;
+ bool m_bRightPadding;
std::unique_ptr<CBC_CommonBitMatrix> m_output;
int32_t m_barWidth;
int32_t m_multiple;
diff --git a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
index e25a6c0a5c..fb0d7dcd72 100644
--- a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
@@ -48,77 +48,77 @@ CBC_OnedCodaBarWriter::CBC_OnedCodaBarWriter() {
m_iWideNarrRatio = 2;
}
CBC_OnedCodaBarWriter::~CBC_OnedCodaBarWriter() {}
-FX_BOOL CBC_OnedCodaBarWriter::SetStartChar(FX_CHAR start) {
+bool CBC_OnedCodaBarWriter::SetStartChar(FX_CHAR start) {
for (size_t i = 0; i < FX_ArraySize(START_END_CHARS); ++i) {
if (START_END_CHARS[i] == start) {
m_chStart = start;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-FX_BOOL CBC_OnedCodaBarWriter::SetEndChar(FX_CHAR end) {
+bool CBC_OnedCodaBarWriter::SetEndChar(FX_CHAR end) {
for (size_t i = 0; i < FX_ArraySize(START_END_CHARS); ++i) {
if (START_END_CHARS[i] == end) {
m_chEnd = end;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
void CBC_OnedCodaBarWriter::SetDataLength(int32_t length) {
m_iDataLenth = length + 2;
}
-FX_BOOL CBC_OnedCodaBarWriter::SetTextLocation(BC_TEXT_LOC location) {
+bool CBC_OnedCodaBarWriter::SetTextLocation(BC_TEXT_LOC location) {
if (location < BC_TEXT_LOC_NONE || location > BC_TEXT_LOC_BELOWEMBED) {
- return FALSE;
+ return false;
}
m_locTextLoc = location;
- return TRUE;
+ return true;
}
-FX_BOOL CBC_OnedCodaBarWriter::SetWideNarrowRatio(int32_t ratio) {
+bool CBC_OnedCodaBarWriter::SetWideNarrowRatio(int32_t ratio) {
if (ratio < 2 || ratio > 3) {
- return FALSE;
+ return false;
}
m_iWideNarrRatio = ratio;
- return TRUE;
+ return true;
}
-FX_BOOL CBC_OnedCodaBarWriter::FindChar(FX_WCHAR ch, FX_BOOL isContent) {
+bool CBC_OnedCodaBarWriter::FindChar(FX_WCHAR ch, bool isContent) {
if (isContent) {
for (size_t i = 0; i < FX_ArraySize(CONTENT_CHARS); ++i) {
if (ch == (FX_WCHAR)CONTENT_CHARS[i]) {
- return TRUE;
+ return true;
}
}
for (size_t j = 0; j < FX_ArraySize(START_END_CHARS); ++j) {
if (ch == (FX_WCHAR)START_END_CHARS[j]) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
} else {
for (size_t i = 0; i < FX_ArraySize(CONTENT_CHARS); ++i) {
if (ch == (FX_WCHAR)CONTENT_CHARS[i]) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
}
-FX_BOOL CBC_OnedCodaBarWriter::CheckContentValidity(
+bool CBC_OnedCodaBarWriter::CheckContentValidity(
const CFX_WideStringC& contents) {
FX_WCHAR ch;
int32_t index = 0;
for (index = 0; index < contents.GetLength(); index++) {
ch = contents.GetAt(index);
- if (FindChar(ch, FALSE)) {
+ if (FindChar(ch, false)) {
continue;
} else {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
CFX_WideString CBC_OnedCodaBarWriter::FilterContents(
const CFX_WideStringC& contents) {
@@ -130,7 +130,7 @@ CFX_WideString CBC_OnedCodaBarWriter::FilterContents(
index++;
continue;
}
- if (FindChar(ch, TRUE)) {
+ if (FindChar(ch, true)) {
filtercontents += ch;
} else {
continue;
@@ -230,7 +230,7 @@ CFX_WideString CBC_OnedCodaBarWriter::encodedContents(
void CBC_OnedCodaBarWriter::RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
- FX_BOOL isDevice,
+ bool isDevice,
int32_t& e) {
CBC_OneDimWriter::RenderResult(encodedContents(contents).AsStringC(), code,
codeLength, isDevice, e);
diff --git a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h
index 417b2fe408..301c34a751 100644
--- a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h
+++ b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h
@@ -32,22 +32,22 @@ class CBC_OnedCodaBarWriter : public CBC_OneDimWriter {
int32_t& outHeight,
int32_t hints,
int32_t& e) override;
- FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override;
+ 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);
+ virtual bool SetStartChar(FX_CHAR start);
+ virtual bool SetEndChar(FX_CHAR end);
+ virtual bool SetTextLocation(BC_TEXT_LOC location);
+ virtual bool SetWideNarrowRatio(int32_t ratio);
+ virtual bool FindChar(FX_WCHAR ch, bool isContent);
private:
void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
- FX_BOOL isDevice,
+ bool isDevice,
int32_t& e) override;
FX_CHAR m_chStart;
diff --git a/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp b/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp
index 109742e85f..ed2d2c1b24 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp
@@ -80,22 +80,22 @@ CBC_OnedCode128Writer::~CBC_OnedCode128Writer() {}
BC_TYPE CBC_OnedCode128Writer::GetType() {
return m_codeFormat;
}
-FX_BOOL CBC_OnedCode128Writer::CheckContentValidity(
+bool CBC_OnedCode128Writer::CheckContentValidity(
const CFX_WideStringC& contents) {
- FX_BOOL ret = TRUE;
+ bool ret = true;
int32_t position = 0;
int32_t patternIndex = -1;
if (m_codeFormat == BC_CODE128_B || m_codeFormat == BC_CODE128_C) {
while (position < contents.GetLength()) {
patternIndex = (int32_t)contents.GetAt(position);
if (patternIndex < 32 || patternIndex > 126 || patternIndex == 34) {
- ret = FALSE;
+ ret = false;
break;
}
position++;
}
} else {
- ret = FALSE;
+ ret = false;
}
return ret;
}
@@ -135,12 +135,12 @@ CFX_WideString CBC_OnedCode128Writer::FilterContents(
}
return filtercontents;
}
-FX_BOOL CBC_OnedCode128Writer::SetTextLocation(BC_TEXT_LOC location) {
+bool CBC_OnedCode128Writer::SetTextLocation(BC_TEXT_LOC location) {
if (location < BC_TEXT_LOC_NONE || location > BC_TEXT_LOC_BELOWEMBED) {
- return FALSE;
+ return false;
}
m_locTextLoc = location;
- return TRUE;
+ return true;
}
uint8_t* CBC_OnedCode128Writer::Encode(const CFX_ByteString& contents,
BCFORMAT format,
@@ -166,16 +166,16 @@ uint8_t* CBC_OnedCode128Writer::Encode(const CFX_ByteString& contents,
BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return ret;
}
-FX_BOOL CBC_OnedCode128Writer::IsDigits(const CFX_ByteString& contents,
- int32_t start,
- int32_t length) {
+bool CBC_OnedCode128Writer::IsDigits(const CFX_ByteString& contents,
+ int32_t start,
+ int32_t length) {
int32_t end = start + length;
for (int32_t i = start; i < end; i++) {
if (contents[i] < '0' || contents[i] > '9') {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
uint8_t* CBC_OnedCode128Writer::Encode(const CFX_ByteString& contents,
diff --git a/xfa/fxbarcode/oned/BC_OnedCode128Writer.h b/xfa/fxbarcode/oned/BC_OnedCode128Writer.h
index 7c85af102d..60a2f03acc 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode128Writer.h
+++ b/xfa/fxbarcode/oned/BC_OnedCode128Writer.h
@@ -33,17 +33,15 @@ class CBC_OnedCode128Writer : public CBC_OneDimWriter {
int32_t& outLength,
int32_t& e) override;
- FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override;
+ bool CheckContentValidity(const CFX_WideStringC& contents) override;
CFX_WideString FilterContents(const CFX_WideStringC& contents) override;
- FX_BOOL SetTextLocation(BC_TEXT_LOC location);
+ bool SetTextLocation(BC_TEXT_LOC location);
BC_TYPE GetType();
private:
- FX_BOOL IsDigits(const CFX_ByteString& contents,
- int32_t start,
- int32_t length);
+ bool IsDigits(const CFX_ByteString& contents, int32_t start, int32_t length);
int32_t Encode128B(const CFX_ByteString& contents,
CFX_ArrayTemplate<const int32_t*>* patterns);
int32_t Encode128C(const CFX_ByteString& contents,
diff --git a/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp b/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp
index 3edf87ba30..9d5fdda968 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp
@@ -45,7 +45,7 @@ CBC_OnedCode39Writer::CBC_OnedCode39Writer() {
m_iWideNarrRatio = 3;
}
CBC_OnedCode39Writer::~CBC_OnedCode39Writer() {}
-FX_BOOL CBC_OnedCode39Writer::CheckContentValidity(
+bool CBC_OnedCode39Writer::CheckContentValidity(
const CFX_WideStringC& contents) {
for (int32_t i = 0; i < contents.GetLength(); i++) {
FX_WCHAR ch = contents.GetAt(i);
@@ -56,9 +56,9 @@ FX_BOOL CBC_OnedCode39Writer::CheckContentValidity(
ch == (FX_WCHAR)'%') {
continue;
}
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
CFX_WideString CBC_OnedCode39Writer::FilterContents(
@@ -110,19 +110,19 @@ CFX_WideString CBC_OnedCode39Writer::RenderTextContents(
return renderContents;
}
-FX_BOOL CBC_OnedCode39Writer::SetTextLocation(BC_TEXT_LOC location) {
+bool CBC_OnedCode39Writer::SetTextLocation(BC_TEXT_LOC location) {
if (location < BC_TEXT_LOC_NONE || location > BC_TEXT_LOC_BELOWEMBED) {
- return FALSE;
+ return false;
}
m_locTextLoc = location;
- return TRUE;
+ return true;
}
-FX_BOOL CBC_OnedCode39Writer::SetWideNarrowRatio(int32_t ratio) {
+bool CBC_OnedCode39Writer::SetWideNarrowRatio(int32_t ratio) {
if (ratio < 2 || ratio > 3) {
- return FALSE;
+ return false;
}
m_iWideNarrRatio = ratio;
- return TRUE;
+ return true;
}
uint8_t* CBC_OnedCode39Writer::Encode(const CFX_ByteString& contents,
BCFORMAT format,
@@ -272,7 +272,7 @@ CFX_WideString CBC_OnedCode39Writer::encodedContents(
void CBC_OnedCode39Writer::RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
- FX_BOOL isDevice,
+ bool isDevice,
int32_t& e) {
CFX_WideString encodedCon = encodedContents(contents, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
diff --git a/xfa/fxbarcode/oned/BC_OnedCode39Writer.h b/xfa/fxbarcode/oned/BC_OnedCode39Writer.h
index 711e1c0534..c8755a3e69 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode39Writer.h
+++ b/xfa/fxbarcode/oned/BC_OnedCode39Writer.h
@@ -33,16 +33,16 @@ class CBC_OnedCode39Writer : public CBC_OneDimWriter {
void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
- FX_BOOL isDevice,
+ bool isDevice,
int32_t& e) override;
- FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override;
+ 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 SetTextLocation(BC_TEXT_LOC loction);
- virtual FX_BOOL SetWideNarrowRatio(int32_t ratio);
+ virtual bool SetTextLocation(BC_TEXT_LOC loction);
+ virtual bool SetWideNarrowRatio(int32_t ratio);
private:
void ToIntArray(int32_t a, int32_t* toReturn);
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
index 51f77b5082..71d9ac6505 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
@@ -44,20 +44,20 @@ const int32_t L_AND_G_PATTERNS[20][4] = {
} // namespace
CBC_OnedEAN13Writer::CBC_OnedEAN13Writer() {
- m_bLeftPadding = TRUE;
+ m_bLeftPadding = true;
m_codeWidth = 3 + (7 * 6) + 5 + (7 * 6) + 3;
}
CBC_OnedEAN13Writer::~CBC_OnedEAN13Writer() {}
-FX_BOOL CBC_OnedEAN13Writer::CheckContentValidity(
+bool CBC_OnedEAN13Writer::CheckContentValidity(
const CFX_WideStringC& contents) {
for (int32_t i = 0; i < contents.GetLength(); i++) {
if (contents.GetAt(i) >= '0' && contents.GetAt(i) <= '9') {
continue;
} else {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
CFX_WideString CBC_OnedEAN13Writer::FilterContents(
const CFX_WideStringC& contents) {
@@ -296,7 +296,7 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
void CBC_OnedEAN13Writer::RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
- FX_BOOL isDevice,
+ bool isDevice,
int32_t& e) {
CBC_OneDimWriter::RenderResult(contents, code, codeLength, isDevice, e);
}
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h
index f30a74fda0..5775f89046 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h
+++ b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.h
@@ -37,9 +37,9 @@ class CBC_OnedEAN13Writer : public CBC_OneDimWriter {
void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
- FX_BOOL isDevice,
+ bool isDevice,
int32_t& e) override;
- FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override;
+ bool CheckContentValidity(const CFX_WideStringC& contents) override;
CFX_WideString FilterContents(const CFX_WideStringC& contents) override;
int32_t CalcChecksum(const CFX_ByteString& contents);
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
index 2305b18a90..ad3ee6160f 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
@@ -45,23 +45,22 @@ CBC_OnedEAN8Writer::~CBC_OnedEAN8Writer() {}
void CBC_OnedEAN8Writer::SetDataLength(int32_t length) {
m_iDataLenth = 8;
}
-FX_BOOL CBC_OnedEAN8Writer::SetTextLocation(BC_TEXT_LOC location) {
+bool CBC_OnedEAN8Writer::SetTextLocation(BC_TEXT_LOC location) {
if (location == BC_TEXT_LOC_BELOWEMBED) {
m_locTextLoc = location;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CBC_OnedEAN8Writer::CheckContentValidity(
- const CFX_WideStringC& contents) {
+bool CBC_OnedEAN8Writer::CheckContentValidity(const CFX_WideStringC& contents) {
for (int32_t i = 0; i < contents.GetLength(); i++) {
if (contents.GetAt(i) >= '0' && contents.GetAt(i) <= '9') {
continue;
} else {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
CFX_WideString CBC_OnedEAN8Writer::FilterContents(
const CFX_WideStringC& contents) {
@@ -262,7 +261,7 @@ void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents,
void CBC_OnedEAN8Writer::RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
- FX_BOOL isDevice,
+ bool isDevice,
int32_t& e) {
CBC_OneDimWriter::RenderResult(contents, code, codeLength, isDevice, e);
}
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h
index 8517d8614a..844fc33afa 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h
+++ b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.h
@@ -39,13 +39,13 @@ class CBC_OnedEAN8Writer : public CBC_OneDimWriter {
void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
- FX_BOOL isDevice,
+ bool isDevice,
int32_t& e) override;
- FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override;
+ 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);
+ bool SetTextLocation(BC_TEXT_LOC location);
int32_t CalcChecksum(const CFX_ByteString& contents);
protected:
diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
index e594bc7ee6..db1b67beef 100644
--- a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
@@ -28,8 +28,8 @@
#include "xfa/fxbarcode/oned/BC_OnedUPCAWriter.h"
CBC_OnedUPCAWriter::CBC_OnedUPCAWriter() {
- m_bLeftPadding = TRUE;
- m_bRightPadding = TRUE;
+ m_bLeftPadding = true;
+ m_bRightPadding = true;
}
void CBC_OnedUPCAWriter::Init() {
@@ -38,13 +38,12 @@ void CBC_OnedUPCAWriter::Init() {
CBC_OnedUPCAWriter::~CBC_OnedUPCAWriter() {}
-FX_BOOL CBC_OnedUPCAWriter::CheckContentValidity(
- const CFX_WideStringC& contents) {
+bool CBC_OnedUPCAWriter::CheckContentValidity(const CFX_WideStringC& contents) {
for (FX_STRSIZE i = 0; i < contents.GetLength(); ++i) {
if (contents.GetAt(i) < '0' || contents.GetAt(i) > '9')
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
CFX_WideString CBC_OnedUPCAWriter::FilterContents(
@@ -275,7 +274,7 @@ void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents,
void CBC_OnedUPCAWriter::RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
- FX_BOOL isDevice,
+ bool isDevice,
int32_t& e) {
CBC_OneDimWriter::RenderResult(contents, code, codeLength, isDevice, e);
}
diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
index 8575572820..6b786ce3b8 100644
--- a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
+++ b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
@@ -42,9 +42,9 @@ class CBC_OnedUPCAWriter : public CBC_OneDimWriter {
void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,
- FX_BOOL isDevice,
+ bool isDevice,
int32_t& e) override;
- FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override;
+ bool CheckContentValidity(const CFX_WideStringC& contents) override;
CFX_WideString FilterContents(const CFX_WideStringC& contents) override;
void Init();