diff options
Diffstat (limited to 'xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp')
-rw-r--r-- | xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp b/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp index 243dae8c2d..1759de01c0 100644 --- a/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp +++ b/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp @@ -265,7 +265,7 @@ void CXFA_NodeHelper::XFA_GetNameExpression(CXFA_Node* refNode, CFX_WideString wsParent; CXFA_Node* parent = XFA_ResolveNodes_GetParent(refNode, XFA_LOGIC_NoTransparent); - while (parent != NULL) { + while (parent) { XFA_GetNameExpression(parent, wsParent, FALSE, eLogicType); wsParent += L"."; wsParent += wsName; @@ -273,24 +273,25 @@ void CXFA_NodeHelper::XFA_GetNameExpression(CXFA_Node* refNode, parent = XFA_ResolveNodes_GetParent(parent, XFA_LOGIC_NoTransparent); } return; - } else { - CFX_WideStringC wsTagName; - CFX_WideString ws; - FX_BOOL bIsProperty = XFA_NodeIsProperty(refNode); - if (refNode->IsUnnamed() || - (bIsProperty && refNode->GetClassID() != XFA_ELEMENT_PageSet)) { - refNode->GetClassName(wsTagName); - ws = wsTagName; - wsName.Format(L"#%s[%d]", (const FX_WCHAR*)ws, - XFA_GetIndex(refNode, eLogicType, bIsProperty, TRUE)); - return; - } - ws = refNode->GetCData(XFA_ATTRIBUTE_Name); - ws.Replace(L".", L"\\."); - wsName.Format(L"%s[%d]", (const FX_WCHAR*)ws, - XFA_GetIndex(refNode, eLogicType, bIsProperty, FALSE)); } + + CFX_WideStringC wsTagName; + CFX_WideString ws; + FX_BOOL bIsProperty = XFA_NodeIsProperty(refNode); + if (refNode->IsUnnamed() || + (bIsProperty && refNode->GetClassID() != XFA_ELEMENT_PageSet)) { + refNode->GetClassName(wsTagName); + ws = wsTagName; + wsName.Format(L"#%s[%d]", (const FX_WCHAR*)ws, + XFA_GetIndex(refNode, eLogicType, bIsProperty, TRUE)); + return; + } + ws = refNode->GetCData(XFA_ATTRIBUTE_Name); + ws.Replace(L".", L"\\."); + wsName.Format(L"%s[%d]", (const FX_WCHAR*)ws, + XFA_GetIndex(refNode, eLogicType, bIsProperty, FALSE)); } + FX_BOOL CXFA_NodeHelper::XFA_NodeIsTransparent(CXFA_Node* refNode) { if (refNode == NULL) { return FALSE; |