summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_datetime.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 /fpdfsdk/cpdfsdk_datetime.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 'fpdfsdk/cpdfsdk_datetime.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_datetime.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/fpdfsdk/cpdfsdk_datetime.cpp b/fpdfsdk/cpdfsdk_datetime.cpp
index d2653fca74..ce22cae12f 100644
--- a/fpdfsdk/cpdfsdk_datetime.cpp
+++ b/fpdfsdk/cpdfsdk_datetime.cpp
@@ -63,7 +63,7 @@ CPDFSDK_DateTime::CPDFSDK_DateTime() {
ResetDateTime();
}
-CPDFSDK_DateTime::CPDFSDK_DateTime(const CFX_ByteString& dtStr) {
+CPDFSDK_DateTime::CPDFSDK_DateTime(const ByteString& dtStr) {
ResetDateTime();
FromPDFDateTimeString(dtStr);
}
@@ -129,7 +129,7 @@ time_t CPDFSDK_DateTime::ToTime_t() const {
}
CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(
- const CFX_ByteString& dtStr) {
+ const ByteString& dtStr) {
int strLength = dtStr.GetLength();
if (strLength <= 0)
return *this;
@@ -263,34 +263,34 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(
return *this;
}
-CFX_ByteString CPDFSDK_DateTime::ToCommonDateTimeString() {
- CFX_ByteString str1;
+ByteString CPDFSDK_DateTime::ToCommonDateTimeString() {
+ ByteString str1;
str1.Format("%04d-%02u-%02u %02u:%02u:%02u ", m_year, m_month, m_day, m_hour,
m_minute, m_second);
if (m_tzHour < 0)
str1 += "-";
else
str1 += "+";
- CFX_ByteString str2;
+ ByteString str2;
str2.Format("%02d:%02u", std::abs(static_cast<int>(m_tzHour)), m_tzMinute);
return str1 + str2;
}
-CFX_ByteString CPDFSDK_DateTime::ToPDFDateTimeString() {
- CFX_ByteString dtStr;
+ByteString CPDFSDK_DateTime::ToPDFDateTimeString() {
+ ByteString dtStr;
char tempStr[32];
memset(tempStr, 0, sizeof(tempStr));
FXSYS_snprintf(tempStr, sizeof(tempStr) - 1, "D:%04d%02u%02u%02u%02u%02u",
m_year, m_month, m_day, m_hour, m_minute, m_second);
- dtStr = CFX_ByteString(tempStr);
+ dtStr = ByteString(tempStr);
if (m_tzHour < 0)
- dtStr += CFX_ByteString("-");
+ dtStr += ByteString("-");
else
- dtStr += CFX_ByteString("+");
+ dtStr += ByteString("+");
memset(tempStr, 0, sizeof(tempStr));
FXSYS_snprintf(tempStr, sizeof(tempStr) - 1, "%02d'%02u'",
std::abs(static_cast<int>(m_tzHour)), m_tzMinute);
- dtStr += CFX_ByteString(tempStr);
+ dtStr += ByteString(tempStr);
return dtStr;
}