summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_object.h
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/xfa_object.h')
-rw-r--r--xfa/fxfa/parser/xfa_object.h54
1 files changed, 26 insertions, 28 deletions
diff --git a/xfa/fxfa/parser/xfa_object.h b/xfa/fxfa/parser/xfa_object.h
index 4361eb7f4a..e796b96326 100644
--- a/xfa/fxfa/parser/xfa_object.h
+++ b/xfa/fxfa/parser/xfa_object.h
@@ -48,22 +48,22 @@ class CXFA_Object {
return (XFA_OBJECTTYPE)(m_uFlags & XFA_OBJECTTYPEMASK);
}
- FX_BOOL IsNode() const {
+ bool IsNode() const {
return (m_uFlags & XFA_OBJECTTYPEMASK) >= XFA_OBJECTTYPE_Node;
}
- FX_BOOL IsOrdinaryObject() const {
+ bool IsOrdinaryObject() const {
return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_OrdinaryObject;
}
- FX_BOOL IsNodeList() const {
+ bool IsNodeList() const {
return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_NodeList;
}
- FX_BOOL IsOrdinaryList() const {
+ bool IsOrdinaryList() const {
return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_OrdinaryList;
}
- FX_BOOL IsContentNode() const {
+ bool IsContentNode() const {
return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_ContentNode;
}
- FX_BOOL IsContainerNode() const {
+ bool IsContainerNode() const {
return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_ContainerNode;
}
@@ -134,9 +134,11 @@ class CXFA_Node : public CXFA_Object {
XFA_ELEMENT GetClassID() const { return (XFA_ELEMENT)m_eNodeClass; }
uint32_t GetPacketID() const { return m_ePacket; }
FX_BOOL HasFlag(uint32_t dwFlag) const;
- void SetFlag(uint32_t dwFlag, FX_BOOL bOn = TRUE, FX_BOOL bNotify = TRUE);
+ void SetFlag(uint32_t dwFlag, bool bNotify);
+ void ClearFlag(uint32_t dwFlag);
+
FX_BOOL IsAttributeInXML();
- FX_BOOL IsFormContainer() {
+ bool IsFormContainer() const {
return m_ePacket == XFA_XDPPACKET_Form && IsContainerNode();
}
void SetXMLMappingNode(CFDE_XMLNode* pXMLNode) { m_pXMLNode = pXMLNode; }
@@ -150,20 +152,20 @@ class CXFA_Node : public CXFA_Object {
FX_BOOL HasAttribute(XFA_ATTRIBUTE eAttr, FX_BOOL bCanInherit = FALSE);
FX_BOOL SetAttribute(XFA_ATTRIBUTE eAttr,
const CFX_WideStringC& wsValue,
- FX_BOOL bNotify = FALSE);
+ bool bNotify = false);
FX_BOOL GetAttribute(XFA_ATTRIBUTE eAttr,
CFX_WideString& wsValue,
FX_BOOL bUseDefault = TRUE);
FX_BOOL SetAttribute(const CFX_WideStringC& wsAttr,
const CFX_WideStringC& wsValue,
- FX_BOOL bNotify = FALSE);
+ bool bNotify = false);
FX_BOOL GetAttribute(const CFX_WideStringC& wsAttr,
CFX_WideString& wsValue,
FX_BOOL bUseDefault = TRUE);
FX_BOOL RemoveAttribute(const CFX_WideStringC& wsAttr);
FX_BOOL SetContent(const CFX_WideString& wsContent,
const CFX_WideString& wsXMLValue,
- FX_BOOL bNotify = FALSE,
+ bool bNotify = false,
FX_BOOL bScriptModify = FALSE,
FX_BOOL bSyncData = TRUE);
FX_BOOL TryContent(CFX_WideString& wsContent,
@@ -175,7 +177,7 @@ class CXFA_Node : public CXFA_Object {
FX_BOOL SetBoolean(XFA_ATTRIBUTE eAttr,
FX_BOOL bValue,
- FX_BOOL bNotify = FALSE) {
+ bool bNotify = false) {
return SetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, (void*)(uintptr_t)bValue,
bNotify);
}
@@ -188,7 +190,7 @@ class CXFA_Node : public CXFA_Object {
}
FX_BOOL SetInteger(XFA_ATTRIBUTE eAttr,
int32_t iValue,
- FX_BOOL bNotify = FALSE) {
+ bool bNotify = false) {
return SetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, (void*)(uintptr_t)iValue,
bNotify);
}
@@ -201,7 +203,7 @@ class CXFA_Node : public CXFA_Object {
}
FX_BOOL SetEnum(XFA_ATTRIBUTE eAttr,
XFA_ATTRIBUTEENUM eValue,
- FX_BOOL bNotify = FALSE) {
+ bool bNotify = false) {
return SetValue(eAttr, XFA_ATTRIBUTETYPE_Enum, (void*)(uintptr_t)eValue,
bNotify);
}
@@ -214,11 +216,11 @@ class CXFA_Node : public CXFA_Object {
}
FX_BOOL SetCData(XFA_ATTRIBUTE eAttr,
const CFX_WideString& wsValue,
- FX_BOOL bNotify = FALSE,
+ bool bNotify = false,
FX_BOOL bScriptModify = FALSE);
FX_BOOL SetAttributeValue(const CFX_WideString& wsValue,
const CFX_WideString& wsXMLValue,
- FX_BOOL bNotify = FALSE,
+ bool bNotify = false,
FX_BOOL bScriptModify = FALSE);
FX_BOOL TryCData(XFA_ATTRIBUTE eAttr,
CFX_WideString& wsValue,
@@ -234,7 +236,7 @@ class CXFA_Node : public CXFA_Object {
}
FX_BOOL SetMeasure(XFA_ATTRIBUTE eAttr,
CXFA_Measurement mValue,
- FX_BOOL bNotify = FALSE);
+ bool bNotify = false);
FX_BOOL TryMeasure(XFA_ATTRIBUTE eAttr,
CXFA_Measurement& mValue,
FX_BOOL bUseDefault = TRUE) const;
@@ -264,7 +266,7 @@ class CXFA_Node : public CXFA_Object {
FX_BOOL bOnlyChild = FALSE);
int32_t InsertChild(int32_t index, CXFA_Node* pNode);
FX_BOOL InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode = NULL);
- FX_BOOL RemoveChild(CXFA_Node* pNode, FX_BOOL bNotify = TRUE);
+ FX_BOOL RemoveChild(CXFA_Node* pNode, bool bNotify = true);
CXFA_Node* Clone(FX_BOOL bRecursive);
CXFA_Node* GetNodeItem(XFA_NODEITEM eItem) const;
CXFA_Node* GetNodeItem(XFA_NODEITEM eItem, XFA_OBJECTTYPE eType) const;
@@ -376,8 +378,7 @@ class CXFA_Node : public CXFA_Object {
void Script_Delta_Target(FXJSE_HVALUE hValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Attribute_SendAttributeChangeMessage(void* eAttribute,
- void* eValue,
+ void Script_Attribute_SendAttributeChangeMessage(XFA_ATTRIBUTE eAttribute,
FX_BOOL bScriptModify);
void Script_Attribute_Integer(FXJSE_HVALUE hValue,
FX_BOOL bSetting,
@@ -593,22 +594,19 @@ class CXFA_Node : public CXFA_Object {
FX_BOOL SetValue(XFA_ATTRIBUTE eAttr,
XFA_ATTRIBUTETYPE eType,
void* pValue,
- FX_BOOL bNotify);
+ bool bNotify);
FX_BOOL GetValue(XFA_ATTRIBUTE eAttr,
XFA_ATTRIBUTETYPE eType,
FX_BOOL bUseDefault,
void*& pValue);
- void OnRemoved(CXFA_Node* pParent, CXFA_Node* pRemoved, FX_BOOL bNotify);
- void OnChanging(XFA_ATTRIBUTE eAttr, void* pNewValue, FX_BOOL bNotify);
- void OnChanged(XFA_ATTRIBUTE eAttr,
- void* pNewValue,
- FX_BOOL bNotify,
- FX_BOOL bScriptModify = FALSE);
+ void OnRemoved(bool bNotify);
+ void OnChanging(XFA_ATTRIBUTE eAttr, bool bNotify);
+ void OnChanged(XFA_ATTRIBUTE eAttr, bool bNotify, FX_BOOL bScriptModify);
int32_t execSingleEventByName(const CFX_WideStringC& wsEventName,
XFA_ELEMENT eElementType);
FX_BOOL SetScriptContent(const CFX_WideString& wsContent,
const CFX_WideString& wsXMLValue,
- FX_BOOL bNotify = TRUE,
+ bool bNotify = true,
FX_BOOL bScriptModify = FALSE,
FX_BOOL bSyncData = TRUE);
CFX_WideString GetScriptContent(FX_BOOL bScriptModify = FALSE);