summaryrefslogtreecommitdiff
path: root/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxbarcode/datamatrix/BC_EdifactEncoder.cpp')
-rw-r--r--fxbarcode/datamatrix/BC_EdifactEncoder.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/fxbarcode/datamatrix/BC_EdifactEncoder.cpp b/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
index 7407efb47e..438c87a38f 100644
--- a/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
+++ b/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
@@ -33,10 +33,10 @@
namespace {
-CFX_WideString EncodeToCodewords(const CFX_WideString& sb, int32_t startPos) {
+WideString EncodeToCodewords(const WideString& sb, int32_t startPos) {
int32_t len = sb.GetLength() - startPos;
if (len == 0)
- return CFX_WideString();
+ return WideString();
wchar_t c1 = sb[startPos];
wchar_t c2 = len >= 2 ? sb[startPos + 1] : 0;
@@ -48,10 +48,10 @@ CFX_WideString EncodeToCodewords(const CFX_WideString& sb, int32_t startPos) {
cw[0] = static_cast<wchar_t>((v >> 16) & 255);
cw[1] = static_cast<wchar_t>((v >> 8) & 255);
cw[2] = static_cast<wchar_t>(v & 255);
- return CFX_WideString(cw, std::min(len, kBuflen));
+ return WideString(cw, std::min(len, kBuflen));
}
-bool HandleEOD(CBC_EncoderContext* context, const CFX_WideString& buffer) {
+bool HandleEOD(CBC_EncoderContext* context, const WideString& buffer) {
int32_t count = buffer.GetLength();
if (count == 0)
return true;
@@ -72,7 +72,7 @@ bool HandleEOD(CBC_EncoderContext* context, const CFX_WideString& buffer) {
}
int32_t restChars = count - 1;
- CFX_WideString encoded = EncodeToCodewords(buffer, 0);
+ WideString encoded = EncodeToCodewords(buffer, 0);
if (encoded.IsEmpty())
return false;
@@ -105,7 +105,7 @@ bool HandleEOD(CBC_EncoderContext* context, const CFX_WideString& buffer) {
return true;
}
-void encodeChar(wchar_t c, CFX_WideString* sb, int32_t& e) {
+void encodeChar(wchar_t c, WideString* sb, int32_t& e) {
if (c >= ' ' && c <= '?') {
*sb += c;
} else if (c >= '@' && c <= '^') {
@@ -126,7 +126,7 @@ int32_t CBC_EdifactEncoder::getEncodingMode() {
}
void CBC_EdifactEncoder::Encode(CBC_EncoderContext& context, int32_t& e) {
- CFX_WideString buffer;
+ WideString buffer;
while (context.hasMoreCharacters()) {
wchar_t c = context.getCurrentChar();
encodeChar(c, &buffer, e);
@@ -136,7 +136,7 @@ void CBC_EdifactEncoder::Encode(CBC_EncoderContext& context, int32_t& e) {
context.m_pos++;
int32_t count = buffer.GetLength();
if (count >= 4) {
- CFX_WideString encoded = EncodeToCodewords(buffer, 0);
+ WideString encoded = EncodeToCodewords(buffer, 0);
if (encoded.IsEmpty()) {
e = BCExceptionGeneric;
return;