summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/datamatrix
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxbarcode/datamatrix')
-rw-r--r--xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp2
-rw-r--r--xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp8
-rw-r--r--xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp2
-rw-r--r--xfa/fxbarcode/datamatrix/BC_SymbolInfo.cpp25
-rw-r--r--xfa/fxbarcode/datamatrix/BC_SymbolInfo.h1
5 files changed, 6 insertions, 32 deletions
diff --git a/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
index d1f5b9796d..e1d493a1ca 100644
--- a/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
@@ -132,7 +132,7 @@ CFX_WideString CBC_EdifactEncoder::encodeToCodewords(CFX_WideString sb,
int32_t len = sb.GetLength() - startPos;
if (len == 0) {
e = BCExceptionNoContents;
- return (FX_WCHAR*)"";
+ return CFX_WideString();
}
FX_WCHAR c1 = sb.GetAt(startPos);
FX_WCHAR c2 = len >= 2 ? sb.GetAt(startPos + 1) : 0;
diff --git a/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp b/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
index 8f54353d4a..f52f0ff0c4 100644
--- a/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
@@ -121,7 +121,7 @@ CFX_WideString CBC_ErrorCorrection::encodeECC200(CFX_WideString codewords,
int32_t& e) {
if (codewords.GetLength() != symbolInfo->m_dataCapacity) {
e = BCExceptionIllegalArgument;
- return (FX_WCHAR*)"";
+ return CFX_WideString();
}
CFX_WideString sb;
sb += codewords;
@@ -129,7 +129,7 @@ CFX_WideString CBC_ErrorCorrection::encodeECC200(CFX_WideString codewords,
if (blockCount == 1) {
CFX_WideString ecc =
createECCBlock(codewords, symbolInfo->m_errorCodewords, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
+ BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString());
sb += ecc;
} else {
CFX_Int32Array dataSizes;
@@ -152,7 +152,7 @@ CFX_WideString CBC_ErrorCorrection::encodeECC200(CFX_WideString codewords,
temp += (FX_WCHAR)codewords.GetAt(d);
}
CFX_WideString ecc = createECCBlock(temp, errorSizes[block], e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
+ BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString());
int32_t pos = 0;
for (int32_t l = block; l < errorSizes[block] * blockCount;
l += blockCount) {
@@ -179,7 +179,7 @@ CFX_WideString CBC_ErrorCorrection::createECCBlock(CFX_WideString codewords,
if (table >= kFactorTableNum) {
e = BCExceptionIllegalArgument;
- return (FX_WCHAR*)"";
+ return CFX_WideString();
}
uint16_t* ecc = FX_Alloc(uint16_t, numECWords);
FXSYS_memset(ecc, 0, numECWords * sizeof(uint16_t));
diff --git a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
index 19672c1b71..5388244351 100644
--- a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
@@ -78,7 +78,7 @@ CFX_WideString CBC_HighLevelEncoder::encodeHighLevel(CFX_WideString msg,
CBC_Dimension* maxSize,
int32_t& e) {
CBC_EncoderContext context(msg, ecLevel, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
+ BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString());
context.setSymbolShape(shape);
context.setSizeConstraints(minSize, maxSize);
if ((msg.Mid(0, 6) == MACRO_05_HEADER) &&
diff --git a/xfa/fxbarcode/datamatrix/BC_SymbolInfo.cpp b/xfa/fxbarcode/datamatrix/BC_SymbolInfo.cpp
index 593f4cb162..d3d68541c4 100644
--- a/xfa/fxbarcode/datamatrix/BC_SymbolInfo.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_SymbolInfo.cpp
@@ -228,28 +228,3 @@ int32_t CBC_SymbolInfo::getDataLengthForInterleavedBlock(int32_t index) {
int32_t CBC_SymbolInfo::getErrorLengthForInterleavedBlock(int32_t index) {
return m_rsBlockError;
}
-CFX_WideString CBC_SymbolInfo::toString(int32_t& e) {
- CFX_WideString sb;
- sb += (FX_WCHAR*)(m_rectangular ? "Rectangular Symbol:" : "Square Symbol:");
- sb += (FX_WCHAR*)" data region ";
- sb += m_matrixWidth;
- sb += (FX_WCHAR)'x';
- sb += m_matrixHeight;
- sb += (FX_WCHAR*)", symbol size ";
- sb += getSymbolWidth(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
- sb += (FX_WCHAR)'x';
- sb += getSymbolHeight(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
- sb += (FX_WCHAR*)", symbol data size ";
- sb += getSymbolDataWidth(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
- sb += (FX_WCHAR)'x';
- sb += getSymbolDataHeight(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR*)"");
- sb += (FX_WCHAR*)", codewords ";
- sb += m_dataCapacity;
- sb += (FX_WCHAR)'+';
- sb += m_errorCodewords;
- return sb;
-}
diff --git a/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h b/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h
index f5d6b8ae28..7885c8da74 100644
--- a/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h
+++ b/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h
@@ -53,7 +53,6 @@ class CBC_SymbolInfo : public CBC_SymbolShapeHint {
int32_t getInterleavedBlockCount();
int32_t getDataLengthForInterleavedBlock(int32_t index);
int32_t getErrorLengthForInterleavedBlock(int32_t index);
- CFX_WideString toString(int32_t& e);
public:
int32_t m_dataCapacity;