summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/cbc_datamatrix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxbarcode/cbc_datamatrix.cpp')
-rw-r--r--xfa/fxbarcode/cbc_datamatrix.cpp7
1 files changed, 4 insertions, 3 deletions
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());
}