summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxbarcode')
-rw-r--r--xfa/fxbarcode/BC_TwoDimWriter.cpp2
-rw-r--r--xfa/fxbarcode/BC_TwoDimWriter.h4
-rw-r--r--xfa/fxbarcode/BC_Utils.cpp14
-rw-r--r--xfa/fxbarcode/BC_Writer.cpp24
-rw-r--r--xfa/fxbarcode/BC_Writer.h10
-rw-r--r--xfa/fxbarcode/cbc_codabar.cpp44
-rw-r--r--xfa/fxbarcode/cbc_codabar.h22
-rw-r--r--xfa/fxbarcode/cbc_code128.cpp34
-rw-r--r--xfa/fxbarcode/cbc_code128.h16
-rw-r--r--xfa/fxbarcode/cbc_code39.cpp38
-rw-r--r--xfa/fxbarcode/cbc_code39.h18
-rw-r--r--xfa/fxbarcode/cbc_codebase.cpp10
-rw-r--r--xfa/fxbarcode/cbc_codebase.h26
-rw-r--r--xfa/fxbarcode/cbc_datamatrix.cpp26
-rw-r--r--xfa/fxbarcode/cbc_datamatrix.h14
-rw-r--r--xfa/fxbarcode/cbc_ean13.cpp30
-rw-r--r--xfa/fxbarcode/cbc_ean13.h14
-rw-r--r--xfa/fxbarcode/cbc_ean8.cpp30
-rw-r--r--xfa/fxbarcode/cbc_ean8.h14
-rw-r--r--xfa/fxbarcode/cbc_onecode.cpp10
-rw-r--r--xfa/fxbarcode/cbc_onecode.h8
-rw-r--r--xfa/fxbarcode/cbc_pdf417i.cpp32
-rw-r--r--xfa/fxbarcode/cbc_pdf417i.h18
-rw-r--r--xfa/fxbarcode/cbc_qrcode.cpp34
-rw-r--r--xfa/fxbarcode/cbc_qrcode.h18
-rw-r--r--xfa/fxbarcode/cbc_upca.cpp30
-rw-r--r--xfa/fxbarcode/cbc_upca.h14
-rw-r--r--xfa/fxbarcode/common/BC_CommonBitArray.cpp18
-rw-r--r--xfa/fxbarcode/common/BC_CommonBitArray.h4
-rw-r--r--xfa/fxbarcode/common/BC_CommonBitMatrix.cpp2
-rw-r--r--xfa/fxbarcode/common/BC_CommonBitMatrix.h2
-rw-r--r--xfa/fxbarcode/common/BC_CommonByteArray.cpp2
-rw-r--r--xfa/fxbarcode/common/BC_CommonByteArray.h2
-rw-r--r--xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp2
-rw-r--r--xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h2
-rw-r--r--xfa/fxbarcode/datamatrix/BC_Base256Encoder.cpp2
-rw-r--r--xfa/fxbarcode/datamatrix/BC_DataMatrixSymbolInfo144.cpp2
-rw-r--r--xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp10
-rw-r--r--xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.h2
-rw-r--r--xfa/fxbarcode/datamatrix/BC_DefaultPlacement.cpp10
-rw-r--r--xfa/fxbarcode/datamatrix/BC_DefaultPlacement.h6
-rw-r--r--xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp6
-rw-r--r--xfa/fxbarcode/datamatrix/BC_EncoderContext.cpp2
-rw-r--r--xfa/fxbarcode/datamatrix/BC_EncoderContext.h2
-rw-r--r--xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp20
-rw-r--r--xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h16
-rw-r--r--xfa/fxbarcode/datamatrix/BC_SymbolInfo.cpp74
-rw-r--r--xfa/fxbarcode/datamatrix/BC_SymbolInfo.h14
-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
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417.cpp10
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417.h6
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp2
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h2
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp4
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h4
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp16
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h12
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417Writer.cpp16
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417Writer.h6
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCodeWriter.cpp14
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCodeWriter.h4
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoder.cpp2
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoder.h2
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp8
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp18
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.h10
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp7
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h4
-rw-r--r--xfa/fxbarcode/utils.h10
82 files changed, 561 insertions, 567 deletions
diff --git a/xfa/fxbarcode/BC_TwoDimWriter.cpp b/xfa/fxbarcode/BC_TwoDimWriter.cpp
index 2ad60bbde3..83b7b3c081 100644
--- a/xfa/fxbarcode/BC_TwoDimWriter.cpp
+++ b/xfa/fxbarcode/BC_TwoDimWriter.cpp
@@ -14,7 +14,7 @@
#include "xfa/fxbarcode/BC_Writer.h"
#include "xfa/fxbarcode/common/BC_CommonBitMatrix.h"
-CBC_TwoDimWriter::CBC_TwoDimWriter() : m_iCorrectLevel(1), m_bFixedSize(TRUE) {}
+CBC_TwoDimWriter::CBC_TwoDimWriter() : m_iCorrectLevel(1), m_bFixedSize(true) {}
CBC_TwoDimWriter::~CBC_TwoDimWriter() {}
diff --git a/xfa/fxbarcode/BC_TwoDimWriter.h b/xfa/fxbarcode/BC_TwoDimWriter.h
index 76f176bfaf..ad4658b008 100644
--- a/xfa/fxbarcode/BC_TwoDimWriter.h
+++ b/xfa/fxbarcode/BC_TwoDimWriter.h
@@ -26,13 +26,13 @@ class CBC_TwoDimWriter : public CBC_Writer {
virtual void RenderBitmapResult(CFX_DIBitmap*& pOutBitmap, int32_t& e);
virtual void RenderDeviceResult(CFX_RenderDevice* device,
const CFX_Matrix* matrix);
- virtual FX_BOOL SetErrorCorrectionLevel(int32_t level) = 0;
+ virtual bool SetErrorCorrectionLevel(int32_t level) = 0;
int32_t GetErrorCorrectionLevel() const;
protected:
int32_t m_iCorrectLevel;
- FX_BOOL m_bFixedSize;
+ bool m_bFixedSize;
std::unique_ptr<CBC_CommonBitMatrix> m_output;
};
diff --git a/xfa/fxbarcode/BC_Utils.cpp b/xfa/fxbarcode/BC_Utils.cpp
index d750f9d6fe..807b04861d 100644
--- a/xfa/fxbarcode/BC_Utils.cpp
+++ b/xfa/fxbarcode/BC_Utils.cpp
@@ -7,19 +7,19 @@
#include "core/fxcrt/fx_basic.h"
#include "xfa/fxbarcode/utils.h"
-FX_BOOL BC_FX_ByteString_Replace(CFX_ByteString& dst,
- uint32_t first,
- uint32_t last,
- int32_t count,
- FX_CHAR c) {
+bool BC_FX_ByteString_Replace(CFX_ByteString& dst,
+ uint32_t first,
+ uint32_t last,
+ int32_t count,
+ FX_CHAR c) {
if (first > last || count <= 0) {
- return FALSE;
+ return false;
}
dst.Delete(first, last - first);
for (int32_t i = 0; i < count; i++) {
dst.Insert(0, c);
}
- return TRUE;
+ return true;
}
void BC_FX_ByteString_Append(CFX_ByteString& dst, int32_t count, FX_CHAR c) {
for (int32_t i = 0; i < count; i++) {
diff --git a/xfa/fxbarcode/BC_Writer.cpp b/xfa/fxbarcode/BC_Writer.cpp
index 835a2f0309..73163522cb 100644
--- a/xfa/fxbarcode/BC_Writer.cpp
+++ b/xfa/fxbarcode/BC_Writer.cpp
@@ -17,31 +17,31 @@ CBC_Writer::CBC_Writer() {
m_backgroundColor = 0xffffffff;
}
CBC_Writer::~CBC_Writer() {}
-FX_BOOL CBC_Writer::SetCharEncoding(int32_t encoding) {
+bool CBC_Writer::SetCharEncoding(int32_t encoding) {
m_CharEncoding = encoding;
- return TRUE;
+ return true;
}
-FX_BOOL CBC_Writer::SetModuleHeight(int32_t moduleHeight) {
+bool CBC_Writer::SetModuleHeight(int32_t moduleHeight) {
if (moduleHeight > 10 || moduleHeight < 1) {
- return FALSE;
+ return false;
}
m_ModuleHeight = moduleHeight;
- return TRUE;
+ return true;
}
-FX_BOOL CBC_Writer::SetModuleWidth(int32_t moduleWidth) {
+bool CBC_Writer::SetModuleWidth(int32_t moduleWidth) {
if (moduleWidth > 10 || moduleWidth < 1) {
- return FALSE;
+ return false;
}
m_ModuleWidth = moduleWidth;
- return TRUE;
+ return true;
}
-FX_BOOL CBC_Writer::SetHeight(int32_t height) {
+bool CBC_Writer::SetHeight(int32_t height) {
m_Height = height;
- return TRUE;
+ return true;
}
-FX_BOOL CBC_Writer::SetWidth(int32_t width) {
+bool CBC_Writer::SetWidth(int32_t width) {
m_Width = width;
- return TRUE;
+ return true;
}
void CBC_Writer::SetBackgroundColor(FX_ARGB backgroundColor) {
m_backgroundColor = backgroundColor;
diff --git a/xfa/fxbarcode/BC_Writer.h b/xfa/fxbarcode/BC_Writer.h
index 888db560ae..90ea06a397 100644
--- a/xfa/fxbarcode/BC_Writer.h
+++ b/xfa/fxbarcode/BC_Writer.h
@@ -15,11 +15,11 @@ class CBC_Writer {
public:
CBC_Writer();
virtual ~CBC_Writer();
- virtual FX_BOOL SetCharEncoding(int32_t encoding);
- virtual FX_BOOL SetModuleHeight(int32_t moduleHeight);
- virtual FX_BOOL SetModuleWidth(int32_t moduleWidth);
- virtual FX_BOOL SetHeight(int32_t height);
- virtual FX_BOOL SetWidth(int32_t width);
+ virtual bool SetCharEncoding(int32_t encoding);
+ virtual bool SetModuleHeight(int32_t moduleHeight);
+ virtual bool SetModuleWidth(int32_t moduleWidth);
+ virtual bool SetHeight(int32_t height);
+ virtual bool SetWidth(int32_t width);
virtual void SetBackgroundColor(FX_ARGB backgroundColor);
virtual void SetBarcodeColor(FX_ARGB foregroundColor);
diff --git a/xfa/fxbarcode/cbc_codabar.cpp b/xfa/fxbarcode/cbc_codabar.cpp
index 896342a245..e8e8cdc997 100644
--- a/xfa/fxbarcode/cbc_codabar.cpp
+++ b/xfa/fxbarcode/cbc_codabar.cpp
@@ -27,38 +27,38 @@ CBC_Codabar::CBC_Codabar() : CBC_OneCode(new CBC_OnedCodaBarWriter) {}
CBC_Codabar::~CBC_Codabar() {}
-FX_BOOL CBC_Codabar::SetStartChar(FX_CHAR start) {
+bool CBC_Codabar::SetStartChar(FX_CHAR start) {
if (!m_pBCWriter)
- return FALSE;
+ return false;
return static_cast<CBC_OnedCodaBarWriter*>(m_pBCWriter.get())
->SetStartChar(start);
}
-FX_BOOL CBC_Codabar::SetEndChar(FX_CHAR end) {
+bool CBC_Codabar::SetEndChar(FX_CHAR end) {
if (m_pBCWriter)
return static_cast<CBC_OnedCodaBarWriter*>(m_pBCWriter.get())
->SetEndChar(end);
- return FALSE;
+ return false;
}
-FX_BOOL CBC_Codabar::SetTextLocation(BC_TEXT_LOC location) {
+bool CBC_Codabar::SetTextLocation(BC_TEXT_LOC location) {
return static_cast<CBC_OnedCodaBarWriter*>(m_pBCWriter.get())
->SetTextLocation(location);
}
-FX_BOOL CBC_Codabar::SetWideNarrowRatio(int32_t ratio) {
+bool CBC_Codabar::SetWideNarrowRatio(int32_t ratio) {
if (m_pBCWriter)
return static_cast<CBC_OnedCodaBarWriter*>(m_pBCWriter.get())
->SetWideNarrowRatio(ratio);
- return FALSE;
+ return false;
}
-FX_BOOL CBC_Codabar::Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) {
+bool CBC_Codabar::Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) {
if (contents.IsEmpty()) {
e = BCExceptionNoContents;
- return FALSE;
+ return false;
}
BCFORMAT format = BCFORMAT_CODABAR;
int32_t outWidth = 0;
@@ -70,34 +70,34 @@ FX_BOOL CBC_Codabar::Encode(const CFX_WideStringC& contents,
m_renderContents = filtercontents;
uint8_t* data = static_cast<CBC_OnedCodaBarWriter*>(m_pBCWriter.get())
->Encode(byteString, format, outWidth, outHeight, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderResult(filtercontents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_Codabar::RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) {
+bool CBC_Codabar::RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) {
CFX_WideString renderCon =
static_cast<CBC_OnedCodaBarWriter*>(m_pBCWriter.get())
->encodedContents(m_renderContents.AsStringC());
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderDeviceResult(device, matrix, renderCon.AsStringC(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_Codabar::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
+bool CBC_Codabar::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
CFX_WideString renderCon =
static_cast<CBC_OnedCodaBarWriter*>(m_pBCWriter.get())
->encodedContents(m_renderContents.AsStringC());
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderBitmapResult(pOutBitmap, renderCon.AsStringC(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
BC_TYPE CBC_Codabar::GetType() {
diff --git a/xfa/fxbarcode/cbc_codabar.h b/xfa/fxbarcode/cbc_codabar.h
index 2a4ee79e68..28631a9cb5 100644
--- a/xfa/fxbarcode/cbc_codabar.h
+++ b/xfa/fxbarcode/cbc_codabar.h
@@ -18,19 +18,19 @@ class CBC_Codabar : public CBC_OneCode {
~CBC_Codabar() override;
// CBC_OneCode:
- FX_BOOL Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) override;
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) override;
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
+ bool Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) override;
+ bool RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) override;
+ bool RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
BC_TYPE GetType() override;
- FX_BOOL SetStartChar(FX_CHAR start);
- FX_BOOL SetEndChar(FX_CHAR end);
- FX_BOOL SetTextLocation(BC_TEXT_LOC location);
- FX_BOOL SetWideNarrowRatio(int32_t ratio);
+ bool SetStartChar(FX_CHAR start);
+ bool SetEndChar(FX_CHAR end);
+ bool SetTextLocation(BC_TEXT_LOC location);
+ bool SetWideNarrowRatio(int32_t ratio);
private:
CFX_WideString m_renderContents;
diff --git a/xfa/fxbarcode/cbc_code128.cpp b/xfa/fxbarcode/cbc_code128.cpp
index 8615cd40df..99c3c21e0f 100644
--- a/xfa/fxbarcode/cbc_code128.cpp
+++ b/xfa/fxbarcode/cbc_code128.cpp
@@ -28,19 +28,19 @@ CBC_Code128::CBC_Code128(BC_TYPE type)
CBC_Code128::~CBC_Code128() {}
-FX_BOOL CBC_Code128::SetTextLocation(BC_TEXT_LOC location) {
+bool CBC_Code128::SetTextLocation(BC_TEXT_LOC location) {
if (m_pBCWriter)
return static_cast<CBC_OnedCode128Writer*>(m_pBCWriter.get())
->SetTextLocation(location);
- return FALSE;
+ return false;
}
-FX_BOOL CBC_Code128::Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) {
+bool CBC_Code128::Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) {
if (contents.IsEmpty()) {
e = BCExceptionNoContents;
- return FALSE;
+ return false;
}
BCFORMAT format = BCFORMAT_CODE_128;
int32_t outWidth = 0;
@@ -58,28 +58,28 @@ FX_BOOL CBC_Code128::Encode(const CFX_WideStringC& contents,
CFX_ByteString byteString = encodeContents.UTF8Encode();
uint8_t* data = static_cast<CBC_OnedCode128Writer*>(m_pBCWriter.get())
->Encode(byteString, format, outWidth, outHeight, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderResult(encodeContents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_Code128::RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) {
+bool CBC_Code128::RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) {
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderDeviceResult(device, matrix, m_renderContents.AsStringC(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_Code128::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
+bool CBC_Code128::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderBitmapResult(pOutBitmap, m_renderContents.AsStringC(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
BC_TYPE CBC_Code128::GetType() {
diff --git a/xfa/fxbarcode/cbc_code128.h b/xfa/fxbarcode/cbc_code128.h
index 4404f6c1e3..0dd9c84f68 100644
--- a/xfa/fxbarcode/cbc_code128.h
+++ b/xfa/fxbarcode/cbc_code128.h
@@ -18,16 +18,16 @@ class CBC_Code128 : public CBC_OneCode {
~CBC_Code128() override;
// CBC_OneCode:
- FX_BOOL Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) override;
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) override;
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
+ bool Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) override;
+ bool RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) override;
+ bool RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
BC_TYPE GetType() override;
- FX_BOOL SetTextLocation(BC_TEXT_LOC loction);
+ bool SetTextLocation(BC_TEXT_LOC loction);
private:
CFX_WideString m_renderContents;
diff --git a/xfa/fxbarcode/cbc_code39.cpp b/xfa/fxbarcode/cbc_code39.cpp
index bbf4123d42..e90abb9d72 100644
--- a/xfa/fxbarcode/cbc_code39.cpp
+++ b/xfa/fxbarcode/cbc_code39.cpp
@@ -27,12 +27,12 @@ CBC_Code39::CBC_Code39() : CBC_OneCode(new CBC_OnedCode39Writer) {}
CBC_Code39::~CBC_Code39() {}
-FX_BOOL CBC_Code39::Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) {
+bool CBC_Code39::Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) {
if (contents.IsEmpty()) {
e = BCExceptionNoContents;
- return FALSE;
+ return false;
}
BCFORMAT format = BCFORMAT_CODE_39;
int32_t outWidth = 0;
@@ -47,50 +47,50 @@ FX_BOOL CBC_Code39::Encode(const CFX_WideStringC& contents,
CFX_ByteString byteString = filtercontents.UTF8Encode();
uint8_t* data = static_cast<CBC_OnedCode39Writer*>(m_pBCWriter.get())
->Encode(byteString, format, outWidth, outHeight, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderResult(renderContents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_Code39::RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) {
+bool CBC_Code39::RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) {
CFX_WideString renderCon =
static_cast<CBC_OnedCode39Writer*>(m_pBCWriter.get())
->encodedContents(m_renderContents.AsStringC(), e);
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderDeviceResult(device, matrix, renderCon.AsStringC(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_Code39::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
+bool CBC_Code39::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
CFX_WideString renderCon =
static_cast<CBC_OnedCode39Writer*>(m_pBCWriter.get())
->encodedContents(m_renderContents.AsStringC(), e);
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderBitmapResult(pOutBitmap, renderCon.AsStringC(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
BC_TYPE CBC_Code39::GetType() {
return BC_CODE39;
}
-FX_BOOL CBC_Code39::SetTextLocation(BC_TEXT_LOC location) {
+bool CBC_Code39::SetTextLocation(BC_TEXT_LOC location) {
if (m_pBCWriter)
return static_cast<CBC_OnedCode39Writer*>(m_pBCWriter.get())
->SetTextLocation(location);
- return FALSE;
+ return false;
}
-FX_BOOL CBC_Code39::SetWideNarrowRatio(int32_t ratio) {
+bool CBC_Code39::SetWideNarrowRatio(int32_t ratio) {
if (m_pBCWriter)
return static_cast<CBC_OnedCode39Writer*>(m_pBCWriter.get())
->SetWideNarrowRatio(ratio);
- return FALSE;
+ return false;
}
diff --git a/xfa/fxbarcode/cbc_code39.h b/xfa/fxbarcode/cbc_code39.h
index 42edf8e35f..7f5c627c6c 100644
--- a/xfa/fxbarcode/cbc_code39.h
+++ b/xfa/fxbarcode/cbc_code39.h
@@ -18,17 +18,17 @@ class CBC_Code39 : public CBC_OneCode {
~CBC_Code39() override;
// CBC_OneCode:
- FX_BOOL Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) override;
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) override;
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
+ bool Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) override;
+ bool RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) override;
+ bool RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
BC_TYPE GetType() override;
- FX_BOOL SetTextLocation(BC_TEXT_LOC location);
- FX_BOOL SetWideNarrowRatio(int32_t ratio);
+ bool SetTextLocation(BC_TEXT_LOC location);
+ bool SetWideNarrowRatio(int32_t ratio);
private:
CFX_WideString m_renderContents;
diff --git a/xfa/fxbarcode/cbc_codebase.cpp b/xfa/fxbarcode/cbc_codebase.cpp
index c7d4f19118..5b4cb713bb 100644
--- a/xfa/fxbarcode/cbc_codebase.cpp
+++ b/xfa/fxbarcode/cbc_codebase.cpp
@@ -27,23 +27,23 @@ CBC_CodeBase::CBC_CodeBase(CBC_Writer* pWriter) : m_pBCWriter(pWriter) {}
CBC_CodeBase::~CBC_CodeBase() {}
-FX_BOOL CBC_CodeBase::SetCharEncoding(int32_t encoding) {
+bool CBC_CodeBase::SetCharEncoding(int32_t encoding) {
return m_pBCWriter && m_pBCWriter->SetCharEncoding(encoding);
}
-FX_BOOL CBC_CodeBase::SetModuleHeight(int32_t moduleHeight) {
+bool CBC_CodeBase::SetModuleHeight(int32_t moduleHeight) {
return m_pBCWriter && m_pBCWriter->SetModuleHeight(moduleHeight);
}
-FX_BOOL CBC_CodeBase::SetModuleWidth(int32_t moduleWidth) {
+bool CBC_CodeBase::SetModuleWidth(int32_t moduleWidth) {
return m_pBCWriter && m_pBCWriter->SetModuleWidth(moduleWidth);
}
-FX_BOOL CBC_CodeBase::SetHeight(int32_t height) {
+bool CBC_CodeBase::SetHeight(int32_t height) {
return m_pBCWriter && m_pBCWriter->SetHeight(height);
}
-FX_BOOL CBC_CodeBase::SetWidth(int32_t width) {
+bool CBC_CodeBase::SetWidth(int32_t width) {
return m_pBCWriter && m_pBCWriter->SetWidth(width);
}
diff --git a/xfa/fxbarcode/cbc_codebase.h b/xfa/fxbarcode/cbc_codebase.h
index 886095aaba..c28c08b7e7 100644
--- a/xfa/fxbarcode/cbc_codebase.h
+++ b/xfa/fxbarcode/cbc_codebase.h
@@ -24,19 +24,19 @@ class CBC_CodeBase {
virtual ~CBC_CodeBase();
virtual BC_TYPE GetType() = 0;
- virtual FX_BOOL Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) = 0;
- virtual FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) = 0;
- virtual FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) = 0;
-
- FX_BOOL SetCharEncoding(int32_t encoding);
- FX_BOOL SetModuleHeight(int32_t moduleHeight);
- FX_BOOL SetModuleWidth(int32_t moduleWidth);
- FX_BOOL SetHeight(int32_t height);
- FX_BOOL SetWidth(int32_t width);
+ virtual bool Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) = 0;
+ virtual bool RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) = 0;
+ virtual bool RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) = 0;
+
+ bool SetCharEncoding(int32_t encoding);
+ bool SetModuleHeight(int32_t moduleHeight);
+ bool SetModuleWidth(int32_t moduleWidth);
+ bool SetHeight(int32_t height);
+ bool SetWidth(int32_t width);
void SetBackgroundColor(FX_ARGB backgroundColor);
void SetBarcodeColor(FX_ARGB foregroundColor);
diff --git a/xfa/fxbarcode/cbc_datamatrix.cpp b/xfa/fxbarcode/cbc_datamatrix.cpp
index 3c86743b9f..86ca75d04a 100644
--- a/xfa/fxbarcode/cbc_datamatrix.cpp
+++ b/xfa/fxbarcode/cbc_datamatrix.cpp
@@ -27,35 +27,35 @@ CBC_DataMatrix::CBC_DataMatrix() : CBC_CodeBase(new CBC_DataMatrixWriter) {}
CBC_DataMatrix::~CBC_DataMatrix() {}
-FX_BOOL CBC_DataMatrix::Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) {
+bool CBC_DataMatrix::Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) {
int32_t outWidth = 0;
int32_t outHeight = 0;
uint8_t* data =
static_cast<CBC_DataMatrixWriter*>(m_pBCWriter.get())
->Encode(CFX_WideString(contents), outWidth, outHeight, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
static_cast<CBC_TwoDimWriter*>(m_pBCWriter.get())
->RenderResult(data, outWidth, outHeight, e);
FX_Free(data);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_DataMatrix::RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) {
+bool CBC_DataMatrix::RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) {
static_cast<CBC_TwoDimWriter*>(m_pBCWriter.get())
->RenderDeviceResult(device, matrix);
- return TRUE;
+ return true;
}
-FX_BOOL CBC_DataMatrix::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
+bool CBC_DataMatrix::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
static_cast<CBC_TwoDimWriter*>(m_pBCWriter.get())
->RenderBitmapResult(pOutBitmap, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
BC_TYPE CBC_DataMatrix::GetType() {
diff --git a/xfa/fxbarcode/cbc_datamatrix.h b/xfa/fxbarcode/cbc_datamatrix.h
index df2e5ad241..661b48d744 100644
--- a/xfa/fxbarcode/cbc_datamatrix.h
+++ b/xfa/fxbarcode/cbc_datamatrix.h
@@ -18,13 +18,13 @@ class CBC_DataMatrix : public CBC_CodeBase {
~CBC_DataMatrix() override;
// CBC_OneCode:
- FX_BOOL Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) override;
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) override;
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
+ bool Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) override;
+ bool RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) override;
+ bool RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
BC_TYPE GetType() override;
};
diff --git a/xfa/fxbarcode/cbc_ean13.cpp b/xfa/fxbarcode/cbc_ean13.cpp
index 831f68ca8c..d696897165 100644
--- a/xfa/fxbarcode/cbc_ean13.cpp
+++ b/xfa/fxbarcode/cbc_ean13.cpp
@@ -48,12 +48,12 @@ CFX_WideString CBC_EAN13::Preprocess(const CFX_WideStringC& contents) {
return encodeContents;
}
-FX_BOOL CBC_EAN13::Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) {
+bool CBC_EAN13::Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) {
if (contents.IsEmpty()) {
e = BCExceptionNoContents;
- return FALSE;
+ return false;
}
BCFORMAT format = BCFORMAT_EAN_13;
int32_t outWidth = 0;
@@ -63,28 +63,28 @@ FX_BOOL CBC_EAN13::Encode(const CFX_WideStringC& contents,
m_renderContents = encodeContents;
uint8_t* data = static_cast<CBC_OnedEAN13Writer*>(m_pBCWriter.get())
->Encode(byteString, format, outWidth, outHeight, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderResult(encodeContents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_EAN13::RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) {
+bool CBC_EAN13::RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) {
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderDeviceResult(device, matrix, m_renderContents.AsStringC(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_EAN13::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
+bool CBC_EAN13::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderBitmapResult(pOutBitmap, m_renderContents.AsStringC(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
BC_TYPE CBC_EAN13::GetType() {
diff --git a/xfa/fxbarcode/cbc_ean13.h b/xfa/fxbarcode/cbc_ean13.h
index d42c2fdbc1..f0e7940a04 100644
--- a/xfa/fxbarcode/cbc_ean13.h
+++ b/xfa/fxbarcode/cbc_ean13.h
@@ -18,13 +18,13 @@ class CBC_EAN13 : public CBC_OneCode {
~CBC_EAN13() override;
// CBC_OneCode:
- FX_BOOL Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) override;
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) override;
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
+ bool Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) override;
+ bool RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) override;
+ bool RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
BC_TYPE GetType() override;
private:
diff --git a/xfa/fxbarcode/cbc_ean8.cpp b/xfa/fxbarcode/cbc_ean8.cpp
index 4635c6b55d..2c1ce24b55 100644
--- a/xfa/fxbarcode/cbc_ean8.cpp
+++ b/xfa/fxbarcode/cbc_ean8.cpp
@@ -47,12 +47,12 @@ CFX_WideString CBC_EAN8::Preprocess(const CFX_WideStringC& contents) {
return encodeContents;
}
-FX_BOOL CBC_EAN8::Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) {
+bool CBC_EAN8::Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) {
if (contents.IsEmpty()) {
e = BCExceptionNoContents;
- return FALSE;
+ return false;
}
BCFORMAT format = BCFORMAT_EAN_8;
int32_t outWidth = 0;
@@ -62,28 +62,28 @@ FX_BOOL CBC_EAN8::Encode(const CFX_WideStringC& contents,
m_renderContents = encodeContents;
uint8_t* data = static_cast<CBC_OnedEAN8Writer*>(m_pBCWriter.get())
->Encode(byteString, format, outWidth, outHeight, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderResult(encodeContents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_EAN8::RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) {
+bool CBC_EAN8::RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) {
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderDeviceResult(device, matrix, m_renderContents.AsStringC(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_EAN8::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
+bool CBC_EAN8::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderBitmapResult(pOutBitmap, m_renderContents.AsStringC(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
BC_TYPE CBC_EAN8::GetType() {
diff --git a/xfa/fxbarcode/cbc_ean8.h b/xfa/fxbarcode/cbc_ean8.h
index ffd06e51d5..6a475cb795 100644
--- a/xfa/fxbarcode/cbc_ean8.h
+++ b/xfa/fxbarcode/cbc_ean8.h
@@ -18,13 +18,13 @@ class CBC_EAN8 : public CBC_OneCode {
~CBC_EAN8() override;
// CBC_OneCode:
- FX_BOOL Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) override;
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) override;
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
+ bool Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) override;
+ bool RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) override;
+ bool RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
BC_TYPE GetType() override;
private:
diff --git a/xfa/fxbarcode/cbc_onecode.cpp b/xfa/fxbarcode/cbc_onecode.cpp
index 6fc68d88cd..55c2837bd4 100644
--- a/xfa/fxbarcode/cbc_onecode.cpp
+++ b/xfa/fxbarcode/cbc_onecode.cpp
@@ -27,7 +27,7 @@ CBC_OneCode::CBC_OneCode(CBC_Writer* pWriter) : CBC_CodeBase(pWriter) {}
CBC_OneCode::~CBC_OneCode() {}
-FX_BOOL CBC_OneCode::CheckContentValidity(const CFX_WideStringC& contents) {
+bool CBC_OneCode::CheckContentValidity(const CFX_WideStringC& contents) {
return m_pBCWriter &&
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->CheckContentValidity(contents);
@@ -40,7 +40,7 @@ CFX_WideString CBC_OneCode::FilterContents(const CFX_WideStringC& contents) {
->FilterContents(contents);
}
-void CBC_OneCode::SetPrintChecksum(FX_BOOL checksum) {
+void CBC_OneCode::SetPrintChecksum(bool checksum) {
if (m_pBCWriter)
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->SetPrintChecksum(checksum);
@@ -51,15 +51,15 @@ void CBC_OneCode::SetDataLength(int32_t length) {
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())->SetDataLength(length);
}
-void CBC_OneCode::SetCalChecksum(FX_BOOL calc) {
+void CBC_OneCode::SetCalChecksum(bool calc) {
if (m_pBCWriter)
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())->SetCalcChecksum(calc);
}
-FX_BOOL CBC_OneCode::SetFont(CFX_Font* cFont) {
+bool CBC_OneCode::SetFont(CFX_Font* cFont) {
if (m_pBCWriter)
return static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())->SetFont(cFont);
- return FALSE;
+ return false;
}
void CBC_OneCode::SetFontSize(FX_FLOAT size) {
diff --git a/xfa/fxbarcode/cbc_onecode.h b/xfa/fxbarcode/cbc_onecode.h
index f6c992bde1..e348b4ee2c 100644
--- a/xfa/fxbarcode/cbc_onecode.h
+++ b/xfa/fxbarcode/cbc_onecode.h
@@ -20,13 +20,13 @@ class CBC_OneCode : public CBC_CodeBase {
explicit CBC_OneCode(CBC_Writer* pWriter);
~CBC_OneCode() override;
- virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
+ virtual bool CheckContentValidity(const CFX_WideStringC& contents);
virtual CFX_WideString FilterContents(const CFX_WideStringC& contents);
- virtual void SetPrintChecksum(FX_BOOL checksum);
+ virtual void SetPrintChecksum(bool checksum);
virtual void SetDataLength(int32_t length);
- virtual void SetCalChecksum(FX_BOOL calc);
- virtual FX_BOOL SetFont(CFX_Font* cFont);
+ virtual void SetCalChecksum(bool calc);
+ virtual bool SetFont(CFX_Font* cFont);
virtual void SetFontSize(FX_FLOAT size);
virtual void SetFontStyle(int32_t style);
virtual void SetFontColor(FX_ARGB color);
diff --git a/xfa/fxbarcode/cbc_pdf417i.cpp b/xfa/fxbarcode/cbc_pdf417i.cpp
index 2d9b9819a7..1e147d9448 100644
--- a/xfa/fxbarcode/cbc_pdf417i.cpp
+++ b/xfa/fxbarcode/cbc_pdf417i.cpp
@@ -27,45 +27,45 @@ CBC_PDF417I::CBC_PDF417I() : CBC_CodeBase(new CBC_PDF417Writer) {}
CBC_PDF417I::~CBC_PDF417I() {}
-FX_BOOL CBC_PDF417I::SetErrorCorrectionLevel(int32_t level) {
+bool CBC_PDF417I::SetErrorCorrectionLevel(int32_t level) {
static_cast<CBC_PDF417Writer*>(m_pBCWriter.get())
->SetErrorCorrectionLevel(level);
- return TRUE;
+ return true;
}
-void CBC_PDF417I::SetTruncated(FX_BOOL truncated) {
+void CBC_PDF417I::SetTruncated(bool truncated) {
static_cast<CBC_PDF417Writer*>(m_pBCWriter.get())->SetTruncated(truncated);
}
-FX_BOOL CBC_PDF417I::Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) {
+bool CBC_PDF417I::Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) {
int32_t outWidth = 0;
int32_t outHeight = 0;
uint8_t* data =
static_cast<CBC_PDF417Writer*>(m_pBCWriter.get())
->Encode(CFX_WideString(contents), outWidth, outHeight, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
static_cast<CBC_TwoDimWriter*>(m_pBCWriter.get())
->RenderResult(data, outWidth, outHeight, e);
FX_Free(data);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_PDF417I::RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) {
+bool CBC_PDF417I::RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) {
static_cast<CBC_TwoDimWriter*>(m_pBCWriter.get())
->RenderDeviceResult(device, matrix);
- return TRUE;
+ return true;
}
-FX_BOOL CBC_PDF417I::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
+bool CBC_PDF417I::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
static_cast<CBC_TwoDimWriter*>(m_pBCWriter.get())
->RenderBitmapResult(pOutBitmap, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
BC_TYPE CBC_PDF417I::GetType() {
diff --git a/xfa/fxbarcode/cbc_pdf417i.h b/xfa/fxbarcode/cbc_pdf417i.h
index 6067282de8..70ea929820 100644
--- a/xfa/fxbarcode/cbc_pdf417i.h
+++ b/xfa/fxbarcode/cbc_pdf417i.h
@@ -18,17 +18,17 @@ class CBC_PDF417I : public CBC_CodeBase {
~CBC_PDF417I() override;
// CBC_CodeBase::
- FX_BOOL Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) override;
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) override;
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
+ bool Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) override;
+ bool RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) override;
+ bool RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
BC_TYPE GetType() override;
- FX_BOOL SetErrorCorrectionLevel(int32_t level);
- void SetTruncated(FX_BOOL truncated);
+ bool SetErrorCorrectionLevel(int32_t level);
+ void SetTruncated(bool truncated);
};
#endif // XFA_FXBARCODE_CBC_PDF417I_H_
diff --git a/xfa/fxbarcode/cbc_qrcode.cpp b/xfa/fxbarcode/cbc_qrcode.cpp
index db3cad0dda..507b8f9ffe 100644
--- a/xfa/fxbarcode/cbc_qrcode.cpp
+++ b/xfa/fxbarcode/cbc_qrcode.cpp
@@ -27,51 +27,51 @@ CBC_QRCode::CBC_QRCode() : CBC_CodeBase(new CBC_QRCodeWriter) {}
CBC_QRCode::~CBC_QRCode() {}
-FX_BOOL CBC_QRCode::SetVersion(int32_t version) {
+bool CBC_QRCode::SetVersion(int32_t version) {
if (version < 0 || version > 40)
- return FALSE;
+ return false;
return m_pBCWriter &&
static_cast<CBC_QRCodeWriter*>(m_pBCWriter.get())->SetVersion(version);
}
-FX_BOOL CBC_QRCode::SetErrorCorrectionLevel(int32_t level) {
+bool CBC_QRCode::SetErrorCorrectionLevel(int32_t level) {
if (level < 0 || level > 3)
- return FALSE;
+ return false;
return m_pBCWriter &&
static_cast<CBC_TwoDimWriter*>(m_pBCWriter.get())
->SetErrorCorrectionLevel(level);
}
-FX_BOOL CBC_QRCode::Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) {
+bool CBC_QRCode::Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) {
int32_t outWidth = 0;
int32_t outHeight = 0;
CBC_QRCodeWriter* pWriter = static_cast<CBC_QRCodeWriter*>(m_pBCWriter.get());
uint8_t* data = pWriter->Encode(CFX_WideString(contents),
pWriter->GetErrorCorrectionLevel(), outWidth,
outHeight, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
pWriter->RenderResult(data, outWidth, outHeight, e);
FX_Free(data);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_QRCode::RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) {
+bool CBC_QRCode::RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) {
static_cast<CBC_TwoDimWriter*>(m_pBCWriter.get())
->RenderDeviceResult(device, matrix);
- return TRUE;
+ return true;
}
-FX_BOOL CBC_QRCode::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
+bool CBC_QRCode::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
static_cast<CBC_TwoDimWriter*>(m_pBCWriter.get())
->RenderBitmapResult(pOutBitmap, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
BC_TYPE CBC_QRCode::GetType() {
diff --git a/xfa/fxbarcode/cbc_qrcode.h b/xfa/fxbarcode/cbc_qrcode.h
index e3b554b109..ac2d93d915 100644
--- a/xfa/fxbarcode/cbc_qrcode.h
+++ b/xfa/fxbarcode/cbc_qrcode.h
@@ -18,17 +18,17 @@ class CBC_QRCode : public CBC_CodeBase {
~CBC_QRCode() override;
// CBC_CodeBase:
- FX_BOOL Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) override;
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) override;
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
+ bool Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) override;
+ bool RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) override;
+ bool RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
BC_TYPE GetType() override;
- FX_BOOL SetVersion(int32_t version);
- FX_BOOL SetErrorCorrectionLevel(int32_t level);
+ bool SetVersion(int32_t version);
+ bool SetErrorCorrectionLevel(int32_t level);
};
#endif // XFA_FXBARCODE_CBC_QRCODE_H_
diff --git a/xfa/fxbarcode/cbc_upca.cpp b/xfa/fxbarcode/cbc_upca.cpp
index 8ed3e08eb9..db8f722828 100644
--- a/xfa/fxbarcode/cbc_upca.cpp
+++ b/xfa/fxbarcode/cbc_upca.cpp
@@ -47,12 +47,12 @@ CFX_WideString CBC_UPCA::Preprocess(const CFX_WideStringC& contents) {
return encodeContents;
}
-FX_BOOL CBC_UPCA::Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) {
+bool CBC_UPCA::Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) {
if (contents.IsEmpty()) {
e = BCExceptionNoContents;
- return FALSE;
+ return false;
}
BCFORMAT format = BCFORMAT_UPC_A;
int32_t outWidth = 0;
@@ -66,28 +66,28 @@ FX_BOOL CBC_UPCA::Encode(const CFX_WideStringC& contents,
pWriter->Init();
uint8_t* data = pWriter->Encode(byteString, format, outWidth, outHeight, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
pWriter->RenderResult(encodeContents.AsStringC(), data, outWidth, isDevice,
e);
FX_Free(data);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_UPCA::RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) {
+bool CBC_UPCA::RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) {
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderDeviceResult(device, matrix, m_renderContents.AsStringC(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
-FX_BOOL CBC_UPCA::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
+bool CBC_UPCA::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
static_cast<CBC_OneDimWriter*>(m_pBCWriter.get())
->RenderBitmapResult(pOutBitmap, m_renderContents.AsStringC(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
- return TRUE;
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
+ return true;
}
BC_TYPE CBC_UPCA::GetType() {
diff --git a/xfa/fxbarcode/cbc_upca.h b/xfa/fxbarcode/cbc_upca.h
index 11769f361e..bf90b922b5 100644
--- a/xfa/fxbarcode/cbc_upca.h
+++ b/xfa/fxbarcode/cbc_upca.h
@@ -18,13 +18,13 @@ class CBC_UPCA : public CBC_OneCode {
~CBC_UPCA() override;
// CBC_CodeBase
- FX_BOOL Encode(const CFX_WideStringC& contents,
- FX_BOOL isDevice,
- int32_t& e) override;
- FX_BOOL RenderDevice(CFX_RenderDevice* device,
- const CFX_Matrix* matrix,
- int32_t& e) override;
- FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
+ bool Encode(const CFX_WideStringC& contents,
+ bool isDevice,
+ int32_t& e) override;
+ bool RenderDevice(CFX_RenderDevice* device,
+ const CFX_Matrix* matrix,
+ int32_t& e) override;
+ bool RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
BC_TYPE GetType() override;
private:
diff --git a/xfa/fxbarcode/common/BC_CommonBitArray.cpp b/xfa/fxbarcode/common/BC_CommonBitArray.cpp
index b39e4acd88..722bbc501d 100644
--- a/xfa/fxbarcode/common/BC_CommonBitArray.cpp
+++ b/xfa/fxbarcode/common/BC_CommonBitArray.cpp
@@ -47,7 +47,7 @@ CFX_Int32Array& CBC_CommonBitArray::GetBits() {
int32_t CBC_CommonBitArray::GetSizeInBytes() {
return (m_size + 7) >> 3;
}
-FX_BOOL CBC_CommonBitArray::Get(int32_t i) {
+bool CBC_CommonBitArray::Get(int32_t i) {
return (m_bits[i >> 5] & (1 << (i & 0x1f))) != 0;
}
void CBC_CommonBitArray::Set(int32_t i) {
@@ -62,16 +62,16 @@ void CBC_CommonBitArray::SetBulk(int32_t i, int32_t newBits) {
void CBC_CommonBitArray::Clear() {
FXSYS_memset(&m_bits[0], 0x00, m_bits.GetSize() * sizeof(int32_t));
}
-FX_BOOL CBC_CommonBitArray::IsRange(int32_t start,
- int32_t end,
- FX_BOOL value,
- int32_t& e) {
+bool CBC_CommonBitArray::IsRange(int32_t start,
+ int32_t end,
+ bool value,
+ int32_t& e) {
if (end < start) {
e = BCExceptionEndLessThanStart;
- return FALSE;
+ return false;
}
if (end == start) {
- return TRUE;
+ return true;
}
end--;
int32_t firstInt = start >> 5;
@@ -90,10 +90,10 @@ FX_BOOL CBC_CommonBitArray::IsRange(int32_t start,
}
}
if ((m_bits[i] & mask) != (value ? mask : 0)) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
int32_t* CBC_CommonBitArray::GetBitArray() {
return &m_bits[0];
diff --git a/xfa/fxbarcode/common/BC_CommonBitArray.h b/xfa/fxbarcode/common/BC_CommonBitArray.h
index 6955d5b288..80a56d1b53 100644
--- a/xfa/fxbarcode/common/BC_CommonBitArray.h
+++ b/xfa/fxbarcode/common/BC_CommonBitArray.h
@@ -19,11 +19,11 @@ class CBC_CommonBitArray {
int32_t GetSize();
CFX_Int32Array& GetBits();
int32_t GetSizeInBytes();
- FX_BOOL Get(int32_t i);
+ bool Get(int32_t i);
void Set(int32_t i);
void Flip(int32_t i);
void SetBulk(int32_t i, int32_t newBits);
- FX_BOOL IsRange(int32_t start, int32_t end, FX_BOOL value, int32_t& e);
+ bool IsRange(int32_t start, int32_t end, bool value, int32_t& e);
int32_t* GetBitArray();
void Reverse();
void Clear();
diff --git a/xfa/fxbarcode/common/BC_CommonBitMatrix.cpp b/xfa/fxbarcode/common/BC_CommonBitMatrix.cpp
index e52f3dca04..b9b218c60f 100644
--- a/xfa/fxbarcode/common/BC_CommonBitMatrix.cpp
+++ b/xfa/fxbarcode/common/BC_CommonBitMatrix.cpp
@@ -49,7 +49,7 @@ void CBC_CommonBitMatrix::Init(int32_t width, int32_t height) {
CBC_CommonBitMatrix::~CBC_CommonBitMatrix() {
FX_Free(m_bits);
}
-FX_BOOL CBC_CommonBitMatrix::Get(int32_t x, int32_t y) {
+bool CBC_CommonBitMatrix::Get(int32_t x, int32_t y) {
int32_t offset = y * m_rowSize + (x >> 5);
if (offset >= m_rowSize * m_height || offset < 0) {
return false;
diff --git a/xfa/fxbarcode/common/BC_CommonBitMatrix.h b/xfa/fxbarcode/common/BC_CommonBitMatrix.h
index 98291f0130..ed1f684a37 100644
--- a/xfa/fxbarcode/common/BC_CommonBitMatrix.h
+++ b/xfa/fxbarcode/common/BC_CommonBitMatrix.h
@@ -19,7 +19,7 @@ class CBC_CommonBitMatrix {
virtual void Init(int32_t dimension);
virtual void Init(int32_t width, int32_t height);
- FX_BOOL Get(int32_t x, int32_t y);
+ bool Get(int32_t x, int32_t y);
void Set(int32_t x, int32_t y);
void Flip(int32_t x, int32_t y);
void Clear();
diff --git a/xfa/fxbarcode/common/BC_CommonByteArray.cpp b/xfa/fxbarcode/common/BC_CommonByteArray.cpp
index afa8ac6836..71fa85f0c4 100644
--- a/xfa/fxbarcode/common/BC_CommonByteArray.cpp
+++ b/xfa/fxbarcode/common/BC_CommonByteArray.cpp
@@ -53,7 +53,7 @@ void CBC_CommonByteArray::Set(int32_t index, int32_t value) {
int32_t CBC_CommonByteArray::Size() const {
return m_size;
}
-FX_BOOL CBC_CommonByteArray::IsEmpty() const {
+bool CBC_CommonByteArray::IsEmpty() const {
return m_size == 0;
}
void CBC_CommonByteArray::AppendByte(int32_t value) {
diff --git a/xfa/fxbarcode/common/BC_CommonByteArray.h b/xfa/fxbarcode/common/BC_CommonByteArray.h
index bdac6a6963..dd6ee581ef 100644
--- a/xfa/fxbarcode/common/BC_CommonByteArray.h
+++ b/xfa/fxbarcode/common/BC_CommonByteArray.h
@@ -20,7 +20,7 @@ class CBC_CommonByteArray {
int32_t At(int32_t index) const;
int32_t Size() const;
- FX_BOOL IsEmpty() const;
+ bool IsEmpty() const;
void Set(int32_t index, int32_t value);
void AppendByte(int32_t value);
void Reserve(int32_t capacity);
diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp
index 0e376ce1a8..60f1f1bbed 100644
--- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp
+++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp
@@ -70,7 +70,7 @@ CFX_Int32Array* CBC_ReedSolomonGF256Poly::GetCoefficients() {
int32_t CBC_ReedSolomonGF256Poly::GetDegree() {
return m_coefficients.GetSize() - 1;
}
-FX_BOOL CBC_ReedSolomonGF256Poly::IsZero() {
+bool CBC_ReedSolomonGF256Poly::IsZero() {
return m_coefficients[0] == 0;
}
int32_t CBC_ReedSolomonGF256Poly::GetCoefficients(int32_t degree) {
diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h
index 3e840f528b..3eff31b622 100644
--- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h
+++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h
@@ -23,7 +23,7 @@ class CBC_ReedSolomonGF256Poly final {
int32_t GetCoefficients(int32_t degree);
CFX_Int32Array* GetCoefficients();
int32_t GetDegree();
- FX_BOOL IsZero();
+ bool IsZero();
int32_t EvaluateAt(int32_t a);
CBC_ReedSolomonGF256Poly* AddOrSubtract(CBC_ReedSolomonGF256Poly* other,
int32_t& e);
diff --git a/xfa/fxbarcode/datamatrix/BC_Base256Encoder.cpp b/xfa/fxbarcode/datamatrix/BC_Base256Encoder.cpp
index 98e7848ce8..b8e427c7fc 100644
--- a/xfa/fxbarcode/datamatrix/BC_Base256Encoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_Base256Encoder.cpp
@@ -58,7 +58,7 @@ void CBC_Base256Encoder::Encode(CBC_EncoderContext& context, int32_t& e) {
if (e != BCExceptionNO) {
return;
}
- FX_BOOL mustPad = (context.m_symbolInfo->m_dataCapacity - currentSize) > 0;
+ bool mustPad = (context.m_symbolInfo->m_dataCapacity - currentSize) > 0;
if (context.hasMoreCharacters() || mustPad) {
if (dataCount <= 249) {
buffer.SetAt(0, (FX_WCHAR)dataCount);
diff --git a/xfa/fxbarcode/datamatrix/BC_DataMatrixSymbolInfo144.cpp b/xfa/fxbarcode/datamatrix/BC_DataMatrixSymbolInfo144.cpp
index 16c253f062..e580bb583f 100644
--- a/xfa/fxbarcode/datamatrix/BC_DataMatrixSymbolInfo144.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_DataMatrixSymbolInfo144.cpp
@@ -26,7 +26,7 @@
#include "xfa/fxbarcode/datamatrix/BC_SymbolShapeHint.h"
CBC_DataMatrixSymbolInfo144::CBC_DataMatrixSymbolInfo144()
- : CBC_SymbolInfo(FALSE, 1558, 620, 22, 22, 36) {
+ : CBC_SymbolInfo(false, 1558, 620, 22, 22, 36) {
m_rsBlockData = -1;
m_rsBlockError = 62;
}
diff --git a/xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp b/xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
index 6263b7fbe5..1fe8018631 100644
--- a/xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
@@ -44,9 +44,9 @@
CBC_DataMatrixWriter::CBC_DataMatrixWriter() {}
CBC_DataMatrixWriter::~CBC_DataMatrixWriter() {}
-FX_BOOL CBC_DataMatrixWriter::SetErrorCorrectionLevel(int32_t level) {
+bool CBC_DataMatrixWriter::SetErrorCorrectionLevel(int32_t level) {
m_iCorrectLevel = level;
- return TRUE;
+ return true;
}
uint8_t* CBC_DataMatrixWriter::Encode(const CFX_WideString& contents,
int32_t& outWidth,
@@ -65,7 +65,7 @@ uint8_t* CBC_DataMatrixWriter::Encode(const CFX_WideString& contents,
contents, ecLevel, shape, minSize, maxSize, e);
BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
CBC_SymbolInfo* symbolInfo = CBC_SymbolInfo::lookup(
- encoded.GetLength(), shape, minSize, maxSize, TRUE, e);
+ encoded.GetLength(), shape, minSize, maxSize, true, e);
BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
CFX_WideString codewords =
CBC_ErrorCorrection::encodeECC200(encoded, symbolInfo, e);
@@ -111,7 +111,7 @@ CBC_CommonByteMatrix* CBC_DataMatrixWriter::encodeLowLevel(
matrixX = 0;
for (int32_t x = 0; x < symbolWidth; x++) {
if ((x % symbolInfo->m_matrixWidth) == 0) {
- matrix->Set(matrixX, matrixY, TRUE);
+ matrix->Set(matrixX, matrixY, true);
matrixX++;
}
matrix->Set(matrixX, matrixY, placement->getBit(x, y));
@@ -125,7 +125,7 @@ CBC_CommonByteMatrix* CBC_DataMatrixWriter::encodeLowLevel(
if ((y % symbolInfo->m_matrixHeight) == symbolInfo->m_matrixHeight - 1) {
matrixX = 0;
for (int32_t x = 0; x < symbolInfo->getSymbolWidth(e); x++) {
- matrix->Set(matrixX, matrixY, TRUE);
+ matrix->Set(matrixX, matrixY, true);
matrixX++;
}
matrixY++;
diff --git a/xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.h b/xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.h
index 1196e46352..af1417b588 100644
--- a/xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.h
+++ b/xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.h
@@ -24,7 +24,7 @@ class CBC_DataMatrixWriter : public CBC_TwoDimWriter {
int32_t& e);
// CBC_TwoDimWriter
- FX_BOOL SetErrorCorrectionLevel(int32_t level) override;
+ bool SetErrorCorrectionLevel(int32_t level) override;
private:
static CBC_CommonByteMatrix* encodeLowLevel(CBC_DefaultPlacement* placement,
diff --git a/xfa/fxbarcode/datamatrix/BC_DefaultPlacement.cpp b/xfa/fxbarcode/datamatrix/BC_DefaultPlacement.cpp
index 830df224ca..bc0aa72b42 100644
--- a/xfa/fxbarcode/datamatrix/BC_DefaultPlacement.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_DefaultPlacement.cpp
@@ -46,13 +46,13 @@ int32_t CBC_DefaultPlacement::getNumcols() {
CFX_ByteArray& CBC_DefaultPlacement::getBits() {
return m_bits;
}
-FX_BOOL CBC_DefaultPlacement::getBit(int32_t col, int32_t row) {
+bool CBC_DefaultPlacement::getBit(int32_t col, int32_t row) {
return m_bits[row * m_numcols + col] == 1;
}
-void CBC_DefaultPlacement::setBit(int32_t col, int32_t row, FX_BOOL bit) {
+void CBC_DefaultPlacement::setBit(int32_t col, int32_t row, bool bit) {
m_bits[row * m_numcols + col] = bit ? (uint8_t)1 : (uint8_t)0;
}
-FX_BOOL CBC_DefaultPlacement::hasBit(int32_t col, int32_t row) {
+bool CBC_DefaultPlacement::hasBit(int32_t col, int32_t row) {
return m_bits[row * m_numcols + col] != 2;
}
void CBC_DefaultPlacement::place() {
@@ -92,8 +92,8 @@ void CBC_DefaultPlacement::place() {
col++;
} while ((row < m_numrows) || (col < m_numcols));
if (!hasBit(m_numcols - 1, m_numrows - 1)) {
- setBit(m_numcols - 1, m_numrows - 1, TRUE);
- setBit(m_numcols - 2, m_numrows - 2, TRUE);
+ setBit(m_numcols - 1, m_numrows - 1, true);
+ setBit(m_numcols - 2, m_numrows - 2, true);
}
}
void CBC_DefaultPlacement::module(int32_t row,
diff --git a/xfa/fxbarcode/datamatrix/BC_DefaultPlacement.h b/xfa/fxbarcode/datamatrix/BC_DefaultPlacement.h
index f9b44621b1..64d02886f7 100644
--- a/xfa/fxbarcode/datamatrix/BC_DefaultPlacement.h
+++ b/xfa/fxbarcode/datamatrix/BC_DefaultPlacement.h
@@ -19,9 +19,9 @@ class CBC_DefaultPlacement {
int32_t getNumrows();
int32_t getNumcols();
CFX_ByteArray& getBits();
- FX_BOOL getBit(int32_t col, int32_t row);
- void setBit(int32_t col, int32_t row, FX_BOOL bit);
- FX_BOOL hasBit(int32_t col, int32_t row);
+ bool getBit(int32_t col, int32_t row);
+ void setBit(int32_t col, int32_t row, bool bit);
+ bool hasBit(int32_t col, int32_t row);
void place();
private:
diff --git a/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
index e1d493a1ca..7db117d003 100644
--- a/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
@@ -89,8 +89,8 @@ void CBC_EdifactEncoder::handleEOD(CBC_EncoderContext& context,
if (e != BCExceptionNO) {
return;
}
- FX_BOOL endOfSymbolReached = !context.hasMoreCharacters();
- FX_BOOL restInAscii = endOfSymbolReached && restChars <= 2;
+ bool endOfSymbolReached = !context.hasMoreCharacters();
+ bool restInAscii = endOfSymbolReached && restChars <= 2;
if (restChars <= 2) {
context.updateSymbolInfo(context.getCodewordCount() + restChars, e);
if (e != BCExceptionNO) {
@@ -99,7 +99,7 @@ void CBC_EdifactEncoder::handleEOD(CBC_EncoderContext& context,
int32_t available =
context.m_symbolInfo->m_dataCapacity - context.getCodewordCount();
if (available >= 3) {
- restInAscii = FALSE;
+ restInAscii = false;
context.updateSymbolInfo(context.getCodewordCount() + encoded.GetLength(),
e);
if (e != BCExceptionNO) {
diff --git a/xfa/fxbarcode/datamatrix/BC_EncoderContext.cpp b/xfa/fxbarcode/datamatrix/BC_EncoderContext.cpp
index 6e395837d4..c395f3a914 100644
--- a/xfa/fxbarcode/datamatrix/BC_EncoderContext.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_EncoderContext.cpp
@@ -87,7 +87,7 @@ void CBC_EncoderContext::signalEncoderChange(int32_t encoding) {
void CBC_EncoderContext::resetEncoderSignal() {
m_newEncoding = -1;
}
-FX_BOOL CBC_EncoderContext::hasMoreCharacters() {
+bool CBC_EncoderContext::hasMoreCharacters() {
return m_pos < getTotalMessageCharCount();
}
int32_t CBC_EncoderContext::getRemainingCharacters() {
diff --git a/xfa/fxbarcode/datamatrix/BC_EncoderContext.h b/xfa/fxbarcode/datamatrix/BC_EncoderContext.h
index 0c1c8a6547..8d0ea5d7ed 100644
--- a/xfa/fxbarcode/datamatrix/BC_EncoderContext.h
+++ b/xfa/fxbarcode/datamatrix/BC_EncoderContext.h
@@ -30,7 +30,7 @@ class CBC_EncoderContext : public CBC_SymbolShapeHint {
int32_t getCodewordCount();
void signalEncoderChange(int32_t encoding);
void resetEncoderSignal();
- FX_BOOL hasMoreCharacters();
+ bool hasMoreCharacters();
int32_t getRemainingCharacters();
void updateSymbolInfo(int32_t& e);
void updateSymbolInfo(int32_t len, int32_t& e);
diff --git a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
index 7fcc039721..7d81c93418 100644
--- a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
@@ -156,7 +156,7 @@ int32_t CBC_HighLevelEncoder::lookAheadTest(CFX_WideString msg,
charCounts[currentMode] = 0;
}
int32_t charsProcessed = 0;
- while (TRUE) {
+ while (true) {
if ((startpos + charsProcessed) == msg.GetLength()) {
int32_t min = std::numeric_limits<int32_t>::max();
CFX_ByteArray mins;
@@ -284,10 +284,10 @@ int32_t CBC_HighLevelEncoder::lookAheadTest(CFX_WideString msg,
}
}
}
-FX_BOOL CBC_HighLevelEncoder::isDigit(FX_WCHAR ch) {
+bool CBC_HighLevelEncoder::isDigit(FX_WCHAR ch) {
return ch >= '0' && ch <= '9';
}
-FX_BOOL CBC_HighLevelEncoder::isExtendedASCII(FX_WCHAR ch) {
+bool CBC_HighLevelEncoder::isExtendedASCII(FX_WCHAR ch) {
return ch >= 128 && ch <= 255;
}
int32_t CBC_HighLevelEncoder::determineConsecutiveDigitCount(CFX_WideString msg,
@@ -346,22 +346,22 @@ int32_t CBC_HighLevelEncoder::getMinimumCount(CFX_ByteArray& mins) {
}
return minCount;
}
-FX_BOOL CBC_HighLevelEncoder::isNativeC40(FX_WCHAR ch) {
+bool CBC_HighLevelEncoder::isNativeC40(FX_WCHAR ch) {
return (ch == ' ') || (ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'Z');
}
-FX_BOOL CBC_HighLevelEncoder::isNativeText(FX_WCHAR ch) {
+bool CBC_HighLevelEncoder::isNativeText(FX_WCHAR ch) {
return (ch == ' ') || (ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'z');
}
-FX_BOOL CBC_HighLevelEncoder::isNativeX12(FX_WCHAR ch) {
+bool CBC_HighLevelEncoder::isNativeX12(FX_WCHAR ch) {
return isX12TermSep(ch) || (ch == ' ') || (ch >= '0' && ch <= '9') ||
(ch >= 'A' && ch <= 'Z');
}
-FX_BOOL CBC_HighLevelEncoder::isX12TermSep(FX_WCHAR ch) {
+bool CBC_HighLevelEncoder::isX12TermSep(FX_WCHAR ch) {
return (ch == '\r') || (ch == '*') || (ch == '>');
}
-FX_BOOL CBC_HighLevelEncoder::isNativeEDIFACT(FX_WCHAR ch) {
+bool CBC_HighLevelEncoder::isNativeEDIFACT(FX_WCHAR ch) {
return ch >= ' ' && ch <= '^';
}
-FX_BOOL CBC_HighLevelEncoder::isSpecialB256(FX_WCHAR ch) {
- return FALSE;
+bool CBC_HighLevelEncoder::isSpecialB256(FX_WCHAR ch) {
+ return false;
}
diff --git a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h
index 550b601e53..cf04c06619 100644
--- a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h
+++ b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h
@@ -34,8 +34,8 @@ class CBC_HighLevelEncoder : public CBC_SymbolShapeHint {
static int32_t lookAheadTest(CFX_WideString msg,
int32_t startpos,
int32_t currentMode);
- static FX_BOOL isDigit(FX_WCHAR ch);
- static FX_BOOL isExtendedASCII(FX_WCHAR ch);
+ static bool isDigit(FX_WCHAR ch);
+ static bool isExtendedASCII(FX_WCHAR ch);
static int32_t determineConsecutiveDigitCount(CFX_WideString msg,
int32_t startpos);
static void illegalCharacter(FX_WCHAR c, int32_t& e);
@@ -66,12 +66,12 @@ class CBC_HighLevelEncoder : public CBC_SymbolShapeHint {
int32_t min,
CFX_ByteArray& mins);
static int32_t getMinimumCount(CFX_ByteArray& mins);
- static FX_BOOL isNativeC40(FX_WCHAR ch);
- static FX_BOOL isNativeText(FX_WCHAR ch);
- static FX_BOOL isNativeX12(FX_WCHAR ch);
- static FX_BOOL isX12TermSep(FX_WCHAR ch);
- static FX_BOOL isNativeEDIFACT(FX_WCHAR ch);
- static FX_BOOL isSpecialB256(FX_WCHAR ch);
+ static bool isNativeC40(FX_WCHAR ch);
+ static bool isNativeText(FX_WCHAR ch);
+ static bool isNativeX12(FX_WCHAR ch);
+ static bool isX12TermSep(FX_WCHAR ch);
+ static bool isNativeEDIFACT(FX_WCHAR ch);
+ static bool isSpecialB256(FX_WCHAR ch);
};
#endif // XFA_FXBARCODE_DATAMATRIX_BC_HIGHLEVELENCODER_H_
diff --git a/xfa/fxbarcode/datamatrix/BC_SymbolInfo.cpp b/xfa/fxbarcode/datamatrix/BC_SymbolInfo.cpp
index b6323041f9..77a809a511 100644
--- a/xfa/fxbarcode/datamatrix/BC_SymbolInfo.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_SymbolInfo.cpp
@@ -41,35 +41,35 @@ CBC_SymbolInfo* g_symbols[kSymbolsCount] = {
} // namespace
void CBC_SymbolInfo::Initialize() {
- g_symbols[0] = new CBC_SymbolInfo(FALSE, 3, 5, 8, 8, 1);
- g_symbols[1] = new CBC_SymbolInfo(FALSE, 5, 7, 10, 10, 1);
- g_symbols[2] = new CBC_SymbolInfo(TRUE, 5, 7, 16, 6, 1);
- g_symbols[3] = new CBC_SymbolInfo(FALSE, 8, 10, 12, 12, 1);
- g_symbols[4] = new CBC_SymbolInfo(TRUE, 10, 11, 14, 6, 2);
- g_symbols[5] = new CBC_SymbolInfo(FALSE, 12, 12, 14, 14, 1);
- g_symbols[6] = new CBC_SymbolInfo(TRUE, 16, 14, 24, 10, 1);
- g_symbols[7] = new CBC_SymbolInfo(FALSE, 18, 14, 16, 16, 1);
- g_symbols[8] = new CBC_SymbolInfo(FALSE, 22, 18, 18, 18, 1);
- g_symbols[9] = new CBC_SymbolInfo(TRUE, 22, 18, 16, 10, 2);
- g_symbols[10] = new CBC_SymbolInfo(FALSE, 30, 20, 20, 20, 1);
- g_symbols[11] = new CBC_SymbolInfo(TRUE, 32, 24, 16, 14, 2);
- g_symbols[12] = new CBC_SymbolInfo(FALSE, 36, 24, 22, 22, 1);
- g_symbols[13] = new CBC_SymbolInfo(FALSE, 44, 28, 24, 24, 1);
- g_symbols[14] = new CBC_SymbolInfo(TRUE, 49, 28, 22, 14, 2);
- g_symbols[15] = new CBC_SymbolInfo(FALSE, 62, 36, 14, 14, 4);
- g_symbols[16] = new CBC_SymbolInfo(FALSE, 86, 42, 16, 16, 4);
- g_symbols[17] = new CBC_SymbolInfo(FALSE, 114, 48, 18, 18, 4);
- g_symbols[18] = new CBC_SymbolInfo(FALSE, 144, 56, 20, 20, 4);
- g_symbols[19] = new CBC_SymbolInfo(FALSE, 174, 68, 22, 22, 4);
- g_symbols[20] = new CBC_SymbolInfo(FALSE, 204, 84, 24, 24, 4, 102, 42);
- g_symbols[21] = new CBC_SymbolInfo(FALSE, 280, 112, 14, 14, 16, 140, 56);
- g_symbols[22] = new CBC_SymbolInfo(FALSE, 368, 144, 16, 16, 16, 92, 36);
- g_symbols[23] = new CBC_SymbolInfo(FALSE, 456, 192, 18, 18, 16, 114, 48);
- g_symbols[24] = new CBC_SymbolInfo(FALSE, 576, 224, 20, 20, 16, 144, 56);
- g_symbols[25] = new CBC_SymbolInfo(FALSE, 696, 272, 22, 22, 16, 174, 68);
- g_symbols[26] = new CBC_SymbolInfo(FALSE, 816, 336, 24, 24, 16, 136, 56);
- g_symbols[27] = new CBC_SymbolInfo(FALSE, 1050, 408, 18, 18, 36, 175, 68);
- g_symbols[28] = new CBC_SymbolInfo(FALSE, 1304, 496, 20, 20, 36, 163, 62);
+ g_symbols[0] = new CBC_SymbolInfo(false, 3, 5, 8, 8, 1);
+ g_symbols[1] = new CBC_SymbolInfo(false, 5, 7, 10, 10, 1);
+ g_symbols[2] = new CBC_SymbolInfo(true, 5, 7, 16, 6, 1);
+ g_symbols[3] = new CBC_SymbolInfo(false, 8, 10, 12, 12, 1);
+ g_symbols[4] = new CBC_SymbolInfo(true, 10, 11, 14, 6, 2);
+ g_symbols[5] = new CBC_SymbolInfo(false, 12, 12, 14, 14, 1);
+ g_symbols[6] = new CBC_SymbolInfo(true, 16, 14, 24, 10, 1);
+ g_symbols[7] = new CBC_SymbolInfo(false, 18, 14, 16, 16, 1);
+ g_symbols[8] = new CBC_SymbolInfo(false, 22, 18, 18, 18, 1);
+ g_symbols[9] = new CBC_SymbolInfo(true, 22, 18, 16, 10, 2);
+ g_symbols[10] = new CBC_SymbolInfo(false, 30, 20, 20, 20, 1);
+ g_symbols[11] = new CBC_SymbolInfo(true, 32, 24, 16, 14, 2);
+ g_symbols[12] = new CBC_SymbolInfo(false, 36, 24, 22, 22, 1);
+ g_symbols[13] = new CBC_SymbolInfo(false, 44, 28, 24, 24, 1);
+ g_symbols[14] = new CBC_SymbolInfo(true, 49, 28, 22, 14, 2);
+ g_symbols[15] = new CBC_SymbolInfo(false, 62, 36, 14, 14, 4);
+ g_symbols[16] = new CBC_SymbolInfo(false, 86, 42, 16, 16, 4);
+ g_symbols[17] = new CBC_SymbolInfo(false, 114, 48, 18, 18, 4);
+ g_symbols[18] = new CBC_SymbolInfo(false, 144, 56, 20, 20, 4);
+ g_symbols[19] = new CBC_SymbolInfo(false, 174, 68, 22, 22, 4);
+ g_symbols[20] = new CBC_SymbolInfo(false, 204, 84, 24, 24, 4, 102, 42);
+ g_symbols[21] = new CBC_SymbolInfo(false, 280, 112, 14, 14, 16, 140, 56);
+ g_symbols[22] = new CBC_SymbolInfo(false, 368, 144, 16, 16, 16, 92, 36);
+ g_symbols[23] = new CBC_SymbolInfo(false, 456, 192, 18, 18, 16, 114, 48);
+ g_symbols[24] = new CBC_SymbolInfo(false, 576, 224, 20, 20, 16, 144, 56);
+ g_symbols[25] = new CBC_SymbolInfo(false, 696, 272, 22, 22, 16, 174, 68);
+ g_symbols[26] = new CBC_SymbolInfo(false, 816, 336, 24, 24, 16, 136, 56);
+ g_symbols[27] = new CBC_SymbolInfo(false, 1050, 408, 18, 18, 36, 175, 68);
+ g_symbols[28] = new CBC_SymbolInfo(false, 1304, 496, 20, 20, 36, 163, 62);
g_symbols[29] = new CBC_DataMatrixSymbolInfo144();
}
@@ -80,7 +80,7 @@ void CBC_SymbolInfo::Finalize() {
}
}
-CBC_SymbolInfo::CBC_SymbolInfo(FX_BOOL rectangular,
+CBC_SymbolInfo::CBC_SymbolInfo(bool rectangular,
int32_t dataCapacity,
int32_t errorCodewords,
int32_t matrixWidth,
@@ -95,7 +95,7 @@ CBC_SymbolInfo::CBC_SymbolInfo(FX_BOOL rectangular,
m_rsBlockData = dataCapacity;
m_rsBlockError = errorCodewords;
}
-CBC_SymbolInfo::CBC_SymbolInfo(FX_BOOL rectangular,
+CBC_SymbolInfo::CBC_SymbolInfo(bool rectangular,
int32_t dataCapacity,
int32_t errorCodewords,
int32_t matrixWidth,
@@ -115,23 +115,23 @@ CBC_SymbolInfo::CBC_SymbolInfo(FX_BOOL rectangular,
CBC_SymbolInfo::~CBC_SymbolInfo() {}
CBC_SymbolInfo* CBC_SymbolInfo::lookup(int32_t dataCodewords, int32_t& e) {
- return lookup(dataCodewords, FORCE_NONE, TRUE, e);
+ return lookup(dataCodewords, FORCE_NONE, true, e);
}
CBC_SymbolInfo* CBC_SymbolInfo::lookup(int32_t dataCodewords,
SymbolShapeHint shape,
int32_t& e) {
- return lookup(dataCodewords, shape, TRUE, e);
+ return lookup(dataCodewords, shape, true, e);
}
CBC_SymbolInfo* CBC_SymbolInfo::lookup(int32_t dataCodewords,
- FX_BOOL allowRectangular,
- FX_BOOL fail,
+ bool allowRectangular,
+ bool fail,
int32_t& e) {
SymbolShapeHint shape = allowRectangular ? FORCE_NONE : FORCE_SQUARE;
return lookup(dataCodewords, shape, fail, e);
}
CBC_SymbolInfo* CBC_SymbolInfo::lookup(int32_t dataCodewords,
SymbolShapeHint shape,
- FX_BOOL fail,
+ bool fail,
int32_t& e) {
return lookup(dataCodewords, shape, nullptr, nullptr, fail, e);
}
@@ -139,7 +139,7 @@ CBC_SymbolInfo* CBC_SymbolInfo::lookup(int32_t dataCodewords,
SymbolShapeHint shape,
CBC_Dimension* minSize,
CBC_Dimension* maxSize,
- FX_BOOL fail,
+ bool fail,
int32_t& e) {
for (size_t i = 0; i < kSymbolsCount; i++) {
CBC_SymbolInfo* symbol = g_symbols[i];
diff --git a/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h b/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h
index b5778d5a3a..d2730025db 100644
--- a/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h
+++ b/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h
@@ -15,7 +15,7 @@ class CBC_Dimension;
class CBC_SymbolInfo : public CBC_SymbolShapeHint {
public:
- CBC_SymbolInfo(FX_BOOL rectangular,
+ CBC_SymbolInfo(bool rectangular,
int32_t dataCapacity,
int32_t errorCodewords,
int32_t matrixWidth,
@@ -31,18 +31,18 @@ class CBC_SymbolInfo : public CBC_SymbolShapeHint {
SymbolShapeHint shape,
int32_t& e);
static CBC_SymbolInfo* lookup(int32_t dataCodewords,
- FX_BOOL allowRectangular,
- FX_BOOL fail,
+ bool allowRectangular,
+ bool fail,
int32_t& e);
static CBC_SymbolInfo* lookup(int32_t dataCodewords,
SymbolShapeHint shape,
- FX_BOOL fail,
+ bool fail,
int32_t& e);
static CBC_SymbolInfo* lookup(int32_t dataCodewords,
SymbolShapeHint shape,
CBC_Dimension* minSize,
CBC_Dimension* maxSize,
- FX_BOOL fail,
+ bool fail,
int32_t& e);
int32_t getHorizontalDataRegions(int32_t& e);
int32_t getVerticalDataRegions(int32_t& e);
@@ -63,7 +63,7 @@ class CBC_SymbolInfo : public CBC_SymbolShapeHint {
int32_t m_rsBlockError;
private:
- CBC_SymbolInfo(FX_BOOL rectangular,
+ CBC_SymbolInfo(bool rectangular,
int32_t dataCapacity,
int32_t errorCodewords,
int32_t matrixWidth,
@@ -72,7 +72,7 @@ class CBC_SymbolInfo : public CBC_SymbolShapeHint {
int32_t rsBlockData,
int32_t rsBlockError);
- FX_BOOL m_rectangular;
+ bool m_rectangular;
int32_t m_dataRegions;
};
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();
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417.cpp b/xfa/fxbarcode/pdf417/BC_PDF417.cpp
index 843ee23364..9d827acff6 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417.cpp
+++ b/xfa/fxbarcode/pdf417/BC_PDF417.cpp
@@ -381,9 +381,9 @@ const int32_t CBC_PDF417::CODEWORD_TABLE[][929] = {
0x10396, 0x107b6, 0x187d4, 0x187d2, 0x10794, 0x10fb4, 0x10792, 0x10fb2,
0x1c7ea}};
-CBC_PDF417::CBC_PDF417() : CBC_PDF417(FALSE) {}
+CBC_PDF417::CBC_PDF417() : CBC_PDF417(false) {}
-CBC_PDF417::CBC_PDF417(FX_BOOL compact)
+CBC_PDF417::CBC_PDF417(bool compact)
: m_compact(compact),
m_compaction(AUTO),
m_minCols(1),
@@ -451,7 +451,7 @@ void CBC_PDF417::setCompaction(Compaction compaction) {
m_compaction = compaction;
}
-void CBC_PDF417::setCompact(FX_BOOL compact) {
+void CBC_PDF417::setCompact(bool compact) {
m_compact = compact;
}
@@ -475,10 +475,10 @@ void CBC_PDF417::encodeChar(int32_t pattern,
int32_t len,
CBC_BarcodeRow* logic) {
int32_t map = 1 << (len - 1);
- FX_BOOL last = ((pattern & map) != 0);
+ bool last = ((pattern & map) != 0);
int32_t width = 0;
for (int32_t i = 0; i < len; i++) {
- FX_BOOL black = ((pattern & map) != 0);
+ bool black = ((pattern & map) != 0);
if (last == black) {
width++;
} else {
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417.h b/xfa/fxbarcode/pdf417/BC_PDF417.h
index c3a9f4c477..5f7c2d49b9 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417.h
+++ b/xfa/fxbarcode/pdf417/BC_PDF417.h
@@ -18,7 +18,7 @@ class CBC_BarcodeMatrix;
class CBC_PDF417 {
public:
CBC_PDF417();
- explicit CBC_PDF417(FX_BOOL compact);
+ explicit CBC_PDF417(bool compact);
virtual ~CBC_PDF417();
CBC_BarcodeMatrix* getBarcodeMatrix();
@@ -30,7 +30,7 @@ class CBC_PDF417 {
int32_t maxRows,
int32_t minRows);
void setCompaction(Compaction compaction);
- void setCompact(FX_BOOL compact);
+ void setCompact(bool compact);
private:
static const int32_t START_PATTERN = 0x1fea8;
@@ -56,7 +56,7 @@ class CBC_PDF417 {
int32_t& e);
std::unique_ptr<CBC_BarcodeMatrix> m_barcodeMatrix;
- FX_BOOL m_compact;
+ bool m_compact;
Compaction m_compaction;
int32_t m_minCols;
int32_t m_maxCols;
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp
index a9d1fedef0..f348d2c934 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp
+++ b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.cpp
@@ -44,7 +44,7 @@ CBC_BarcodeMatrix::~CBC_BarcodeMatrix() {
void CBC_BarcodeMatrix::set(int32_t x, int32_t y, uint8_t value) {
m_matrix[y]->set(x, value);
}
-void CBC_BarcodeMatrix::setMatrix(int32_t x, int32_t y, FX_BOOL black) {
+void CBC_BarcodeMatrix::setMatrix(int32_t x, int32_t y, bool black) {
set(x, y, (uint8_t)(black ? 1 : 0));
}
void CBC_BarcodeMatrix::startRow() {
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h
index 853b9eea98..0f6922233d 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h
+++ b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h
@@ -18,7 +18,7 @@ class CBC_BarcodeMatrix {
virtual ~CBC_BarcodeMatrix();
void set(int32_t x, int32_t y, uint8_t value);
- void setMatrix(int32_t x, int32_t y, FX_BOOL black);
+ void setMatrix(int32_t x, int32_t y, bool black);
void startRow();
CBC_BarcodeRow* getCurrentRow();
CFX_ByteArray& getMatrix();
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp
index 6f88b33877..b721ffc3ef 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp
+++ b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp
@@ -33,10 +33,10 @@ CBC_BarcodeRow::~CBC_BarcodeRow() {
void CBC_BarcodeRow::set(int32_t x, uint8_t value) {
m_row.SetAt(x, value);
}
-void CBC_BarcodeRow::set(int32_t x, FX_BOOL black) {
+void CBC_BarcodeRow::set(int32_t x, bool black) {
m_row.SetAt(x, (uint8_t)(black ? 1 : 0));
}
-void CBC_BarcodeRow::addBar(FX_BOOL black, int32_t width) {
+void CBC_BarcodeRow::addBar(bool black, int32_t width) {
for (int32_t ii = 0; ii < width; ii++) {
set(m_currentLocation++, black);
}
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h
index 4325acc05f..802a49cb5e 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h
+++ b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h
@@ -15,8 +15,8 @@ class CBC_BarcodeRow {
virtual ~CBC_BarcodeRow();
void set(int32_t x, uint8_t value);
- void set(int32_t x, FX_BOOL black);
- void addBar(FX_BOOL black, int32_t width);
+ void set(int32_t x, bool black);
+ void addBar(bool black, int32_t width);
CFX_ByteArray& getRow();
CFX_ByteArray& getScaledRow(int32_t scale);
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp b/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp
index 7617d526c1..fa0e9bc67d 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp
+++ b/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp
@@ -155,7 +155,7 @@ int32_t CBC_PDF417HighLevelEncoder::encodeText(CFX_WideString msg,
CFX_WideString tmp;
int32_t submode = initialSubmode;
int32_t idx = 0;
- while (TRUE) {
+ while (true) {
FX_WCHAR ch = msg.GetAt(startpos + idx);
switch (submode) {
case SUBMODE_ALPHA:
@@ -247,7 +247,7 @@ int32_t CBC_PDF417HighLevelEncoder::encodeText(CFX_WideString msg,
FX_WCHAR h = 0;
int32_t len = tmp.GetLength();
for (int32_t i = 0; i < len; i++) {
- FX_BOOL odd = (i % 2) != 0;
+ bool odd = (i % 2) != 0;
if (odd) {
h = (FX_WCHAR)((h * 30) + tmp.GetAt(i));
sb += h;
@@ -320,22 +320,22 @@ void CBC_PDF417HighLevelEncoder::encodeNumeric(CFX_WideString msg,
idx += len;
}
}
-FX_BOOL CBC_PDF417HighLevelEncoder::isDigit(FX_WCHAR ch) {
+bool CBC_PDF417HighLevelEncoder::isDigit(FX_WCHAR ch) {
return ch >= '0' && ch <= '9';
}
-FX_BOOL CBC_PDF417HighLevelEncoder::isAlphaUpper(FX_WCHAR ch) {
+bool CBC_PDF417HighLevelEncoder::isAlphaUpper(FX_WCHAR ch) {
return ch == ' ' || (ch >= 'A' && ch <= 'Z');
}
-FX_BOOL CBC_PDF417HighLevelEncoder::isAlphaLower(FX_WCHAR ch) {
+bool CBC_PDF417HighLevelEncoder::isAlphaLower(FX_WCHAR ch) {
return ch == ' ' || (ch >= 'a' && ch <= 'z');
}
-FX_BOOL CBC_PDF417HighLevelEncoder::isMixed(FX_WCHAR ch) {
+bool CBC_PDF417HighLevelEncoder::isMixed(FX_WCHAR ch) {
return MIXED[ch] != -1;
}
-FX_BOOL CBC_PDF417HighLevelEncoder::isPunctuation(FX_WCHAR ch) {
+bool CBC_PDF417HighLevelEncoder::isPunctuation(FX_WCHAR ch) {
return PUNCTUATION[ch] != -1;
}
-FX_BOOL CBC_PDF417HighLevelEncoder::isText(FX_WCHAR ch) {
+bool CBC_PDF417HighLevelEncoder::isText(FX_WCHAR ch) {
return ch == '\t' || ch == '\n' || ch == '\r' || (ch >= 32 && ch <= 126);
}
int32_t CBC_PDF417HighLevelEncoder::determineConsecutiveDigitCount(
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h b/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h
index fb7664d4a3..39abe0f1df 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h
+++ b/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h
@@ -48,12 +48,12 @@ class CBC_PDF417HighLevelEncoder {
int32_t startpos,
int32_t count,
CFX_WideString& sb);
- static FX_BOOL isDigit(FX_WCHAR ch);
- static FX_BOOL isAlphaUpper(FX_WCHAR ch);
- static FX_BOOL isAlphaLower(FX_WCHAR ch);
- static FX_BOOL isMixed(FX_WCHAR ch);
- static FX_BOOL isPunctuation(FX_WCHAR ch);
- static FX_BOOL isText(FX_WCHAR ch);
+ static bool isDigit(FX_WCHAR ch);
+ static bool isAlphaUpper(FX_WCHAR ch);
+ static bool isAlphaLower(FX_WCHAR ch);
+ static bool isMixed(FX_WCHAR ch);
+ static bool isPunctuation(FX_WCHAR ch);
+ static bool isText(FX_WCHAR ch);
static int32_t determineConsecutiveDigitCount(CFX_WideString msg,
int32_t startpos);
static int32_t determineConsecutiveTextCount(CFX_WideString msg,
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417Writer.cpp b/xfa/fxbarcode/pdf417/BC_PDF417Writer.cpp
index 43cf09e549..4c9b5cb15c 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417Writer.cpp
+++ b/xfa/fxbarcode/pdf417/BC_PDF417Writer.cpp
@@ -29,19 +29,19 @@
#include "xfa/fxbarcode/pdf417/BC_PDF417Writer.h"
CBC_PDF417Writer::CBC_PDF417Writer() {
- m_bFixedSize = FALSE;
+ m_bFixedSize = false;
}
CBC_PDF417Writer::~CBC_PDF417Writer() {
- m_bTruncated = TRUE;
+ m_bTruncated = true;
}
-FX_BOOL CBC_PDF417Writer::SetErrorCorrectionLevel(int32_t level) {
+bool CBC_PDF417Writer::SetErrorCorrectionLevel(int32_t level) {
if (level < 0 || level > 8) {
- return FALSE;
+ return false;
}
m_iCorrectLevel = level;
- return TRUE;
+ return true;
}
-void CBC_PDF417Writer::SetTruncated(FX_BOOL truncated) {
+void CBC_PDF417Writer::SetTruncated(bool truncated) {
m_bTruncated = truncated;
}
uint8_t* CBC_PDF417Writer::Encode(const CFX_WideString& contents,
@@ -70,10 +70,10 @@ uint8_t* CBC_PDF417Writer::Encode(const CFX_WideString& contents,
int32_t height = outHeight;
outWidth = barcodeMatrix->getWidth();
outHeight = barcodeMatrix->getHeight();
- FX_BOOL rotated = FALSE;
+ bool rotated = false;
if ((height > width) ^ (outWidth < outHeight)) {
rotateArray(originalScale, outHeight, outWidth);
- rotated = TRUE;
+ rotated = true;
int32_t temp = outHeight;
outHeight = outWidth;
outWidth = temp;
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417Writer.h b/xfa/fxbarcode/pdf417/BC_PDF417Writer.h
index 12b8e8baa9..178d251bfe 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417Writer.h
+++ b/xfa/fxbarcode/pdf417/BC_PDF417Writer.h
@@ -22,13 +22,13 @@ class CBC_PDF417Writer : public CBC_TwoDimWriter {
int32_t& e);
// CBC_TwoDimWriter
- FX_BOOL SetErrorCorrectionLevel(int32_t level) override;
+ bool SetErrorCorrectionLevel(int32_t level) override;
- void SetTruncated(FX_BOOL truncated);
+ void SetTruncated(bool truncated);
private:
void rotateArray(CFX_ByteArray& bitarray, int32_t width, int32_t height);
- FX_BOOL m_bTruncated;
+ bool m_bTruncated;
};
#endif // XFA_FXBARCODE_PDF417_BC_PDF417WRITER_H_
diff --git a/xfa/fxbarcode/qrcode/BC_QRCodeWriter.cpp b/xfa/fxbarcode/qrcode/BC_QRCodeWriter.cpp
index 01873f0f04..adb12f25b1 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCodeWriter.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCodeWriter.cpp
@@ -31,7 +31,7 @@
#include "xfa/fxbarcode/qrcode/BC_QRCoderVersion.h"
CBC_QRCodeWriter::CBC_QRCodeWriter() {
- m_bFixedSize = TRUE;
+ m_bFixedSize = true;
m_iCorrectLevel = 1;
m_iVersion = 0;
}
@@ -48,20 +48,20 @@ void CBC_QRCodeWriter::ReleaseAll() {
CBC_QRCoderVersion::Destroy();
}
-FX_BOOL CBC_QRCodeWriter::SetVersion(int32_t version) {
+bool CBC_QRCodeWriter::SetVersion(int32_t version) {
if (version < 0 || version > 40) {
- return FALSE;
+ return false;
}
m_iVersion = version;
- return TRUE;
+ return true;
}
-FX_BOOL CBC_QRCodeWriter::SetErrorCorrectionLevel(int32_t level) {
+bool CBC_QRCodeWriter::SetErrorCorrectionLevel(int32_t level) {
if (level < 0 || level > 3) {
- return FALSE;
+ return false;
}
m_iCorrectLevel = level;
- return TRUE;
+ return true;
}
uint8_t* CBC_QRCodeWriter::Encode(const CFX_WideString& contents,
diff --git a/xfa/fxbarcode/qrcode/BC_QRCodeWriter.h b/xfa/fxbarcode/qrcode/BC_QRCodeWriter.h
index 6562107f10..5585fa55c1 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCodeWriter.h
+++ b/xfa/fxbarcode/qrcode/BC_QRCodeWriter.h
@@ -31,10 +31,10 @@ class CBC_QRCodeWriter : public CBC_TwoDimWriter {
int32_t& outWidth,
int32_t& outHeight,
int32_t& e);
- FX_BOOL SetVersion(int32_t version);
+ bool SetVersion(int32_t version);
// CBC_TwoDimWriter
- FX_BOOL SetErrorCorrectionLevel(int32_t level) override;
+ bool SetErrorCorrectionLevel(int32_t level) override;
static void ReleaseAll();
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoder.cpp b/xfa/fxbarcode/qrcode/BC_QRCoder.cpp
index 4c7956ed68..c47374935f 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoder.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCoder.cpp
@@ -90,7 +90,7 @@ int32_t CBC_QRCoder::At(int32_t x, int32_t y, int32_t& e) {
return value;
}
-FX_BOOL CBC_QRCoder::IsValid() {
+bool CBC_QRCoder::IsValid() {
return m_mode && m_ecLevel && m_version != -1 && m_matrixWidth != -1 &&
m_maskPattern != -1 && m_numTotalBytes != -1 && m_numDataBytes != -1 &&
m_numECBytes != -1 && m_numRSBlocks != -1 &&
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoder.h b/xfa/fxbarcode/qrcode/BC_QRCoder.h
index bbb37355f2..5e949920a7 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoder.h
+++ b/xfa/fxbarcode/qrcode/BC_QRCoder.h
@@ -34,7 +34,7 @@ class CBC_QRCoder {
CBC_CommonByteMatrix* GetMatrix() const;
int32_t At(int32_t x, int32_t y, int32_t& e);
- FX_BOOL IsValid();
+ bool IsValid();
void SetMode(CBC_QRCoderMode* value);
void SetECLevel(CBC_QRCoderErrorCorrectionLevel* ecLevel);
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
index 209a9656a6..ddfbff2e3c 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
@@ -635,13 +635,13 @@ CBC_QRCoderMode* CBC_QRCoderEncoder::ChooseMode(const CFX_ByteString& content,
if (encoding.Compare("SHIFT_JIS") == 0) {
return CBC_QRCoderMode::sKANJI;
}
- FX_BOOL hasNumeric = FALSE;
- FX_BOOL hasAlphaNumeric = FALSE;
+ bool hasNumeric = false;
+ bool hasAlphaNumeric = false;
for (int32_t i = 0; i < content.GetLength(); i++) {
if (isdigit((uint8_t)content[i])) {
- hasNumeric = TRUE;
+ hasNumeric = true;
} else if (GetAlphaNumericCode((uint8_t)content[i]) != -1) {
- hasAlphaNumeric = TRUE;
+ hasAlphaNumeric = true;
} else {
return CBC_QRCoderMode::sBYTE;
}
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp
index 4d845c4b07..8342b9b6db 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp
@@ -30,8 +30,8 @@ CBC_QRCoderMaskUtil::CBC_QRCoderMaskUtil() {}
CBC_QRCoderMaskUtil::~CBC_QRCoderMaskUtil() {}
int32_t CBC_QRCoderMaskUtil::ApplyMaskPenaltyRule1(
CBC_CommonByteMatrix* matrix) {
- return ApplyMaskPenaltyRule1Internal(matrix, TRUE) +
- ApplyMaskPenaltyRule1Internal(matrix, FALSE);
+ return ApplyMaskPenaltyRule1Internal(matrix, true) +
+ ApplyMaskPenaltyRule1Internal(matrix, false);
}
int32_t CBC_QRCoderMaskUtil::ApplyMaskPenaltyRule2(
@@ -122,13 +122,13 @@ int32_t CBC_QRCoderMaskUtil::ApplyMaskPenaltyRule4(
double darkRatio = (double)numDarkCells / numTotalCells;
return abs((int32_t)(darkRatio * 100 - 50) / 5) * 5 * 10;
}
-FX_BOOL CBC_QRCoderMaskUtil::GetDataMaskBit(int32_t maskPattern,
- int32_t x,
- int32_t y,
- int32_t& e) {
+bool CBC_QRCoderMaskUtil::GetDataMaskBit(int32_t maskPattern,
+ int32_t x,
+ int32_t y,
+ int32_t& e) {
if (!CBC_QRCoder::IsValidMaskPattern(maskPattern)) {
e = (BCExceptionInvalidateMaskPattern);
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
}
int32_t intermediate = 0, temp = 0;
switch (maskPattern) {
@@ -161,14 +161,14 @@ FX_BOOL CBC_QRCoderMaskUtil::GetDataMaskBit(int32_t maskPattern,
break;
default: {
e = BCExceptionInvalidateMaskPattern;
- BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
+ BC_EXCEPTION_CHECK_ReturnValue(e, false);
}
}
return intermediate == 0;
}
int32_t CBC_QRCoderMaskUtil::ApplyMaskPenaltyRule1Internal(
CBC_CommonByteMatrix* matrix,
- FX_BOOL isHorizontal) {
+ bool isHorizontal) {
int32_t penalty = 0;
int32_t numSameBitCells = 0;
int32_t prevBit = -1;
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.h b/xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.h
index 35032a3aaf..9fbe073e7e 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.h
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderMaskUtil.h
@@ -11,17 +11,17 @@ class CBC_QRCoderMaskUtil {
public:
CBC_QRCoderMaskUtil();
virtual ~CBC_QRCoderMaskUtil();
- static FX_BOOL GetDataMaskBit(int32_t maskPattern,
- int32_t x,
- int32_t y,
- int32_t& e);
+ static bool GetDataMaskBit(int32_t maskPattern,
+ int32_t x,
+ int32_t y,
+ int32_t& e);
static int32_t ApplyMaskPenaltyRule1(CBC_CommonByteMatrix* matrix);
static int32_t ApplyMaskPenaltyRule2(CBC_CommonByteMatrix* matrix);
static int32_t ApplyMaskPenaltyRule3(CBC_CommonByteMatrix* matrix);
static int32_t ApplyMaskPenaltyRule4(CBC_CommonByteMatrix* matrix);
static int32_t ApplyMaskPenaltyRule1Internal(CBC_CommonByteMatrix* matrix,
- FX_BOOL isHorizontal);
+ bool isHorizontal);
};
#endif // XFA_FXBARCODE_QRCODE_BC_QRCODERMASKUTIL_H_
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp
index f5df04ee9c..ca44e01293 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp
@@ -211,8 +211,7 @@ void CBC_QRCoderMatrixUtil::EmbedDataBits(CBC_QRCoderBitVector* dataBits,
bit = 0;
}
if (maskPattern != -1) {
- FX_BOOL bol =
- CBC_QRCoderMaskUtil::GetDataMaskBit(maskPattern, xx, y, e);
+ bool bol = CBC_QRCoderMaskUtil::GetDataMaskBit(maskPattern, xx, y, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
if (bol) {
bit ^= 0x01;
@@ -285,10 +284,10 @@ void CBC_QRCoderMatrixUtil::MakeVersionInfoBits(int32_t version,
BC_EXCEPTION_CHECK_ReturnVoid(e);
}
}
-FX_BOOL CBC_QRCoderMatrixUtil::IsEmpty(int32_t value) {
+bool CBC_QRCoderMatrixUtil::IsEmpty(int32_t value) {
return (uint8_t)value == 0xff;
}
-FX_BOOL CBC_QRCoderMatrixUtil::IsValidValue(int32_t value) {
+bool CBC_QRCoderMatrixUtil::IsValidValue(int32_t value) {
return ((uint8_t)value == 0xff || (uint8_t)value == 0x00 ||
(uint8_t)value == 0x01);
}
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h b/xfa/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h
index feb0bb491c..3ce4b7510b 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h
@@ -55,8 +55,8 @@ class CBC_QRCoderMatrixUtil {
static void MakeVersionInfoBits(int32_t version,
CBC_QRCoderBitVector* bits,
int32_t& e);
- static FX_BOOL IsEmpty(int32_t value);
- static FX_BOOL IsValidValue(int32_t value);
+ static bool IsEmpty(int32_t value);
+ static bool IsValidValue(int32_t value);
static void EmbedTimingPatterns(CBC_CommonByteMatrix* matrix, int32_t& e);
static void EmbedDarkDotAtLeftBottomCorner(CBC_CommonByteMatrix* matrix,
int32_t& e);
diff --git a/xfa/fxbarcode/utils.h b/xfa/fxbarcode/utils.h
index b4474501a7..9b5eae3ef1 100644
--- a/xfa/fxbarcode/utils.h
+++ b/xfa/fxbarcode/utils.h
@@ -10,11 +10,11 @@
#include "core/fxcrt/fx_basic.h"
typedef CFX_MapPtrTemplate<void*, int32_t> CFX_PtrToInt32;
-FX_BOOL BC_FX_ByteString_Replace(CFX_ByteString& dst,
- uint32_t first,
- uint32_t last,
- int32_t count,
- FX_CHAR c);
+bool BC_FX_ByteString_Replace(CFX_ByteString& dst,
+ uint32_t first,
+ uint32_t last,
+ int32_t count,
+ FX_CHAR c);
void BC_FX_ByteString_Append(CFX_ByteString& dst, int32_t count, FX_CHAR c);
void BC_FX_ByteString_Append(CFX_ByteString& dst, const CFX_ByteArray& ba);