summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxbarcode')
-rw-r--r--xfa/fxbarcode/BC_UtilCodingConvert.cpp6
-rw-r--r--xfa/fxbarcode/cbc_codabar.cpp13
-rw-r--r--xfa/fxbarcode/cbc_code128.cpp11
-rw-r--r--xfa/fxbarcode/cbc_code39.cpp13
-rw-r--r--xfa/fxbarcode/cbc_datamatrix.cpp2
-rw-r--r--xfa/fxbarcode/cbc_ean13.cpp9
-rw-r--r--xfa/fxbarcode/cbc_ean8.cpp9
-rw-r--r--xfa/fxbarcode/cbc_pdf417i.cpp2
-rw-r--r--xfa/fxbarcode/cbc_qrcode.cpp2
-rw-r--r--xfa/fxbarcode/cbc_upca.cpp9
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp2
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp4
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp2
13 files changed, 39 insertions, 45 deletions
diff --git a/xfa/fxbarcode/BC_UtilCodingConvert.cpp b/xfa/fxbarcode/BC_UtilCodingConvert.cpp
index 118e45e95d..73475751f6 100644
--- a/xfa/fxbarcode/BC_UtilCodingConvert.cpp
+++ b/xfa/fxbarcode/BC_UtilCodingConvert.cpp
@@ -17,13 +17,13 @@ void CBC_UtilCodingConvert::UnicodeToLocale(const CFX_WideString& src,
void CBC_UtilCodingConvert::LocaleToUtf8(const CFX_ByteString& src,
CFX_ByteString& dst) {
- CFX_WideString unicode = CFX_WideString::FromLocal(src.AsByteStringC());
+ CFX_WideString unicode = CFX_WideString::FromLocal(src.AsStringC());
dst = unicode.UTF8Encode();
}
void CBC_UtilCodingConvert::LocaleToUtf8(const CFX_ByteString& src,
CFX_ByteArray& dst) {
- CFX_WideString unicode = CFX_WideString::FromLocal(src.AsByteStringC());
+ CFX_WideString unicode = CFX_WideString::FromLocal(src.AsStringC());
CFX_ByteString utf8 = unicode.UTF8Encode();
for (int32_t i = 0; i < utf8.GetLength(); i++) {
dst.Add(utf8[i]);
@@ -36,7 +36,7 @@ void CBC_UtilCodingConvert::Utf8ToLocale(const CFX_ByteArray& src,
for (int32_t i = 0; i < src.GetSize(); i++) {
utf8 += src[i];
}
- CFX_WideString unicode = CFX_WideString::FromUTF8(utf8.AsByteStringC());
+ CFX_WideString unicode = CFX_WideString::FromUTF8(utf8.AsStringC());
dst = CFX_ByteString::FromUnicode(unicode);
}
diff --git a/xfa/fxbarcode/cbc_codabar.cpp b/xfa/fxbarcode/cbc_codabar.cpp
index ae2b1f2ba2..fad026ddb7 100644
--- a/xfa/fxbarcode/cbc_codabar.cpp
+++ b/xfa/fxbarcode/cbc_codabar.cpp
@@ -77,8 +77,7 @@ FX_BOOL CBC_Codabar::Encode(const CFX_WideStringC& contents,
->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderResult(filtercontents.AsWideStringC(), data, outWidth, isDevice,
- e);
+ ->RenderResult(filtercontents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
@@ -89,9 +88,9 @@ FX_BOOL CBC_Codabar::RenderDevice(CFX_RenderDevice* device,
int32_t& e) {
CFX_WideString renderCon =
((CBC_OnedCodaBarWriter*)m_pBCWriter)
- ->encodedContents(m_renderContents.AsWideStringC());
+ ->encodedContents(m_renderContents.AsStringC());
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderDeviceResult(device, matirx, renderCon.AsWideStringC(), e);
+ ->RenderDeviceResult(device, matirx, renderCon.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -99,9 +98,9 @@ FX_BOOL CBC_Codabar::RenderDevice(CFX_RenderDevice* device,
FX_BOOL CBC_Codabar::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
CFX_WideString renderCon =
((CBC_OnedCodaBarWriter*)m_pBCWriter)
- ->encodedContents(m_renderContents.AsWideStringC());
+ ->encodedContents(m_renderContents.AsStringC());
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderBitmapResult(pOutBitmap, renderCon.AsWideStringC(), e);
+ ->RenderBitmapResult(pOutBitmap, renderCon.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -120,5 +119,5 @@ CFX_WideString CBC_Codabar::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(str.AsByteStringC());
+ return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_code128.cpp b/xfa/fxbarcode/cbc_code128.cpp
index 93417b4e16..98490f2e60 100644
--- a/xfa/fxbarcode/cbc_code128.cpp
+++ b/xfa/fxbarcode/cbc_code128.cpp
@@ -59,15 +59,14 @@ FX_BOOL CBC_Code128::Encode(const CFX_WideStringC& contents,
content += '0';
}
CFX_WideString encodeContents = ((CBC_OnedCode128Writer*)m_pBCWriter)
- ->FilterContents(content.AsWideStringC());
+ ->FilterContents(content.AsStringC());
m_renderContents = encodeContents;
CFX_ByteString byteString = encodeContents.UTF8Encode();
uint8_t* data = static_cast<CBC_OnedCode128Writer*>(m_pBCWriter)
->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderResult(encodeContents.AsWideStringC(), data, outWidth, isDevice,
- e);
+ ->RenderResult(encodeContents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
@@ -77,14 +76,14 @@ FX_BOOL CBC_Code128::RenderDevice(CFX_RenderDevice* device,
const CFX_Matrix* matirx,
int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderDeviceResult(device, matirx, m_renderContents.AsWideStringC(), e);
+ ->RenderDeviceResult(device, matirx, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
FX_BOOL CBC_Code128::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderBitmapResult(pOutBitmap, m_renderContents.AsWideStringC(), e);
+ ->RenderBitmapResult(pOutBitmap, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -103,5 +102,5 @@ CFX_WideString CBC_Code128::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(str.AsByteStringC());
+ return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_code39.cpp b/xfa/fxbarcode/cbc_code39.cpp
index 69549406e3..627ea4d173 100644
--- a/xfa/fxbarcode/cbc_code39.cpp
+++ b/xfa/fxbarcode/cbc_code39.cpp
@@ -68,8 +68,7 @@ FX_BOOL CBC_Code39::Encode(const CFX_WideStringC& contents,
->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderResult(renderContents.AsWideStringC(), data, outWidth, isDevice,
- e);
+ ->RenderResult(renderContents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
@@ -80,9 +79,9 @@ FX_BOOL CBC_Code39::RenderDevice(CFX_RenderDevice* device,
int32_t& e) {
CFX_WideString renderCon =
((CBC_OnedCode39Writer*)m_pBCWriter)
- ->encodedContents(m_renderContents.AsWideStringC(), e);
+ ->encodedContents(m_renderContents.AsStringC(), e);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderDeviceResult(device, matirx, renderCon.AsWideStringC(), e);
+ ->RenderDeviceResult(device, matirx, renderCon.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -90,9 +89,9 @@ FX_BOOL CBC_Code39::RenderDevice(CFX_RenderDevice* device,
FX_BOOL CBC_Code39::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
CFX_WideString renderCon =
((CBC_OnedCode39Writer*)m_pBCWriter)
- ->encodedContents(m_renderContents.AsWideStringC(), e);
+ ->encodedContents(m_renderContents.AsStringC(), e);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderBitmapResult(pOutBitmap, renderCon.AsWideStringC(), e);
+ ->RenderBitmapResult(pOutBitmap, renderCon.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -111,7 +110,7 @@ CFX_WideString CBC_Code39::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(str.AsByteStringC());
+ return CFX_WideString::FromUTF8(str.AsStringC());
}
FX_BOOL CBC_Code39::SetTextLocation(BC_TEXT_LOC location) {
diff --git a/xfa/fxbarcode/cbc_datamatrix.cpp b/xfa/fxbarcode/cbc_datamatrix.cpp
index 6eb2e34af4..c23aa33fc3 100644
--- a/xfa/fxbarcode/cbc_datamatrix.cpp
+++ b/xfa/fxbarcode/cbc_datamatrix.cpp
@@ -79,5 +79,5 @@ CFX_WideString CBC_DataMatrix::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString retStr = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(retStr.AsByteStringC());
+ return CFX_WideString::FromUTF8(retStr.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_ean13.cpp b/xfa/fxbarcode/cbc_ean13.cpp
index bb578b286e..c51e262128 100644
--- a/xfa/fxbarcode/cbc_ean13.cpp
+++ b/xfa/fxbarcode/cbc_ean13.cpp
@@ -74,8 +74,7 @@ FX_BOOL CBC_EAN13::Encode(const CFX_WideStringC& contents,
->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderResult(encodeContents.AsWideStringC(), data, outWidth, isDevice,
- e);
+ ->RenderResult(encodeContents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
@@ -85,14 +84,14 @@ FX_BOOL CBC_EAN13::RenderDevice(CFX_RenderDevice* device,
const CFX_Matrix* matirx,
int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderDeviceResult(device, matirx, m_renderContents.AsWideStringC(), e);
+ ->RenderDeviceResult(device, matirx, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
FX_BOOL CBC_EAN13::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderBitmapResult(pOutBitmap, m_renderContents.AsWideStringC(), e);
+ ->RenderBitmapResult(pOutBitmap, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -111,5 +110,5 @@ CFX_WideString CBC_EAN13::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(str.AsByteStringC());
+ return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_ean8.cpp b/xfa/fxbarcode/cbc_ean8.cpp
index 3316963ea0..1128b8469c 100644
--- a/xfa/fxbarcode/cbc_ean8.cpp
+++ b/xfa/fxbarcode/cbc_ean8.cpp
@@ -73,8 +73,7 @@ FX_BOOL CBC_EAN8::Encode(const CFX_WideStringC& contents,
->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderResult(encodeContents.AsWideStringC(), data, outWidth, isDevice,
- e);
+ ->RenderResult(encodeContents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
@@ -84,14 +83,14 @@ FX_BOOL CBC_EAN8::RenderDevice(CFX_RenderDevice* device,
const CFX_Matrix* matirx,
int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderDeviceResult(device, matirx, m_renderContents.AsWideStringC(), e);
+ ->RenderDeviceResult(device, matirx, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
FX_BOOL CBC_EAN8::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderBitmapResult(pOutBitmap, m_renderContents.AsWideStringC(), e);
+ ->RenderBitmapResult(pOutBitmap, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -110,5 +109,5 @@ CFX_WideString CBC_EAN8::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(str.AsByteStringC());
+ return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_pdf417i.cpp b/xfa/fxbarcode/cbc_pdf417i.cpp
index 1f9f1ff257..7cb8275bc4 100644
--- a/xfa/fxbarcode/cbc_pdf417i.cpp
+++ b/xfa/fxbarcode/cbc_pdf417i.cpp
@@ -87,5 +87,5 @@ CFX_WideString CBC_PDF417I::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString bytestring = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(bytestring.AsByteStringC());
+ return CFX_WideString::FromUTF8(bytestring.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_qrcode.cpp b/xfa/fxbarcode/cbc_qrcode.cpp
index f0261d79b6..41c252e180 100644
--- a/xfa/fxbarcode/cbc_qrcode.cpp
+++ b/xfa/fxbarcode/cbc_qrcode.cpp
@@ -97,5 +97,5 @@ CFX_WideString CBC_QRCode::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString retStr = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(retStr.AsByteStringC());
+ return CFX_WideString::FromUTF8(retStr.AsStringC());
}
diff --git a/xfa/fxbarcode/cbc_upca.cpp b/xfa/fxbarcode/cbc_upca.cpp
index a770bb4e20..38d481946e 100644
--- a/xfa/fxbarcode/cbc_upca.cpp
+++ b/xfa/fxbarcode/cbc_upca.cpp
@@ -76,8 +76,7 @@ FX_BOOL CBC_UPCA::Encode(const CFX_WideStringC& contents,
->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderResult(encodeContents.AsWideStringC(), data, outWidth, isDevice,
- e);
+ ->RenderResult(encodeContents.AsStringC(), data, outWidth, isDevice, e);
FX_Free(data);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
@@ -87,14 +86,14 @@ FX_BOOL CBC_UPCA::RenderDevice(CFX_RenderDevice* device,
const CFX_Matrix* matirx,
int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderDeviceResult(device, matirx, m_renderContents.AsWideStringC(), e);
+ ->RenderDeviceResult(device, matirx, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
FX_BOOL CBC_UPCA::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) {
((CBC_OneDimWriter*)m_pBCWriter)
- ->RenderBitmapResult(pOutBitmap, m_renderContents.AsWideStringC(), e);
+ ->RenderBitmapResult(pOutBitmap, m_renderContents.AsStringC(), e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
return TRUE;
}
@@ -113,5 +112,5 @@ CFX_WideString CBC_UPCA::Decode(CFX_DIBitmap* pBitmap, int32_t& e) {
CBC_BinaryBitmap bitmap(&binarizer);
CFX_ByteString str = m_pBCReader->Decode(&bitmap, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FX_WSTRC(L""));
- return CFX_WideString::FromUTF8(str.AsByteStringC());
+ return CFX_WideString::FromUTF8(str.AsStringC());
}
diff --git a/xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp b/xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp
index f767ffa169..f3c39f2491 100644
--- a/xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp
@@ -107,7 +107,7 @@ CFX_ByteString CBC_OnedCodaBarReader::DecodeRow(int32_t rowNumber,
}
if (result.GetLength() < 5) {
int32_t index =
- temp.Find(result.Mid(1, result.GetLength() - 1).AsByteStringC());
+ temp.Find(result.Mid(1, result.GetLength() - 1).AsStringC());
if (index == len - (result.GetLength() - 1)) {
e = BCExceptionNotFound;
return "";
diff --git a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
index 3fbeb1c318..2d9c2e5ad8 100644
--- a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
@@ -226,6 +226,6 @@ void CBC_OnedCodaBarWriter::RenderResult(const CFX_WideStringC& contents,
int32_t codeLength,
FX_BOOL isDevice,
int32_t& e) {
- CBC_OneDimWriter::RenderResult(encodedContents(contents).AsWideStringC(),
- code, codeLength, isDevice, e);
+ CBC_OneDimWriter::RenderResult(encodedContents(contents).AsStringC(), code,
+ codeLength, isDevice, e);
}
diff --git a/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp b/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp
index 0a69f04a4f..cdbc59ce5b 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp
@@ -360,6 +360,6 @@ void CBC_OnedCode39Writer::RenderResult(const CFX_WideStringC& contents,
int32_t& e) {
CFX_WideString encodedCon = encodedContents(contents, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
- CBC_OneDimWriter::RenderResult(encodedCon.AsWideStringC(), code, codeLength,
+ CBC_OneDimWriter::RenderResult(encodedCon.AsStringC(), code, codeLength,
isDevice, e);
}