summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-08 12:20:38 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-08 12:20:39 -0700
commit4c3debb3c91f5842784be30a911b52cdabcab7df (patch)
treee0534dcb43a71376be8da0b376a97de37080ecc5 /fpdfsdk
parentf172290a8dc527cd8bc73b0d0ad59e78797968c1 (diff)
downloadpdfium-4c3debb3c91f5842784be30a911b52cdabcab7df.tar.xz
Rename both As{Byte,Wide}StringC() helpers to AsStringC().
The naming is redundant given the base type, and will stand in the way of consolidating Byte and Wide code. BUG= Review URL: https://codereview.chromium.org/1862123003
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/formfiller/cba_fontmap.cpp18
-rw-r--r--fpdfsdk/fpdf_ext.cpp2
-rw-r--r--fpdfsdk/fpdf_flatten.cpp8
-rw-r--r--fpdfsdk/fpdfppo.cpp8
-rw-r--r--fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp6
-rw-r--r--fpdfsdk/fsdk_baseannot.cpp10
-rw-r--r--fpdfsdk/fsdk_baseform.cpp19
-rw-r--r--fpdfsdk/fsdk_mgr.cpp4
-rw-r--r--fpdfsdk/fxedit/fxet_pageobjs.cpp8
-rw-r--r--fpdfsdk/javascript/Document.cpp2
-rw-r--r--fpdfsdk/javascript/PublicMethods.cpp20
-rw-r--r--fpdfsdk/pdfwindow/PWL_Edit.cpp28
-rw-r--r--fpdfsdk/pdfwindow/PWL_Icon.cpp2
-rw-r--r--fpdfsdk/pdfwindow/PWL_Label.cpp8
-rw-r--r--fpdfsdk/pdfwindow/PWL_ListBox.cpp10
-rw-r--r--fpdfsdk/pdfwindow/PWL_ScrollBar.cpp2
-rw-r--r--fpdfsdk/pdfwindow/PWL_Signature.cpp2
17 files changed, 75 insertions, 82 deletions
diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp
index 1ecf7d4de4..d12c7fe975 100644
--- a/fpdfsdk/formfiller/cba_fontmap.cpp
+++ b/fpdfsdk/formfiller/cba_fontmap.cpp
@@ -159,15 +159,15 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
}
// to avoid checkbox and radiobutton
- CPDF_Object* pObject = pAPDict->GetObjectBy(m_sAPType.AsByteStringC());
+ CPDF_Object* pObject = pAPDict->GetObjectBy(m_sAPType.AsStringC());
if (ToDictionary(pObject))
return;
- CPDF_Stream* pStream = pAPDict->GetStreamBy(m_sAPType.AsByteStringC());
+ CPDF_Stream* pStream = pAPDict->GetStreamBy(m_sAPType.AsStringC());
if (!pStream) {
pStream = new CPDF_Stream(NULL, 0, NULL);
int32_t objnum = m_pDocument->AddIndirectObject(pStream);
- pAPDict->SetAtReference(m_sAPType.AsByteStringC(), m_pDocument, objnum);
+ pAPDict->SetAtReference(m_sAPType.AsStringC(), m_pDocument, objnum);
}
CPDF_Dictionary* pStreamDict = pStream->GetDict();
@@ -191,8 +191,8 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
int32_t objnum = m_pDocument->AddIndirectObject(pStreamResFontList);
pStreamResList->SetAtReference("Font", m_pDocument, objnum);
}
- if (!pStreamResFontList->KeyExist(sAlias.AsByteStringC()))
- pStreamResFontList->SetAtReference(sAlias.AsByteStringC(), m_pDocument,
+ if (!pStreamResFontList->KeyExist(sAlias.AsStringC()))
+ pStreamResFontList->SetAtReference(sAlias.AsStringC(), m_pDocument,
pFont->GetFontDict());
}
}
@@ -221,14 +221,14 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) {
CPDF_Dictionary* pFontDict = NULL;
if (!sDA.IsEmpty()) {
- CPDF_SimpleParser syntax(sDA.AsByteStringC());
+ CPDF_SimpleParser syntax(sDA.AsStringC());
syntax.FindTagParamFromStart("Tf", 2);
CFX_ByteString sFontName = syntax.GetWord();
sAlias = PDF_NameDecode(sFontName).Mid(1);
if (CPDF_Dictionary* pDRDict = m_pAnnotDict->GetDictBy("DR"))
if (CPDF_Dictionary* pDRFontDict = pDRDict->GetDictBy("Font"))
- pFontDict = pDRFontDict->GetDictBy(sAlias.AsByteStringC());
+ pFontDict = pDRFontDict->GetDictBy(sAlias.AsStringC());
if (!pFontDict)
if (CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictBy("AP"))
@@ -237,14 +237,14 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) {
pNormalDict->GetDictBy("Resources"))
if (CPDF_Dictionary* pResFontDict =
pNormalResDict->GetDictBy("Font"))
- pFontDict = pResFontDict->GetDictBy(sAlias.AsByteStringC());
+ pFontDict = pResFontDict->GetDictBy(sAlias.AsStringC());
if (bWidget) {
if (!pFontDict) {
if (pAcroFormDict) {
if (CPDF_Dictionary* pDRDict = pAcroFormDict->GetDictBy("DR"))
if (CPDF_Dictionary* pDRFontDict = pDRDict->GetDictBy("Font"))
- pFontDict = pDRFontDict->GetDictBy(sAlias.AsByteStringC());
+ pFontDict = pDRFontDict->GetDictBy(sAlias.AsStringC());
}
}
}
diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp
index 1f4a1c5590..3ac1262fc1 100644
--- a/fpdfsdk/fpdf_ext.cpp
+++ b/fpdfsdk/fpdf_ext.cpp
@@ -105,7 +105,7 @@ FX_BOOL CheckSharedForm(const CXML_Element* pElement, CFX_ByteString cbName) {
if (space == "xmlns" && name == "adhocwf" &&
value == L"http://ns.adobe.com/AcrobatAdhocWorkflow/1.0/") {
CXML_Element* pVersion =
- pElement->GetElement("adhocwf", cbName.AsByteStringC());
+ pElement->GetElement("adhocwf", cbName.AsStringC());
if (!pVersion)
continue;
CFX_WideString wsContent = pVersion->GetContent(0);
diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp
index bbd5ad3dd3..99f97d7ca2 100644
--- a/fpdfsdk/fpdf_flatten.cpp
+++ b/fpdfsdk/fpdf_flatten.cpp
@@ -395,7 +395,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
char sExtend[5] = {};
FXSYS_itoa(iKey, sExtend, 10);
key = CFX_ByteString("FFT") + CFX_ByteString(sExtend);
- if (!pPageXObject->KeyExist(key.AsByteStringC()))
+ if (!pPageXObject->KeyExist(key.AsStringC()))
break;
}
}
@@ -405,7 +405,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
CPDF_Dictionary* pNewXORes = NULL;
if (!key.IsEmpty()) {
- pPageXObject->SetAtReference(key.AsByteStringC(), pDocument, dwObjNum);
+ pPageXObject->SetAtReference(key.AsStringC(), pDocument, dwObjNum);
CPDF_Dictionary* pNewOXbjectDic = pNewXObject->GetDict();
pNewXORes = new CPDF_Dictionary;
pNewOXbjectDic->SetAt("Resources", pNewXORes);
@@ -437,7 +437,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
continue;
if (!sAnnotState.IsEmpty()) {
- pAPStream = pAPDic->GetStreamBy(sAnnotState.AsByteStringC());
+ pAPStream = pAPDic->GetStreamBy(sAnnotState.AsStringC());
} else {
auto it = pAPDic->begin();
if (it != pAPDic->end()) {
@@ -486,7 +486,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
CFX_ByteString sFormName;
sFormName.Format("F%d", i);
uint32_t dwObjNum = pDocument->AddIndirectObject(pObj);
- pXObject->SetAtReference(sFormName.AsByteStringC(), pDocument, dwObjNum);
+ pXObject->SetAtReference(sFormName.AsStringC(), pDocument, dwObjNum);
CPDF_StreamAcc acc;
acc.LoadAllData(pNewXObject);
diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp
index 21d8c7d9ae..1dbd10c1f7 100644
--- a/fpdfsdk/fpdfppo.cpp
+++ b/fpdfsdk/fpdfppo.cpp
@@ -110,9 +110,9 @@ FX_BOOL CPDF_PageOrganizer::ExportPage(CPDF_Document* pSrcPDFDoc,
const CFX_ByteString& cbSrcKeyStr = it.first;
CPDF_Object* pObj = it.second;
if (cbSrcKeyStr.Compare(("Type")) && cbSrcKeyStr.Compare(("Parent"))) {
- if (pCurPageDict->KeyExist(cbSrcKeyStr.AsByteStringC()))
- pCurPageDict->RemoveAt(cbSrcKeyStr.AsByteStringC());
- pCurPageDict->SetAt(cbSrcKeyStr.AsByteStringC(), pObj->Clone());
+ if (pCurPageDict->KeyExist(cbSrcKeyStr.AsStringC()))
+ pCurPageDict->RemoveAt(cbSrcKeyStr.AsStringC());
+ pCurPageDict->SetAt(cbSrcKeyStr.AsStringC(), pObj->Clone());
}
}
@@ -229,7 +229,7 @@ FX_BOOL CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj,
}
if (pNextObj) {
if (!UpdateReference(pNextObj, pDoc, pObjNumberMap))
- pDict->RemoveAt(key.AsByteStringC());
+ pDict->RemoveAt(key.AsStringC());
} else {
return FALSE;
}
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
index cbf737138e..aa1a1a82c7 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
@@ -957,7 +957,7 @@ FX_BOOL CPDFXFA_Document::_ExportSubmitFile(FPDF_FILEHANDLER* pFileHandler,
ws.FromLocal("data");
CFX_ByteString content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
fileStream.WriteBlock((const FX_CHAR*)content, 0, content.GetLength());
- m_pXFADoc->SavePackage(ws.AsWideStringC(), &fileStream);
+ m_pXFADoc->SavePackage(ws.AsStringC(), &fileStream);
} else if (fileType == FXFA_SAVEAS_XDP) {
if (flag == 0)
flag = FXFA_CONFIG | FXFA_TEMPLATE | FXFA_LOCALESET | FXFA_DATASETS |
@@ -1018,11 +1018,11 @@ FX_BOOL CPDFXFA_Document::_ExportSubmitFile(FPDF_FILEHANDLER* pFileHandler,
if (pPrePDFObj->GetString() == "form") {
CFX_WideString ws;
ws.FromLocal("form");
- m_pXFADoc->SavePackage(ws.AsWideStringC(), &fileStream);
+ m_pXFADoc->SavePackage(ws.AsStringC(), &fileStream);
} else if (pPrePDFObj->GetString() == "datasets") {
CFX_WideString ws;
ws.FromLocal("datasets");
- m_pXFADoc->SavePackage(ws.AsWideStringC(), &fileStream);
+ m_pXFADoc->SavePackage(ws.AsStringC(), &fileStream);
} else {
// PDF,creator.
}
diff --git a/fpdfsdk/fsdk_baseannot.cpp b/fpdfsdk/fsdk_baseannot.cpp
index b3363bfbc7..68d99e8ae5 100644
--- a/fpdfsdk/fsdk_baseannot.cpp
+++ b/fpdfsdk/fsdk_baseannot.cpp
@@ -831,22 +831,22 @@ void CPDFSDK_BAAnnot::WriteAppearance(const CFX_ByteString& sAPType,
if (sAPState.IsEmpty()) {
pParentDict = pAPDict;
- pStream = pAPDict->GetStreamBy(sAPType.AsByteStringC());
+ pStream = pAPDict->GetStreamBy(sAPType.AsStringC());
} else {
- CPDF_Dictionary* pAPTypeDict = pAPDict->GetDictBy(sAPType.AsByteStringC());
+ CPDF_Dictionary* pAPTypeDict = pAPDict->GetDictBy(sAPType.AsStringC());
if (!pAPTypeDict) {
pAPTypeDict = new CPDF_Dictionary;
- pAPDict->SetAt(sAPType.AsByteStringC(), pAPTypeDict);
+ pAPDict->SetAt(sAPType.AsStringC(), pAPTypeDict);
}
pParentDict = pAPTypeDict;
- pStream = pAPTypeDict->GetStreamBy(sAPState.AsByteStringC());
+ pStream = pAPTypeDict->GetStreamBy(sAPState.AsStringC());
}
if (!pStream) {
pStream = new CPDF_Stream(nullptr, 0, nullptr);
CPDF_Document* pDoc = m_pPageView->GetPDFDocument();
int32_t objnum = pDoc->AddIndirectObject(pStream);
- pParentDict->SetAtReference(sAPType.AsByteStringC(), pDoc, objnum);
+ pParentDict->SetAtReference(sAPType.AsStringC(), pDoc, objnum);
}
CPDF_Dictionary* pStreamDict = pStream->GetDict();
diff --git a/fpdfsdk/fsdk_baseform.cpp b/fpdfsdk/fsdk_baseform.cpp
index 859b022754..bfeba0e6dd 100644
--- a/fpdfsdk/fsdk_baseform.cpp
+++ b/fpdfsdk/fsdk_baseform.cpp
@@ -64,7 +64,7 @@ CXFA_FFWidget* CPDFSDK_Widget::GetMixXFAWidget() const {
}
if (!sName.IsEmpty())
- m_hMixXFAWidget = pDocView->GetWidgetByName(sName.AsWideStringC());
+ m_hMixXFAWidget = pDocView->GetWidgetByName(sName.AsStringC());
}
}
return m_hMixXFAWidget;
@@ -80,7 +80,7 @@ CXFA_FFWidget* CPDFSDK_Widget::GetGroupMixXFAWidget() {
if (CXFA_FFDocView* pDocView = pDoc->GetXFADocView()) {
CFX_WideString sName = GetName();
if (!sName.IsEmpty())
- return pDocView->GetWidgetByName(sName.AsWideStringC());
+ return pDocView->GetWidgetByName(sName.AsStringC());
}
}
@@ -461,7 +461,7 @@ FX_BOOL CPDFSDK_Widget::IsWidgetAppearanceValid(
case FIELDTYPE_CHECKBOX:
case FIELDTYPE_RADIOBUTTON:
if (CPDF_Dictionary* pSubDict = psub->AsDictionary()) {
- return !!pSubDict->GetStreamBy(GetAppState().AsByteStringC());
+ return !!pSubDict->GetStreamBy(GetAppState().AsStringC());
}
return FALSE;
}
@@ -1808,7 +1808,7 @@ void CPDFSDK_Widget::AddImageToAppearance(const CFX_ByteString& sAPType,
ASSERT(pDoc);
CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDictBy("AP");
- CPDF_Stream* pStream = pAPDict->GetStreamBy(sAPType.AsByteStringC());
+ CPDF_Stream* pStream = pAPDict->GetStreamBy(sAPType.AsStringC());
CPDF_Dictionary* pStreamDict = pStream->GetDict();
CFX_ByteString sImageAlias = "IMG";
@@ -1826,14 +1826,14 @@ void CPDFSDK_Widget::AddImageToAppearance(const CFX_ByteString& sAPType,
if (pStreamResList) {
CPDF_Dictionary* pXObject = new CPDF_Dictionary;
- pXObject->SetAtReference(sImageAlias.AsByteStringC(), pDoc, pImage);
+ pXObject->SetAtReference(sImageAlias.AsStringC(), pDoc, pImage);
pStreamResList->SetAt("XObject", pXObject);
}
}
void CPDFSDK_Widget::RemoveAppearance(const CFX_ByteString& sAPType) {
if (CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDictBy("AP")) {
- pAPDict->RemoveAt(sAPType.AsByteStringC());
+ pAPDict->RemoveAt(sAPType.AsStringC());
}
}
@@ -2448,7 +2448,7 @@ FX_BOOL CPDFSDK_InterForm::ExportFieldsToFDFTextBuf(
bool bIncludeOrExclude,
CFX_ByteTextBuf& textBuf) {
std::unique_ptr<CFDF_Document> pFDF(m_pInterForm->ExportToFDF(
- m_pDocument->GetPath().AsWideStringC(), fields, bIncludeOrExclude));
+ m_pDocument->GetPath().AsStringC(), fields, bIncludeOrExclude));
return pFDF ? pFDF->WriteBuf(textBuf) : FALSE;
}
@@ -2486,8 +2486,7 @@ FX_BOOL CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination,
CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
CFX_WideString wsPDFFilePath = m_pDocument->GetPath();
- CFDF_Document* pFDFDoc =
- m_pInterForm->ExportToFDF(wsPDFFilePath.AsWideStringC());
+ CFDF_Document* pFDFDoc = m_pInterForm->ExportToFDF(wsPDFFilePath.AsStringC());
if (!pFDFDoc)
return FALSE;
@@ -2517,7 +2516,7 @@ FX_BOOL CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination,
FX_BOOL CPDFSDK_InterForm::ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf) {
CFDF_Document* pFDF =
- m_pInterForm->ExportToFDF(m_pDocument->GetPath().AsWideStringC());
+ m_pInterForm->ExportToFDF(m_pDocument->GetPath().AsStringC());
if (!pFDF)
return FALSE;
diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp
index e6ad18d232..3412516f65 100644
--- a/fpdfsdk/fsdk_mgr.cpp
+++ b/fpdfsdk/fsdk_mgr.cpp
@@ -186,7 +186,7 @@ FX_BOOL CFX_SystemHandler::FindNativeTrueTypeFont(
pFontMapper->LoadInstalledFonts();
for (const auto& font : pFontMapper->m_InstalledTTFonts) {
- if (font.Compare(sFontFaceName.AsByteStringC()))
+ if (font.Compare(sFontFaceName.AsStringC()))
return TRUE;
}
@@ -476,7 +476,7 @@ void CPDFSDK_Document::ProcJavascriptFun() {
CPDF_Action jsAction = docJS.GetJSAction(i, csJSName);
if (m_pEnv->GetActionHander())
m_pEnv->GetActionHander()->DoAction_JavaScript(
- jsAction, CFX_WideString::FromLocal(csJSName.AsByteStringC()), this);
+ jsAction, CFX_WideString::FromLocal(csJSName.AsStringC()), this);
}
}
diff --git a/fpdfsdk/fxedit/fxet_pageobjs.cpp b/fpdfsdk/fxedit/fxet_pageobjs.cpp
index cbe6fabcb6..a09b92f4d4 100644
--- a/fpdfsdk/fxedit/fxet_pageobjs.cpp
+++ b/fpdfsdk/fxedit/fxet_pageobjs.cpp
@@ -249,7 +249,7 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice,
sTextBuf << GetPDFWordString(pFontMap, word.nFontIndex, word.Word,
SubWord)
- .AsByteStringC();
+ .AsStringC();
} else {
DrawTextString(
pDevice, CFX_FloatPoint(word.ptWord.x + ptOffset.x,
@@ -363,7 +363,7 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice,
sTextBuf << GetPDFWordString(pFontMap, word.WordProps.nFontIndex,
word.Word, 0)
- .AsByteStringC();
+ .AsStringC();
if (word.WordProps.nWordStyle & PVTWORD_STYLE_UNDERLINE) {
CFX_PathData pathUnderline;
@@ -507,7 +507,7 @@ void IFX_Edit::GeneratePageObjects(
}
sTextBuf << GetPDFWordString(pFontMap, word.nFontIndex, word.Word, 0)
- .AsByteStringC();
+ .AsStringC();
oldplace = place;
}
}
@@ -580,7 +580,7 @@ void IFX_Edit::GenerateRichPageObjects(
sTextBuf << GetPDFWordString(pFontMap, word.WordProps.nFontIndex,
word.Word, 0)
- .AsByteStringC();
+ .AsStringC();
if (word.WordProps.nWordStyle & PVTWORD_STYLE_UNDERLINE) {
CFX_FloatRect rcUnderline = GetUnderLineRect(word);
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index 75cd2ec251..4c361b197e 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -784,7 +784,7 @@ FX_BOOL Document::info(IJS_Context* cc,
for (const auto& it : *pDictionary) {
const CFX_ByteString& bsKey = it.first;
CPDF_Object* pValueObj = it.second;
- CFX_WideString wsKey = CFX_WideString::FromUTF8(bsKey.AsByteStringC());
+ CFX_WideString wsKey = CFX_WideString::FromUTF8(bsKey.AsStringC());
if (pValueObj->IsString() || pValueObj->IsName()) {
FXJS_PutObjectString(isolate, pObj, wsKey.c_str(),
pValueObj->GetUnicodeText().c_str());
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index d5b961d61d..eb0bd1b306 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -837,7 +837,7 @@ FX_BOOL CJS_PublicMethods::AFNumber_Format(IJS_Context* cc,
}
// for processing currency string
- Value = CFX_WideString::FromLocal(strValue.AsByteStringC());
+ Value = CFX_WideString::FromLocal(strValue.AsStringC());
std::wstring strValue2 = Value.c_str();
if (bCurrencyPrepend)
@@ -1120,7 +1120,7 @@ FX_BOOL CJS_PublicMethods::AFPercent_Format(
if (iNegative)
strValue = "-" + strValue;
strValue += "%";
- Value = CFX_WideString::FromLocal(strValue.AsByteStringC());
+ Value = CFX_WideString::FromLocal(strValue.AsStringC());
#endif
return TRUE;
}
@@ -1219,11 +1219,11 @@ double CJS_PublicMethods::MakeInterDate(CFX_WideString strValue) {
else if (sTemp.Compare(L"Dec") == 0)
nMonth = 12;
- int nDay = FX_atof(wsArray[2].AsWideStringC());
- int nHour = FX_atof(wsArray[3].AsWideStringC());
- int nMin = FX_atof(wsArray[4].AsWideStringC());
- int nSec = FX_atof(wsArray[5].AsWideStringC());
- int nYear = FX_atof(wsArray[7].AsWideStringC());
+ int nDay = FX_atof(wsArray[2].AsStringC());
+ int nHour = FX_atof(wsArray[3].AsStringC());
+ int nMin = FX_atof(wsArray[4].AsStringC());
+ int nSec = FX_atof(wsArray[5].AsStringC());
+ int nYear = FX_atof(wsArray[7].AsStringC());
double dRet = JS_MakeDate(JS_MakeDay(nYear, nMonth - 1, nDay),
JS_MakeTime(nHour, nMin, nSec, 0));
if (JS_PortIsNan(dRet))
@@ -1726,7 +1726,7 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
CFX_WideString trimmed = pFormField->GetValue();
trimmed.TrimRight();
trimmed.TrimLeft();
- dTemp = FX_atof(trimmed.AsWideStringC());
+ dTemp = FX_atof(trimmed.AsStringC());
} break;
case FIELDTYPE_PUSHBUTTON: {
dTemp = 0.0;
@@ -1740,7 +1740,7 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
CFX_WideString trimmed = pFormCtrl->GetExportValue();
trimmed.TrimRight();
trimmed.TrimLeft();
- dTemp = FX_atof(trimmed.AsWideStringC());
+ dTemp = FX_atof(trimmed.AsStringC());
break;
}
}
@@ -1751,7 +1751,7 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
CFX_WideString trimmed = pFormField->GetValue();
trimmed.TrimRight();
trimmed.TrimLeft();
- dTemp = FX_atof(trimmed.AsWideStringC());
+ dTemp = FX_atof(trimmed.AsStringC());
}
} break;
default:
diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp
index e836594378..f75aa53a54 100644
--- a/fpdfsdk/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp
@@ -260,7 +260,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
case PBS_SOLID: {
sLine << "q\n" << GetBorderWidth() << " w\n"
<< CPWL_Utils::GetColorAppStream(GetBorderColor(), FALSE)
- .AsByteStringC()
+ .AsStringC()
<< " 2 J 0 j\n";
for (int32_t i = 1; i < nCharArray; i++) {
@@ -277,7 +277,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
case PBS_DASH: {
sLine << "q\n" << GetBorderWidth() << " w\n"
<< CPWL_Utils::GetColorAppStream(GetBorderColor(), FALSE)
- .AsByteStringC()
+ .AsStringC()
<< " 2 J 0 j\n"
<< "[" << GetBorderDash().nDash << " " << GetBorderDash().nGap
<< "] " << GetBorderDash().nPhase << " d\n";
@@ -315,9 +315,8 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
CPWL_Utils::GetEditSelAppStream(m_pEdit, ptOffset, &wrTemp);
if (sEditSel.GetLength() > 0)
- sText << CPWL_Utils::GetColorAppStream(PWL_DEFAULT_SELBACKCOLOR)
- .AsByteStringC()
- << sEditSel.AsByteStringC();
+ sText << CPWL_Utils::GetColorAppStream(PWL_DEFAULT_SELBACKCOLOR).AsStringC()
+ << sEditSel.AsStringC();
wrTemp = CPWL_Utils::OverlapWordRange(wrVisible, wrSelBefore);
CFX_ByteString sEditBefore = CPWL_Utils::GetEditAppStream(
@@ -325,9 +324,8 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
m_pEdit->GetPasswordChar());
if (sEditBefore.GetLength() > 0)
- sText << "BT\n"
- << CPWL_Utils::GetColorAppStream(GetTextColor()).AsByteStringC()
- << sEditBefore.AsByteStringC() << "ET\n";
+ sText << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC()
+ << sEditBefore.AsStringC() << "ET\n";
wrTemp = CPWL_Utils::OverlapWordRange(wrVisible, wrSelect);
CFX_ByteString sEditMid = CPWL_Utils::GetEditAppStream(
@@ -337,8 +335,8 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
if (sEditMid.GetLength() > 0)
sText << "BT\n"
<< CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_GRAY, 1))
- .AsByteStringC()
- << sEditMid.AsByteStringC() << "ET\n";
+ .AsStringC()
+ << sEditMid.AsStringC() << "ET\n";
wrTemp = CPWL_Utils::OverlapWordRange(wrVisible, wrSelAfter);
CFX_ByteString sEditAfter = CPWL_Utils::GetEditAppStream(
@@ -346,9 +344,8 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
m_pEdit->GetPasswordChar());
if (sEditAfter.GetLength() > 0)
- sText << "BT\n"
- << CPWL_Utils::GetColorAppStream(GetTextColor()).AsByteStringC()
- << sEditAfter.AsByteStringC() << "ET\n";
+ sText << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC()
+ << sEditAfter.AsStringC() << "ET\n";
if (sText.GetLength() > 0) {
CFX_FloatRect rcClient = GetClientRect();
@@ -707,9 +704,8 @@ CFX_ByteString CPWL_Edit::GetTextAppearanceStream(
CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset);
if (sEdit.GetLength() > 0) {
- sRet << "BT\n"
- << CPWL_Utils::GetColorAppStream(GetTextColor()).AsByteStringC()
- << sEdit.AsByteStringC() << "ET\n";
+ sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC()
+ << sEdit.AsStringC() << "ET\n";
}
return sRet.GetByteString();
diff --git a/fpdfsdk/pdfwindow/PWL_Icon.cpp b/fpdfsdk/pdfwindow/PWL_Icon.cpp
index 69f9e599da..bae5dc8a56 100644
--- a/fpdfsdk/pdfwindow/PWL_Icon.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Icon.cpp
@@ -42,7 +42,7 @@ CFX_ByteString CPWL_Image::GetImageAppStream() {
sAppStream << mt.GetA() << " " << mt.GetB() << " " << mt.GetC() << " "
<< mt.GetD() << " " << mt.GetE() << " " << mt.GetF() << " cm\n";
- sAppStream << "0 g 0 G 1 w /" << sAlias.AsByteStringC() << " Do\n"
+ sAppStream << "0 g 0 G 1 w /" << sAlias.AsStringC() << " Do\n"
<< "Q\n";
}
diff --git a/fpdfsdk/pdfwindow/PWL_Label.cpp b/fpdfsdk/pdfwindow/PWL_Label.cpp
index 5560b59eb1..9a1dce61d8 100644
--- a/fpdfsdk/pdfwindow/PWL_Label.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Label.cpp
@@ -119,8 +119,7 @@ CFX_FloatRect CPWL_Label::GetContentRect() const {
void CPWL_Label::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
CPWL_Wnd::GetThisAppearanceStream(sAppStream);
- sAppStream << GetTextAppearanceStream(CFX_FloatPoint(0.0f, 0.0f))
- .AsByteStringC();
+ sAppStream << GetTextAppearanceStream(CFX_FloatPoint(0.0f, 0.0f)).AsStringC();
}
CFX_ByteString CPWL_Label::GetTextAppearanceStream(
@@ -129,9 +128,8 @@ CFX_ByteString CPWL_Label::GetTextAppearanceStream(
CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset);
if (sEdit.GetLength() > 0) {
- sRet << "BT\n"
- << CPWL_Utils::GetColorAppStream(GetTextColor()).AsByteStringC()
- << sEdit.AsByteStringC() << "ET\n";
+ sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC()
+ << sEdit.AsStringC() << "ET\n";
}
return sRet.GetByteString();
diff --git a/fpdfsdk/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/pdfwindow/PWL_ListBox.cpp
index ccccc77dcd..d32e7c937c 100644
--- a/fpdfsdk/pdfwindow/PWL_ListBox.cpp
+++ b/fpdfsdk/pdfwindow/PWL_ListBox.cpp
@@ -120,14 +120,14 @@ void CPWL_ListBox::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
if (m_pList->IsItemSelected(i)) {
sListItems << CPWL_Utils::GetRectFillAppStream(rcItem,
PWL_DEFAULT_SELBACKCOLOR)
- .AsByteStringC();
+ .AsStringC();
CFX_ByteString sItem =
CPWL_Utils::GetEditAppStream(m_pList->GetItemEdit(i), ptOffset);
if (sItem.GetLength() > 0) {
sListItems << "BT\n"
<< CPWL_Utils::GetColorAppStream(PWL_DEFAULT_SELTEXTCOLOR)
- .AsByteStringC()
- << sItem.AsByteStringC() << "ET\n";
+ .AsStringC()
+ << sItem.AsStringC() << "ET\n";
}
} else {
CFX_ByteString sItem =
@@ -135,8 +135,8 @@ void CPWL_ListBox::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
if (sItem.GetLength() > 0) {
sListItems << "BT\n"
<< CPWL_Utils::GetColorAppStream(GetTextColor())
- .AsByteStringC()
- << sItem.AsByteStringC() << "ET\n";
+ .AsStringC()
+ << sItem.AsStringC() << "ET\n";
}
}
}
diff --git a/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp b/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp
index 2dfa6cfe6a..385ff44f4a 100644
--- a/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp
+++ b/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp
@@ -671,7 +671,7 @@ void CPWL_ScrollBar::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
sButton << "q\n";
sButton << "0 w\n"
<< CPWL_Utils::GetColorAppStream(GetBackgroundColor(), TRUE)
- .AsByteStringC();
+ .AsStringC();
sButton << rectWnd.left << " " << rectWnd.bottom << " "
<< rectWnd.right - rectWnd.left << " "
<< rectWnd.top - rectWnd.bottom << " re b Q\n";
diff --git a/fpdfsdk/pdfwindow/PWL_Signature.cpp b/fpdfsdk/pdfwindow/PWL_Signature.cpp
index 6dd2ea1b30..c737998f26 100644
--- a/fpdfsdk/pdfwindow/PWL_Signature.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Signature.cpp
@@ -42,7 +42,7 @@ void CPWL_Signature_Image::DrawThisAppearance(CFX_RenderDevice* pDevice,
void CPWL_Signature_Image::GetThisAppearanceStream(
CFX_ByteTextBuf& sAppStream) {
- sAppStream << CPWL_Image::GetImageAppStream().AsByteStringC();
+ sAppStream << CPWL_Image::GetImageAppStream().AsStringC();
}
void CPWL_Signature_Image::GetScale(FX_FLOAT& fHScale, FX_FLOAT& fVScale) {