diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-09-18 14:23:18 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-18 18:40:16 +0000 |
commit | 275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch) | |
tree | 2029b9158ec044764ceff122fe5fb5d0a3f123d1 /fxbarcode/datamatrix/BC_HighLevelEncoder.cpp | |
parent | 450fbeaaabf1ab340c1018de2e58f1950657517e (diff) | |
download | pdfium-275e260a6cd4a8e506ba974feb85ebcd926c1739.tar.xz |
Convert string class names
Automated using git grep & sed.
Replace StringC classes with StringView classes.
Remove the CFX_ prefix and put string classes in fxcrt namespace.
Change AsStringC() to AsStringView().
Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*,
Foo).
Couple of tests needed to have their names regularlized.
BUG=pdfium:894
Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d
Reviewed-on: https://pdfium-review.googlesource.com/14151
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fxbarcode/datamatrix/BC_HighLevelEncoder.cpp')
-rw-r--r-- | fxbarcode/datamatrix/BC_HighLevelEncoder.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp b/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp index b8c63946db..56a8847066 100644 --- a/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp +++ b/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp @@ -58,22 +58,21 @@ const wchar_t CBC_HighLevelEncoder::MACRO_TRAILER = 0x0004; CBC_HighLevelEncoder::CBC_HighLevelEncoder() {} CBC_HighLevelEncoder::~CBC_HighLevelEncoder() {} -std::vector<uint8_t>& CBC_HighLevelEncoder::getBytesForMessage( - CFX_WideString msg) { - CFX_ByteString bytestr; +std::vector<uint8_t>& CBC_HighLevelEncoder::getBytesForMessage(WideString msg) { + ByteString bytestr; CBC_UtilCodingConvert::UnicodeToUTF8(msg, bytestr); m_bytearray.insert(m_bytearray.end(), bytestr.begin(), bytestr.end()); return m_bytearray; } // static -CFX_WideString CBC_HighLevelEncoder::encodeHighLevel(CFX_WideString msg, - CFX_WideString ecLevel, - bool allowRectangular, - int32_t& e) { +WideString CBC_HighLevelEncoder::encodeHighLevel(WideString msg, + WideString ecLevel, + bool allowRectangular, + int32_t& e) { CBC_EncoderContext context(msg, ecLevel, e); if (e != BCExceptionNO) - return CFX_WideString(); + return WideString(); context.setAllowRectangular(allowRectangular); if ((msg.Left(6) == MACRO_05_HEADER) && (msg.Last() == MACRO_TRAILER)) { @@ -117,7 +116,7 @@ CFX_WideString CBC_HighLevelEncoder::encodeHighLevel(CFX_WideString msg, context.writeCodeword(0x00fe); } } - CFX_WideString codewords = context.m_codewords; + WideString codewords = context.m_codewords; if (pdfium::base::checked_cast<int32_t>(codewords.GetLength()) < capacity) { codewords += PAD; } @@ -128,7 +127,7 @@ CFX_WideString CBC_HighLevelEncoder::encodeHighLevel(CFX_WideString msg, } return codewords; } -int32_t CBC_HighLevelEncoder::lookAheadTest(CFX_WideString msg, +int32_t CBC_HighLevelEncoder::lookAheadTest(WideString msg, int32_t startpos, int32_t currentMode) { if (startpos >= pdfium::base::checked_cast<int32_t>(msg.GetLength())) { @@ -279,7 +278,7 @@ bool CBC_HighLevelEncoder::isDigit(wchar_t ch) { bool CBC_HighLevelEncoder::isExtendedASCII(wchar_t ch) { return ch >= 128 && ch <= 255; } -int32_t CBC_HighLevelEncoder::determineConsecutiveDigitCount(CFX_WideString msg, +int32_t CBC_HighLevelEncoder::determineConsecutiveDigitCount(WideString msg, int32_t startpos) { int32_t count = 0; int32_t len = msg.GetLength(); |