| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "xfa/fxfa/parser/xfa_script_nodehelper.h" | 7 #include "xfa/fxfa/parser/xfa_script_nodehelper.h" |
| 8 | 8 |
| 9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
| 10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" | 10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 if ((refNode->IsUnnamed() && refNode->IsContainerNode()) || | 301 if ((refNode->IsUnnamed() && refNode->IsContainerNode()) || |
| 302 eRefNode == XFA_ELEMENT_SubformSet || eRefNode == XFA_ELEMENT_Area || | 302 eRefNode == XFA_ELEMENT_SubformSet || eRefNode == XFA_ELEMENT_Area || |
| 303 eRefNode == XFA_ELEMENT_Proto) { | 303 eRefNode == XFA_ELEMENT_Proto) { |
| 304 return TRUE; | 304 return TRUE; |
| 305 } | 305 } |
| 306 return FALSE; | 306 return FALSE; |
| 307 } | 307 } |
| 308 FX_BOOL CXFA_NodeHelper::XFA_CreateNode_ForCondition( | 308 FX_BOOL CXFA_NodeHelper::XFA_CreateNode_ForCondition( |
| 309 CFX_WideString& wsCondition) { | 309 CFX_WideString& wsCondition) { |
| 310 int32_t iLen = wsCondition.GetLength(); | 310 int32_t iLen = wsCondition.GetLength(); |
| 311 CFX_WideString wsIndex = FX_WSTRC(L"0"); | 311 CFX_WideString wsIndex(L"0"); |
| 312 FX_BOOL bAll = FALSE; | 312 FX_BOOL bAll = FALSE; |
| 313 | |
| 314 if (iLen == 0) { | 313 if (iLen == 0) { |
| 315 m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeOne; | 314 m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeOne; |
| 316 return FALSE; | 315 return FALSE; |
| 317 } | 316 } |
| 318 if (wsCondition.GetAt(0) == '[') { | 317 if (wsCondition.GetAt(0) == '[') { |
| 319 int32_t i = 1; | 318 int32_t i = 1; |
| 320 for (; i < iLen; ++i) { | 319 for (; i < iLen; ++i) { |
| 321 FX_WCHAR ch = wsCondition[i]; | 320 FX_WCHAR ch = wsCondition[i]; |
| 322 if (ch == ' ') { | 321 if (ch == ' ') { |
| 323 continue; | 322 continue; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 m_eLastCreateType = XFA_ELEMENT_DataValue; | 418 m_eLastCreateType = XFA_ELEMENT_DataValue; |
| 420 } | 419 } |
| 421 } | 420 } |
| 422 FX_BOOL CXFA_NodeHelper::XFA_NodeIsProperty(CXFA_Node* refNode) { | 421 FX_BOOL CXFA_NodeHelper::XFA_NodeIsProperty(CXFA_Node* refNode) { |
| 423 CXFA_Node* parent = | 422 CXFA_Node* parent = |
| 424 XFA_ResolveNodes_GetParent(refNode, XFA_LOGIC_NoTransparent); | 423 XFA_ResolveNodes_GetParent(refNode, XFA_LOGIC_NoTransparent); |
| 425 return parent && refNode && | 424 return parent && refNode && |
| 426 XFA_GetPropertyOfElement(parent->GetClassID(), refNode->GetClassID(), | 425 XFA_GetPropertyOfElement(parent->GetClassID(), refNode->GetClassID(), |
| 427 XFA_XDPPACKET_UNKNOWN); | 426 XFA_XDPPACKET_UNKNOWN); |
| 428 } | 427 } |
| OLD | NEW |