diff options
author | tsepez <tsepez@chromium.org> | 2016-04-05 12:22:15 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-05 12:22:15 -0700 |
commit | fc58ad18b7ab32e7b0bb3959b07dbe7538a7cebd (patch) | |
tree | 8662b886d373b149fbdd6f5db9570c233cb23ce7 /xfa/fxfa/parser/xfa_script_resolveprocessor.cpp | |
parent | c7a7349cf316af37d4ad4b71c5742159deccbf33 (diff) | |
download | pdfium-fc58ad18b7ab32e7b0bb3959b07dbe7538a7cebd.tar.xz |
Make down-conversion explicit from CFX_Widetring to CFX_WideStringC.
Companion to https://codereview.chromium.org/1853233002
BUG=
Review URL: https://codereview.chromium.org/1857073002
Diffstat (limited to 'xfa/fxfa/parser/xfa_script_resolveprocessor.cpp')
-rw-r--r-- | xfa/fxfa/parser/xfa_script_resolveprocessor.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp index a71270a332..8ad8b13176 100644 --- a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp +++ b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp @@ -35,7 +35,8 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData& rnd) { } if (!rnd.m_CurNode->IsNode()) { if (rnd.m_dwStyles & XFA_RESOLVENODE_Attributes) { - return XFA_ResolveNodes_ForAttributeRs(rnd.m_CurNode, rnd, rnd.m_wsName); + return XFA_ResolveNodes_ForAttributeRs(rnd.m_CurNode, rnd, + rnd.m_wsName.AsWideStringC()); } return 0; } @@ -70,7 +71,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData& rnd) { rnd.m_Nodes.Add(rnd.m_CurNode); } else if ((rnd.m_dwStyles & XFA_RESOLVENODE_Attributes) && XFA_ResolveNodes_ForAttributeRs(rnd.m_CurNode, rnd, - rnd.m_wsName)) { + rnd.m_wsName.AsWideStringC())) { return 1; } if (rnd.m_Nodes.GetSize() > 0) { @@ -168,7 +169,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_NumberSign( CFX_WideString wsName = rnd.m_wsName.Right(rnd.m_wsName.GetLength() - 1); CFX_WideString wsCondition = rnd.m_wsCondition; CXFA_Node* curNode = ToNode(rnd.m_CurNode); - if (XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName)) { + if (XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName.AsWideStringC())) { return 1; } CXFA_ResolveNodesData rndFind; @@ -331,7 +332,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal( } } if (dwStyles & XFA_RESOLVENODE_Attributes) { - if (XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName)) { + if (XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName.AsWideStringC())) { return 1; } } @@ -365,7 +366,8 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal( pProp = pInstanceManager->GetProperty(0, XFA_ELEMENT_Occur, TRUE); } } else { - const XFA_ELEMENTINFO* pElement = XFA_GetElementByName(wsName); + const XFA_ELEMENTINFO* pElement = + XFA_GetElementByName(wsName.AsWideStringC()); if (pElement) { pProp = curNode->AsNode()->GetProperty( 0, pElement->eName, pElement->eName != XFA_ELEMENT_PageSet); @@ -711,7 +713,8 @@ void CXFA_ResolveProcessor::XFA_ResolveNode_DoPredicateFilter( CXFA_Object* node = findNodes[i]; FX_BOOL bRet = FALSE; FXJSE_HVALUE pRetValue = FXJSE_Value_Create(rnd.m_pSC->GetRuntime()); - bRet = pContext->RunScript(eLangType, wsExpression, pRetValue, node); + bRet = pContext->RunScript(eLangType, wsExpression.AsWideStringC(), + pRetValue, node); if (!bRet || !FXJSE_Value_ToBoolean(pRetValue)) { findNodes.RemoveAt(i); } |