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

Unified Diff: xfa/fxfa/app/xfa_ffwidgetacc.cpp

Issue 1857073002: Make down-conversion explicit from CFX_Widetring to CFX_WideStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: String argument type 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/app/xfa_ffwidget.cpp ('k') | xfa/fxfa/app/xfa_fontmgr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_ffwidgetacc.cpp
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index 271f9261f0faa706560f765b521f35ca5ddf21aa..fb2b0c3ffd596957b289a079d16e4e5875fd7c1c 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -229,7 +229,8 @@ void CXFA_WidgetAcc::ResetData() {
image.GetContentType(wsContentType);
image.GetHref(wsHref);
}
- SetImageEdit(wsContentType, wsHref, wsValue);
+ SetImageEdit(wsContentType.AsWideStringC(), wsHref.AsWideStringC(),
+ wsValue.AsWideStringC());
} break;
case XFA_ELEMENT_ExclGroup: {
CXFA_Node* pNextChild = m_pNode->GetNodeItem(
@@ -411,11 +412,13 @@ void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_Validate validate,
GetValidateMessage(pAppProvider, wsScriptMsg, FALSE, bVersionFlag);
}
if (bVersionFlag) {
- pAppProvider->MsgBox(wsScriptMsg, wsTitle, XFA_MBICON_Warning,
+ pAppProvider->MsgBox(wsScriptMsg.AsWideStringC(),
+ wsTitle.AsWideStringC(), XFA_MBICON_Warning,
XFA_MB_OK);
return;
}
- if (pAppProvider->MsgBox(wsScriptMsg, wsTitle, XFA_MBICON_Warning,
+ if (pAppProvider->MsgBox(wsScriptMsg.AsWideStringC(),
+ wsTitle.AsWideStringC(), XFA_MBICON_Warning,
XFA_MB_YesNo) == XFA_IDYes) {
GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE);
}
@@ -423,7 +426,9 @@ void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_Validate validate,
if (wsScriptMsg.IsEmpty()) {
GetValidateMessage(pAppProvider, wsScriptMsg, TRUE, bVersionFlag);
}
- pAppProvider->MsgBox(wsScriptMsg, wsTitle, XFA_MBICON_Error, XFA_MB_OK);
+ pAppProvider->MsgBox(wsScriptMsg.AsWideStringC(),
+ wsTitle.AsWideStringC(), XFA_MBICON_Error,
+ XFA_MB_OK);
}
}
}
@@ -456,7 +461,9 @@ int32_t CXFA_WidgetAcc::ProcessFormatTestValidate(CXFA_Validate validate,
if (wsFormatMsg.IsEmpty()) {
GetValidateMessage(pAppProvider, wsFormatMsg, TRUE, bVersionFlag);
}
- pAppProvider->MsgBox(wsFormatMsg, wsTitle, XFA_MBICON_Error, XFA_MB_OK);
+ pAppProvider->MsgBox(wsFormatMsg.AsWideStringC(),
+ wsTitle.AsWideStringC(), XFA_MBICON_Error,
+ XFA_MB_OK);
return XFA_EVENTERROR_Success;
}
if (GetNode()->HasFlag(XFA_NODEFLAG_UserInteractive)) {
@@ -466,11 +473,13 @@ int32_t CXFA_WidgetAcc::ProcessFormatTestValidate(CXFA_Validate validate,
GetValidateMessage(pAppProvider, wsFormatMsg, FALSE, bVersionFlag);
}
if (bVersionFlag) {
- pAppProvider->MsgBox(wsFormatMsg, wsTitle, XFA_MBICON_Warning,
+ pAppProvider->MsgBox(wsFormatMsg.AsWideStringC(),
+ wsTitle.AsWideStringC(), XFA_MBICON_Warning,
XFA_MB_OK);
return XFA_EVENTERROR_Success;
}
- if (pAppProvider->MsgBox(wsFormatMsg, wsTitle, XFA_MBICON_Warning,
+ if (pAppProvider->MsgBox(wsFormatMsg.AsWideStringC(),
+ wsTitle.AsWideStringC(), XFA_MBICON_Warning,
XFA_MB_YesNo) == XFA_IDYes) {
GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE);
}
@@ -526,7 +535,8 @@ int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate,
pAppProvider->LoadString(XFA_IDS_ValidateNullError, wsError);
wsNullMsg.Format(wsError, (const FX_WCHAR*)wsCaptionName);
}
- pAppProvider->MsgBox(wsNullMsg, wsTitle, XFA_MBICON_Status, XFA_MB_OK);
+ pAppProvider->MsgBox(wsNullMsg.AsWideStringC(), wsTitle.AsWideStringC(),
+ XFA_MBICON_Status, XFA_MB_OK);
return XFA_EVENTERROR_Error;
}
case XFA_ATTRIBUTEENUM_Warning: {
@@ -540,7 +550,8 @@ int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate,
wsNullMsg.Format(wsWarning, (const FX_WCHAR*)wsCaptionName,
(const FX_WCHAR*)wsCaptionName);
}
- if (pAppProvider->MsgBox(wsNullMsg, wsTitle, XFA_MBICON_Warning,
+ if (pAppProvider->MsgBox(wsNullMsg.AsWideStringC(),
+ wsTitle.AsWideStringC(), XFA_MBICON_Warning,
XFA_MB_YesNo) == XFA_IDYes) {
GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE);
}
@@ -671,8 +682,9 @@ int32_t CXFA_WidgetAcc::ExecuteScript(CXFA_Script script,
}
FXJSE_HVALUE hRetValue = FXJSE_Value_Create(pContext->GetRuntime());
++m_nRecursionDepth;
- FX_BOOL bRet = pContext->RunScript((XFA_SCRIPTLANGTYPE)eScriptType,
- wsExpression, hRetValue, m_pNode);
+ FX_BOOL bRet =
+ pContext->RunScript((XFA_SCRIPTLANGTYPE)eScriptType,
+ wsExpression.AsWideStringC(), hRetValue, m_pNode);
--m_nRecursionDepth;
int32_t iRet = XFA_EVENTERROR_Error;
if (bRet) {
@@ -1700,11 +1712,12 @@ FX_BOOL CXFA_TextProvider::GetEmbbedObj(FX_BOOL bURI,
CXFA_Node* pIDNode = NULL;
CXFA_WidgetAcc* pEmbAcc = NULL;
if (pParent) {
- pIDNode = pDocument->GetNodeByID(pParent, wsAttr);
+ pIDNode = pDocument->GetNodeByID(pParent, wsAttr.AsWideStringC());
}
if (!pIDNode) {
pIDNode = pDocument->GetNodeByID(
- ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Form)), wsAttr);
+ ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Form)),
+ wsAttr.AsWideStringC());
}
if (pIDNode) {
pEmbAcc = (CXFA_WidgetAcc*)pIDNode->GetWidgetData();
« no previous file with comments | « xfa/fxfa/app/xfa_ffwidget.cpp ('k') | xfa/fxfa/app/xfa_fontmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698