summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxbarcode')
-rw-r--r--xfa/fxbarcode/cbc_codabar.cpp2
-rw-r--r--xfa/fxbarcode/cbc_code128.cpp4
-rw-r--r--xfa/fxbarcode/cbc_code39.cpp2
-rw-r--r--xfa/fxbarcode/cbc_datamatrix.cpp7
-rw-r--r--xfa/fxbarcode/cbc_ean13.cpp2
-rw-r--r--xfa/fxbarcode/cbc_ean8.cpp2
-rw-r--r--xfa/fxbarcode/cbc_pdf417i.cpp7
-rw-r--r--xfa/fxbarcode/cbc_qrcode.cpp11
-rw-r--r--xfa/fxbarcode/cbc_upca.cpp2
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp4
10 files changed, 23 insertions, 20 deletions
diff --git a/xfa/fxbarcode/cbc_codabar.cpp b/xfa/fxbarcode/cbc_codabar.cpp
index 3bdc6c1935..23cd2d1e7e 100644
--- a/xfa/fxbarcode/cbc_codabar.cpp
+++ b/xfa/fxbarcode/cbc_codabar.cpp
@@ -118,6 +118,6 @@ CFX_WideString CBC_Codabar::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_GlobalHistogramBinarizer binarizer(&source);
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
+ BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString());
return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_code128.cpp b/xfa/fxbarcode/cbc_code128.cpp
index 039e37275d..85d7afbbe8 100644
--- a/xfa/fxbarcode/cbc_code128.cpp
+++ b/xfa/fxbarcode/cbc_code128.cpp
@@ -53,7 +53,7 @@ FX_BOOL CBC_Code128::Encode(const CFX_WideStringC& contents,
BCFORMAT format = BCFORMAT_CODE_128;
int32_t outWidth = 0;
int32_t outHeight = 0;
- CFX_WideString content = contents;
+ CFX_WideString content(contents);
if (contents.GetLength() % 2 &&
((CBC_OnedCode128Writer*)m_pBCWriter)->GetType() == BC_CODE128_C) {
content += '0';
@@ -101,6 +101,6 @@ CFX_WideString CBC_Code128::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_GlobalHistogramBinarizer binarizer(&source);
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
+ BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString());
return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_code39.cpp b/xfa/fxbarcode/cbc_code39.cpp
index 516b34e8e3..5d00d772e4 100644
--- a/xfa/fxbarcode/cbc_code39.cpp
+++ b/xfa/fxbarcode/cbc_code39.cpp
@@ -109,7 +109,7 @@ CFX_WideString CBC_Code39::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_GlobalHistogramBinarizer binarizer(&source);
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
+ BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString());
return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_datamatrix.cpp b/xfa/fxbarcode/cbc_datamatrix.cpp
index 63385aa2db..7430187f5b 100644
--- a/xfa/fxbarcode/cbc_datamatrix.cpp
+++ b/xfa/fxbarcode/cbc_datamatrix.cpp
@@ -43,8 +43,9 @@ FX_BOOL CBC_DataMatrix::Encode(const CFX_WideStringC& contents,
int32_t& e) {
int32_t outWidth = 0;
int32_t outHeight = 0;
- uint8_t* data = ((CBC_DataMatrixWriter*)m_pBCWriter)
- ->Encode(contents, outWidth, outHeight, e);
+ uint8_t* data =
+ ((CBC_DataMatrixWriter*)m_pBCWriter)
+ ->Encode(CFX_WideString(contents), outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_TwoDimWriter*)m_pBCWriter)->RenderResult(data, outWidth, outHeight, e);
FX_Free(data);
@@ -78,6 +79,6 @@ CFX_WideString CBC_DataMatrix::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_GlobalHistogramBinarizer binarizer(&source);
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString retStr = m_pBCReader->Decode(&bitmap, 0, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
+ BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString());
return CFX_WideString::FromUTF8(retStr.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_ean13.cpp b/xfa/fxbarcode/cbc_ean13.cpp
index 5f33f4c3d2..ea67c9f64b 100644
--- a/xfa/fxbarcode/cbc_ean13.cpp
+++ b/xfa/fxbarcode/cbc_ean13.cpp
@@ -109,6 +109,6 @@ CFX_WideString CBC_EAN13::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_GlobalHistogramBinarizer binarizer(&source);
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
+ BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString());
return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_ean8.cpp b/xfa/fxbarcode/cbc_ean8.cpp
index e92605f2c4..418ef87c1f 100644
--- a/xfa/fxbarcode/cbc_ean8.cpp
+++ b/xfa/fxbarcode/cbc_ean8.cpp
@@ -108,6 +108,6 @@ CFX_WideString CBC_EAN8::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_GlobalHistogramBinarizer binarizer(&source);
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
+ BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString());
return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_pdf417i.cpp b/xfa/fxbarcode/cbc_pdf417i.cpp
index 0b7a558327..228caed47f 100644
--- a/xfa/fxbarcode/cbc_pdf417i.cpp
+++ b/xfa/fxbarcode/cbc_pdf417i.cpp
@@ -51,8 +51,9 @@ FX_BOOL CBC_PDF417I::Encode(const CFX_WideStringC& contents,
int32_t& e) {
int32_t outWidth = 0;
int32_t outHeight = 0;
- uint8_t* data = ((CBC_PDF417Writer*)m_pBCWriter)
- ->Encode(contents, outWidth, outHeight, e);
+ uint8_t* data =
+ ((CBC_PDF417Writer*)m_pBCWriter)
+ ->Encode(CFX_WideString(contents), outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_TwoDimWriter*)m_pBCWriter)->RenderResult(data, outWidth, outHeight, e);
FX_Free(data);
@@ -86,6 +87,6 @@ CFX_WideString CBC_PDF417I::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_GlobalHistogramBinarizer binarizer(&source);
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString bytestring = m_pBCReader->Decode(&bitmap, 0, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
+ BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString());
return CFX_WideString::FromUTF8(bytestring.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_qrcode.cpp b/xfa/fxbarcode/cbc_qrcode.cpp
index 8faf5ad2de..6f93b4415e 100644
--- a/xfa/fxbarcode/cbc_qrcode.cpp
+++ b/xfa/fxbarcode/cbc_qrcode.cpp
@@ -59,10 +59,11 @@ FX_BOOL CBC_QRCode::Encode(const CFX_WideStringC& contents,
int32_t& e) {
int32_t outWidth = 0;
int32_t outHeight = 0;
- uint8_t* data = ((CBC_QRCodeWriter*)m_pBCWriter)
- ->Encode(contents, ((CBC_QRCodeWriter*)m_pBCWriter)
- ->GetErrorCorrectionLevel(),
- outWidth, outHeight, e);
+ uint8_t* data =
+ ((CBC_QRCodeWriter*)m_pBCWriter)
+ ->Encode(CFX_WideString(contents),
+ ((CBC_QRCodeWriter*)m_pBCWriter)->GetErrorCorrectionLevel(),
+ outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_TwoDimWriter*)m_pBCWriter)->RenderResult(data, outWidth, outHeight, e);
FX_Free(data);
@@ -96,6 +97,6 @@ CFX_WideString CBC_QRCode::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_GlobalHistogramBinarizer binarizer(&source);
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString retStr = m_pBCReader->Decode(&bitmap, 0, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
+ BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString());
return CFX_WideString::FromUTF8(retStr.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_upca.cpp b/xfa/fxbarcode/cbc_upca.cpp
index 2c60c92f40..886525ab54 100644
--- a/xfa/fxbarcode/cbc_upca.cpp
+++ b/xfa/fxbarcode/cbc_upca.cpp
@@ -111,6 +111,6 @@ CFX_WideString CBC_UPCA::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_GlobalHistogramBinarizer binarizer(&source);
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
+ BC_EXCEPTION_CHECK_ReturnValue(e, L"");
return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp b/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp
index cdbc59ce5b..efebfe547d 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp
@@ -341,13 +341,13 @@ uint8_t* CBC_OnedCode39Writer::Encode(const CFX_ByteString& contents,
CFX_WideString CBC_OnedCode39Writer::encodedContents(
const CFX_WideStringC& contents,
int32_t& e) {
- CFX_WideString encodedContents = contents;
+ CFX_WideString encodedContents(contents);
if (m_bCalcChecksum && m_bPrintChecksum) {
CFX_WideString checksumContent = FilterContents(contents);
CFX_ByteString str = checksumContent.UTF8Encode();
FX_CHAR checksum;
checksum = CalcCheckSum(str, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
+ BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString());
str += checksum;
encodedContents += checksum;
}