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

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

Issue 1891673003: Pass CFX_WideString to CXFA_FFDocView::GetWidgetByName. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits 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 | « fpdfsdk/fsdk_baseform.cpp ('k') | xfa/fxfa/app/xfa_ffpageview.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_ffdocview.cpp
diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp
index daa5fd6277c49dc6c80ac213f87e2a300d57206c..4f818e0dd7cb03149a86245169fbbf5114f12213 100644
--- a/xfa/fxfa/app/xfa_ffdocview.cpp
+++ b/xfa/fxfa/app/xfa_ffdocview.cpp
@@ -491,25 +491,25 @@ int32_t CXFA_FFDocView::ExecEventActivityByDeepFirst(CXFA_Node* pFormNode,
iRet |= XFA_ProcessEvent(this, pWidgetAcc, &eParam);
return iRet;
}
-CXFA_FFWidget* CXFA_FFDocView::GetWidgetByName(const CFX_WideStringC& wsName,
+
+CXFA_FFWidget* CXFA_FFDocView::GetWidgetByName(const CFX_WideString& wsName,
CXFA_FFWidget* pRefWidget) {
- CXFA_WidgetAcc* pRefAcc = pRefWidget ? pRefWidget->GetDataAcc() : NULL;
- if (CXFA_WidgetAcc* pAcc = GetWidgetAccByName(wsName, pRefAcc)) {
- return pAcc->GetNextWidget(NULL);
- }
- return NULL;
+ CXFA_WidgetAcc* pRefAcc = pRefWidget ? pRefWidget->GetDataAcc() : nullptr;
+ CXFA_WidgetAcc* pAcc = GetWidgetAccByName(wsName, pRefAcc);
+ return pAcc ? pAcc->GetNextWidget(nullptr) : nullptr;
}
+
CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(
- const CFX_WideStringC& wsName,
+ const CFX_WideString& wsName,
CXFA_WidgetAcc* pRefWidgetAcc) {
CFX_WideString wsExpression;
uint32_t dwStyle = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties |
XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent;
CXFA_ScriptContext* pScriptContext = m_pDoc->GetXFADoc()->GetScriptContext();
if (!pScriptContext) {
- return NULL;
+ return nullptr;
}
- CXFA_Node* refNode = NULL;
+ CXFA_Node* refNode = nullptr;
if (pRefWidgetAcc) {
refNode = pRefWidgetAcc->GetNode();
wsExpression = wsName;
@@ -520,7 +520,7 @@ CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(
int32_t iRet = pScriptContext->ResolveObjects(
refNode, wsExpression.AsStringC(), resoveNodeRS, dwStyle);
if (iRet < 1) {
- return NULL;
+ return nullptr;
}
if (resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) {
CXFA_Node* pNode = resoveNodeRS.nodes[0]->AsNode();
@@ -528,7 +528,7 @@ CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(
return (CXFA_WidgetAcc*)pNode->GetWidgetData();
}
}
- return NULL;
+ return nullptr;
}
void CXFA_FFDocView::OnPageEvent(CXFA_ContainerLayoutItem* pSender,
« no previous file with comments | « fpdfsdk/fsdk_baseform.cpp ('k') | xfa/fxfa/app/xfa_ffpageview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698