Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp

Issue 1861183002: Make CFX_WideString::FromUTF8() take a CFX_ByteStringC argument. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, combine delcs with initialization. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp ('k') | xfa/fxfa/parser/xfa_script_imp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
diff --git a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
index c71384e1307f10beb97f7ac954cbe6d1faa4c169..48edc73777411f6aa33bb7ceba9b7d07ea4a5b62 100644
--- a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
@@ -165,7 +165,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Title(
FXJSE_Value_ToUTF8String(hValue, bsValue);
pNotify->GetDocProvider()->SetTitle(
hDoc,
- CFX_WideString::FromUTF8(bsValue, bsValue.GetLength()).AsWideStringC());
+ CFX_WideString::FromUTF8(bsValue.AsByteStringC()).AsWideStringC());
return;
}
CFX_WideString wsTitle;
@@ -291,7 +291,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_GotoURL(
CFX_WideString wsURL;
if (iLength >= 1) {
CFX_ByteString bsURL = pArguments->GetUTF8String(0);
- wsURL = CFX_WideString::FromUTF8(bsURL, bsURL.GetLength());
+ wsURL = CFX_WideString::FromUTF8(bsURL.AsByteStringC());
}
pNotify->GetDocProvider()->GotoURL(hDoc, wsURL.AsWideStringC());
}
@@ -318,7 +318,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList(
CFX_ByteString bsString;
FXJSE_Value_ToUTF8String(hValue, bsString);
CFX_WideString wsExpression =
- CFX_WideString::FromUTF8(bsString, bsString.GetLength());
+ CFX_WideString::FromUTF8(bsString.AsByteStringC());
CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
if (!pScriptContext) {
FXJSE_Value_Release(hValue);
@@ -371,16 +371,15 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Response(
FX_BOOL bMark = FALSE;
if (iLength >= 1) {
CFX_ByteString bsQuestion = pArguments->GetUTF8String(0);
- wsQuestion = CFX_WideString::FromUTF8(bsQuestion, bsQuestion.GetLength());
+ wsQuestion = CFX_WideString::FromUTF8(bsQuestion.AsByteStringC());
}
if (iLength >= 2) {
CFX_ByteString bsTitle = pArguments->GetUTF8String(1);
- wsTitle = CFX_WideString::FromUTF8(bsTitle, bsTitle.GetLength());
+ wsTitle = CFX_WideString::FromUTF8(bsTitle.AsByteStringC());
}
if (iLength >= 3) {
CFX_ByteString bsDefaultAnswer = pArguments->GetUTF8String(2);
- wsDefaultAnswer =
- CFX_WideString::FromUTF8(bsDefaultAnswer, bsDefaultAnswer.GetLength());
+ wsDefaultAnswer = CFX_WideString::FromUTF8(bsDefaultAnswer.AsByteStringC());
}
if (iLength >= 4) {
bMark = pArguments->GetInt32(3) == 0 ? FALSE : TRUE;
@@ -444,8 +443,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ResetData(
CFX_WideString wsExpression;
if (iLength >= 1) {
CFX_ByteString bsExpression = pArguments->GetUTF8String(0);
- wsExpression =
- CFX_WideString::FromUTF8(bsExpression, bsExpression.GetLength());
+ wsExpression = CFX_WideString::FromUTF8(bsExpression.AsByteStringC());
}
if (wsExpression.IsEmpty()) {
pNotify->ResetData();
@@ -523,7 +521,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_SetFocus(
CFX_ByteString bsString;
FXJSE_Value_ToUTF8String(hValue, bsString);
CFX_WideString wsExpression =
- CFX_WideString::FromUTF8(bsString, bsString.GetLength());
+ CFX_WideString::FromUTF8(bsString.AsByteStringC());
CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
if (!pScriptContext) {
FXJSE_Value_Release(hValue);
@@ -633,7 +631,7 @@ FX_BOOL CScript_HostPseudoModel::Script_HostPseudoModel_ValidateArgsForMsg(
} else {
CFX_ByteString byMessage;
FXJSE_Value_ToUTF8String(hValueArg, byMessage);
- wsValue = CFX_WideString::FromUTF8(byMessage, byMessage.GetLength());
+ wsValue = CFX_WideString::FromUTF8(byMessage.AsByteStringC());
}
FXJSE_Value_Release(hValueArg);
return TRUE;
@@ -733,7 +731,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ImportData(
CFX_WideString wsFilePath;
if (iLength > 0) {
CFX_ByteString bsFilePath = pArguments->GetUTF8String(0);
- wsFilePath = CFX_WideString::FromUTF8(bsFilePath, bsFilePath.GetLength());
+ wsFilePath = CFX_WideString::FromUTF8(bsFilePath.AsByteStringC());
}
CXFA_FFDoc* hDoc = pNotify->GetHDOC();
pNotify->GetDocProvider()->ImportData(hDoc, wsFilePath.AsWideStringC());
@@ -754,7 +752,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ExportData(
FX_BOOL bXDP = TRUE;
if (iLength >= 1) {
CFX_ByteString bsFilePath = pArguments->GetUTF8String(0);
- wsFilePath = CFX_WideString::FromUTF8(bsFilePath, bsFilePath.GetLength());
+ wsFilePath = CFX_WideString::FromUTF8(bsFilePath.AsByteStringC());
}
if (iLength >= 2) {
bXDP = pArguments->GetInt32(1) == 0 ? FALSE : TRUE;
« no previous file with comments | « xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp ('k') | xfa/fxfa/parser/xfa_script_imp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698