summaryrefslogtreecommitdiff
path: root/fxjs/cjx_node.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-30 20:40:10 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-30 20:40:10 +0000
commit9a2267d2531f4e75a6bcafb48abacfefe8a4a555 (patch)
tree86e03d0180abbcc49d0d1ae5ce4fcb40aeaaeb33 /fxjs/cjx_node.h
parentb58bf90755050e1bb6c5d33c329cdaf6cdde36ae (diff)
downloadpdfium-9a2267d2531f4e75a6bcafb48abacfefe8a4a555.tar.xz
Move setting of XML content back to specific set methods
This removes the need for the casting as we know the type in the caller. Change-Id: I9fe30d9f8e6110356549c283980e2f4f37f43d02 Reviewed-on: https://pdfium-review.googlesource.com/19870 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxjs/cjx_node.h')
-rw-r--r--fxjs/cjx_node.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/fxjs/cjx_node.h b/fxjs/cjx_node.h
index 148f1a6378..a860db9155 100644
--- a/fxjs/cjx_node.h
+++ b/fxjs/cjx_node.h
@@ -29,6 +29,7 @@ enum XFA_SOM_MESSAGETYPE {
XFA_SOM_MandatoryMessage
};
+class CFX_XMLElement;
class CFXJSE_Arguments;
class CXFA_CalcData;
class CXFA_LayoutItem;
@@ -434,10 +435,12 @@ class CJX_Node : public CJX_Object {
void OnChanging(XFA_Attribute eAttr, bool bNotify);
void SendAttributeChangeMessage(XFA_Attribute eAttribute, bool bScriptModify);
- bool SetValue(XFA_Attribute eAttr,
- XFA_AttributeType eType,
- void* pValue,
- bool bNotify);
+ // Returns a pointer to the XML node that needs to be updated with the new
+ // attribute value. |nullptr| if no update is needed.
+ CFX_XMLElement* SetValue(XFA_Attribute eAttr,
+ XFA_AttributeType eType,
+ void* pValue,
+ bool bNotify);
bool TryUserData(void* pKey, void*& pData, bool bProtoAlso);