diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-23 21:17:43 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-23 21:17:43 +0000 |
commit | 414cc9c9676b01587010ec5475d495eef6e05ba3 (patch) | |
tree | c4474fdd1cd945a16eb70cb0cb24b074e2010f22 /fxjs/xfa/cjx_object.cpp | |
parent | 9b85f4ba6fdd86c488498003a2db5854d4ece036 (diff) | |
download | pdfium-414cc9c9676b01587010ec5475d495eef6e05ba3.tar.xz |
Remove GetWidgetAcc calls
This CL removes the calls to CXFA_Node::GetWidgetAcc() as they
redundantly return the node they were called upon.
Change-Id: I46e66cf98137a1dee7cd3fa8bc7d379eb97fded5
Reviewed-on: https://pdfium-review.googlesource.com/23630
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/xfa/cjx_object.cpp')
-rw-r--r-- | fxjs/xfa/cjx_object.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp index 0c57392ce3..46af66ae28 100644 --- a/fxjs/xfa/cjx_object.cpp +++ b/fxjs/xfa/cjx_object.cpp @@ -1158,8 +1158,8 @@ void CJX_Object::MoveBufferMapData(CXFA_Object* pDstModule) { WideString wsValue = ToNode(pDstModule)->JSObject()->GetContent(false); WideString wsFormatValue(wsValue); CXFA_Node* pNode = ToNode(pDstModule)->GetContainerNode(); - if (pNode && pNode->GetWidgetAcc()) - wsFormatValue = pNode->GetWidgetAcc()->GetFormatDataValue(wsValue); + if (pNode) + wsFormatValue = pNode->GetFormatDataValue(wsValue); ToNode(pDstModule) ->JSObject() @@ -1482,7 +1482,7 @@ void CJX_Object::Script_Field_Length(CFXJSE_Value* pValue, pValue->SetInteger(0); return; } - pValue->SetInteger(node->GetWidgetAcc()->CountChoiceListItems(true)); + pValue->SetInteger(node->CountChoiceListItems(true)); } void CJX_Object::Script_Som_DefaultValue(CFXJSE_Value* pValue, @@ -1523,9 +1523,9 @@ void CJX_Object::Script_Som_DefaultValue(CFXJSE_Value* pValue, continue; pContainerNode = pFormNode->GetContainerNode(); - if (pContainerNode && pContainerNode->GetWidgetAcc()) { - wsPicture = pContainerNode->GetWidgetAcc()->GetPictureContent( - XFA_VALUEPICTURE_DataBind); + if (pContainerNode) { + wsPicture = + pContainerNode->GetPictureContent(XFA_VALUEPICTURE_DataBind); } if (!wsPicture.IsEmpty()) break; @@ -1537,9 +1537,8 @@ void CJX_Object::Script_Som_DefaultValue(CFXJSE_Value* pValue, pContainerNode = ToNode(GetXFAObject())->GetContainerNode(); } - if (pContainerNode && pContainerNode->GetWidgetAcc()) - wsFormatValue = - pContainerNode->GetWidgetAcc()->GetFormatDataValue(wsNewValue); + if (pContainerNode) + wsFormatValue = pContainerNode->GetFormatDataValue(wsNewValue); SetContent(wsNewValue, wsFormatValue, true, true, true); return; |