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 /fpdfsdk/cpdfsdk_baannot.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 'fpdfsdk/cpdfsdk_baannot.cpp')
-rw-r--r-- | fpdfsdk/cpdfsdk_baannot.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fpdfsdk/cpdfsdk_baannot.cpp b/fpdfsdk/cpdfsdk_baannot.cpp index 9f21d3c7e4..711d228ec3 100644 --- a/fpdfsdk/cpdfsdk_baannot.cpp +++ b/fpdfsdk/cpdfsdk_baannot.cpp @@ -101,7 +101,7 @@ void CPDFSDK_BAAnnot::ClearCachedAP() { 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 @@ void CPDFSDK_BAAnnot::SetContents(const CFX_WideString& sContents) { } } -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 @@ void CPDFSDK_BAAnnot::SetAnnotName(const CFX_WideString& sName) { } } -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 @@ void CPDFSDK_BAAnnot::SetModifiedDate(const FX_SYSTEMTIME& st) { 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 @@ uint32_t CPDFSDK_BAAnnot::GetFlags() const { 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 @@ void CPDFSDK_BAAnnot::SetBorderStyle(BorderStyle nStyle) { 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") |