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>
diff --git a/fpdfsdk/cpdfsdk_baannot.cpp b/fpdfsdk/cpdfsdk_baannot.cpp
index 9f21d3c..711d228 100644
--- a/fpdfsdk/cpdfsdk_baannot.cpp
+++ b/fpdfsdk/cpdfsdk_baannot.cpp
@@ -101,7 +101,7 @@
m_pAnnot->ClearCachedAP();
}
-void CPDFSDK_BAAnnot::SetContents(const CFX_WideString& sContents) {
+void CPDFSDK_BAAnnot::SetContents(const WideString& sContents) {
if (sContents.IsEmpty()) {
m_pAnnot->GetAnnotDict()->RemoveFor("Contents");
} else {
@@ -110,11 +110,11 @@
}
}
-CFX_WideString CPDFSDK_BAAnnot::GetContents() const {
+WideString CPDFSDK_BAAnnot::GetContents() const {
return m_pAnnot->GetAnnotDict()->GetUnicodeTextFor("Contents");
}
-void CPDFSDK_BAAnnot::SetAnnotName(const CFX_WideString& sName) {
+void CPDFSDK_BAAnnot::SetAnnotName(const WideString& sName) {
if (sName.IsEmpty()) {
m_pAnnot->GetAnnotDict()->RemoveFor("NM");
} else {
@@ -123,13 +123,13 @@
}
}
-CFX_WideString CPDFSDK_BAAnnot::GetAnnotName() const {
+WideString CPDFSDK_BAAnnot::GetAnnotName() const {
return m_pAnnot->GetAnnotDict()->GetUnicodeTextFor("NM");
}
void CPDFSDK_BAAnnot::SetModifiedDate(const FX_SYSTEMTIME& st) {
CPDFSDK_DateTime dt(st);
- CFX_ByteString str = dt.ToPDFDateTimeString();
+ ByteString str = dt.ToPDFDateTimeString();
if (str.IsEmpty())
m_pAnnot->GetAnnotDict()->RemoveFor("M");
else
@@ -138,7 +138,7 @@
FX_SYSTEMTIME CPDFSDK_BAAnnot::GetModifiedDate() const {
FX_SYSTEMTIME systime;
- CFX_ByteString str = m_pAnnot->GetAnnotDict()->GetStringFor("M");
+ ByteString str = m_pAnnot->GetAnnotDict()->GetStringFor("M");
CPDFSDK_DateTime dt(str);
dt.ToSystemTime(systime);
return systime;
@@ -153,14 +153,14 @@
return m_pAnnot->GetAnnotDict()->GetIntegerFor("F");
}
-void CPDFSDK_BAAnnot::SetAppState(const CFX_ByteString& str) {
+void CPDFSDK_BAAnnot::SetAppState(const ByteString& str) {
if (str.IsEmpty())
m_pAnnot->GetAnnotDict()->RemoveFor("AS");
else
m_pAnnot->GetAnnotDict()->SetNewFor<CPDF_String>("AS", str, false);
}
-CFX_ByteString CPDFSDK_BAAnnot::GetAppState() const {
+ByteString CPDFSDK_BAAnnot::GetAppState() const {
return m_pAnnot->GetAnnotDict()->GetStringFor("AS");
}
@@ -225,7 +225,7 @@
BorderStyle CPDFSDK_BAAnnot::GetBorderStyle() const {
CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDictFor("BS");
if (pBSDict) {
- CFX_ByteString sBorderStyle = pBSDict->GetStringFor("S", "S");
+ ByteString sBorderStyle = pBSDict->GetStringFor("S", "S");
if (sBorderStyle == "S")
return BorderStyle::SOLID;
if (sBorderStyle == "D")