summaryrefslogtreecommitdiff
path: root/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-09-18 14:23:18 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-18 18:40:16 +0000
commit275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch)
tree2029b9158ec044764ceff122fe5fb5d0a3f123d1 /fxbarcode/oned/BC_OnedCodaBarWriter.cpp
parent450fbeaaabf1ab340c1018de2e58f1950657517e (diff)
downloadpdfium-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/oned/BC_OnedCodaBarWriter.cpp')
-rw-r--r--fxbarcode/oned/BC_OnedCodaBarWriter.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/fxbarcode/oned/BC_OnedCodaBarWriter.cpp b/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
index 03a733a8c2..4c5ad67194 100644
--- a/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
+++ b/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
@@ -95,15 +95,15 @@ bool CBC_OnedCodaBarWriter::FindChar(wchar_t ch, bool isContent) {
}
bool CBC_OnedCodaBarWriter::CheckContentValidity(
- const CFX_WideStringC& contents) {
+ const WideStringView& contents) {
return std::all_of(
contents.begin(), contents.end(),
[this](const wchar_t& ch) { return this->FindChar(ch, false); });
}
-CFX_WideString CBC_OnedCodaBarWriter::FilterContents(
- const CFX_WideStringC& contents) {
- CFX_WideString filtercontents;
+WideString CBC_OnedCodaBarWriter::FilterContents(
+ const WideStringView& contents) {
+ WideString filtercontents;
wchar_t ch;
for (FX_STRSIZE index = 0; index < contents.GetLength(); index++) {
ch = contents[index];
@@ -118,7 +118,7 @@ CFX_WideString CBC_OnedCodaBarWriter::FilterContents(
return filtercontents;
}
-uint8_t* CBC_OnedCodaBarWriter::EncodeWithHint(const CFX_ByteString& contents,
+uint8_t* CBC_OnedCodaBarWriter::EncodeWithHint(const ByteString& contents,
BCFORMAT format,
int32_t& outWidth,
int32_t& outHeight,
@@ -129,9 +129,9 @@ uint8_t* CBC_OnedCodaBarWriter::EncodeWithHint(const CFX_ByteString& contents,
hints);
}
-uint8_t* CBC_OnedCodaBarWriter::EncodeImpl(const CFX_ByteString& contents,
+uint8_t* CBC_OnedCodaBarWriter::EncodeImpl(const ByteString& contents,
int32_t& outLength) {
- CFX_ByteString data = m_chStart + contents + m_chEnd;
+ ByteString data = m_chStart + contents + m_chEnd;
m_iContentLen = data.GetLength();
uint8_t* result = FX_Alloc2D(uint8_t, m_iWideNarrRatio * 7, data.GetLength());
char ch;
@@ -188,16 +188,16 @@ uint8_t* CBC_OnedCodaBarWriter::EncodeImpl(const CFX_ByteString& contents,
return result;
}
-CFX_WideString CBC_OnedCodaBarWriter::encodedContents(
- const CFX_WideStringC& contents) {
- CFX_WideString strStart(static_cast<wchar_t>(m_chStart));
- CFX_WideString strEnd(static_cast<wchar_t>(m_chEnd));
+WideString CBC_OnedCodaBarWriter::encodedContents(
+ const WideStringView& contents) {
+ WideString strStart(static_cast<wchar_t>(m_chStart));
+ WideString strEnd(static_cast<wchar_t>(m_chEnd));
return strStart + contents + strEnd;
}
-bool CBC_OnedCodaBarWriter::RenderResult(const CFX_WideStringC& contents,
+bool CBC_OnedCodaBarWriter::RenderResult(const WideStringView& contents,
uint8_t* code,
int32_t codeLength) {
- return CBC_OneDimWriter::RenderResult(encodedContents(contents).AsStringC(),
- code, codeLength);
+ return CBC_OneDimWriter::RenderResult(
+ encodedContents(contents).AsStringView(), code, codeLength);
}