diff options
Diffstat (limited to 'xfa/src/fxfa/src/common')
-rw-r--r-- | xfa/src/fxfa/src/common/fxfa_localevalue.h | 157 | ||||
-rw-r--r-- | xfa/src/fxfa/src/common/xfa_docdata.h | 34 | ||||
-rw-r--r-- | xfa/src/fxfa/src/common/xfa_doclayout.h | 168 | ||||
-rw-r--r-- | xfa/src/fxfa/src/common/xfa_document.h | 289 | ||||
-rw-r--r-- | xfa/src/fxfa/src/common/xfa_fm2jsapi.h | 27 | ||||
-rw-r--r-- | xfa/src/fxfa/src/common/xfa_localemgr.h | 103 | ||||
-rw-r--r-- | xfa/src/fxfa/src/common/xfa_object.h | 1241 | ||||
-rw-r--r-- | xfa/src/fxfa/src/common/xfa_parser.h | 54 | ||||
-rw-r--r-- | xfa/src/fxfa/src/common/xfa_script.h | 170 | ||||
-rw-r--r-- | xfa/src/fxfa/src/common/xfa_utils.h | 386 |
10 files changed, 1403 insertions, 1226 deletions
diff --git a/xfa/src/fxfa/src/common/fxfa_localevalue.h b/xfa/src/fxfa/src/common/fxfa_localevalue.h index c9cec57336..381469b3a7 100644 --- a/xfa/src/fxfa/src/common/fxfa_localevalue.h +++ b/xfa/src/fxfa/src/common/fxfa_localevalue.h @@ -9,73 +9,98 @@ class IFX_Locale;
class CFX_Unitime;
class CXFA_LocaleMgr;
-#define XFA_VT_NULL 0
-#define XFA_VT_BOOLEAN 1
-#define XFA_VT_INTEGER 2
-#define XFA_VT_DECIMAL 4
-#define XFA_VT_FLOAT 8
-#define XFA_VT_TEXT 16
-#define XFA_VT_DATE 32
-#define XFA_VT_TIME 64
-#define XFA_VT_DATETIME 128
-class CXFA_LocaleValue
-{
-public:
- CXFA_LocaleValue();
- CXFA_LocaleValue(const CXFA_LocaleValue& value);
- CXFA_LocaleValue(FX_DWORD dwType, CXFA_LocaleMgr* pLocaleMgr);
- CXFA_LocaleValue(FX_DWORD dwType, const CFX_WideString& wsValue, CXFA_LocaleMgr* pLocaleMgr);
- CXFA_LocaleValue(FX_DWORD dwType, const CFX_WideString& wsValue,
- const CFX_WideString& wsFormat, IFX_Locale* pLocale, CXFA_LocaleMgr* pLocaleMgr);
- ~CXFA_LocaleValue();
- CXFA_LocaleValue& operator = (const CXFA_LocaleValue& value);
+#define XFA_VT_NULL 0
+#define XFA_VT_BOOLEAN 1
+#define XFA_VT_INTEGER 2
+#define XFA_VT_DECIMAL 4
+#define XFA_VT_FLOAT 8
+#define XFA_VT_TEXT 16
+#define XFA_VT_DATE 32
+#define XFA_VT_TIME 64
+#define XFA_VT_DATETIME 128
+class CXFA_LocaleValue {
+ public:
+ CXFA_LocaleValue();
+ CXFA_LocaleValue(const CXFA_LocaleValue& value);
+ CXFA_LocaleValue(FX_DWORD dwType, CXFA_LocaleMgr* pLocaleMgr);
+ CXFA_LocaleValue(FX_DWORD dwType,
+ const CFX_WideString& wsValue,
+ CXFA_LocaleMgr* pLocaleMgr);
+ CXFA_LocaleValue(FX_DWORD dwType,
+ const CFX_WideString& wsValue,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale,
+ CXFA_LocaleMgr* pLocaleMgr);
+ ~CXFA_LocaleValue();
+ CXFA_LocaleValue& operator=(const CXFA_LocaleValue& value);
- FX_BOOL ValidateValue(const CFX_WideString& wsValue, const CFX_WideString& wsPattern, IFX_Locale* pLocale, CFX_WideString* pMatchFormat = NULL);
- FX_BOOL FormatPatterns(CFX_WideString& wsResult, const CFX_WideString& wsFormat, IFX_Locale* pLocale, XFA_VALUEPICTURE eValueType) const;
- FX_BOOL FormatSinglePattern(CFX_WideString& wsResult, const CFX_WideString& wsFormat, IFX_Locale* pLocale, XFA_VALUEPICTURE eValueType) const;
- FX_BOOL ValidateCanonicalValue(const CFX_WideString& wsValue, FX_DWORD dwVType);
- FX_BOOL ValidateCanonicalDate(const CFX_WideString& wsDate, CFX_Unitime& unDate);
- FX_BOOL ValidateCanonicalTime(const CFX_WideString& wsTime);
- FX_BOOL ValidateCanonicalDateTime(const CFX_WideString& wsDateTime);
- void GetNumbericFormat(CFX_WideString &wsFormat, int32_t nIntLen, int32_t nDecLen, FX_BOOL bSign = TRUE);
- FX_BOOL ValidateNumericTemp(CFX_WideString& wsNumeric, CFX_WideString& wsFormat, IFX_Locale* pLocale = NULL, int32_t* pos = NULL);
+ FX_BOOL ValidateValue(const CFX_WideString& wsValue,
+ const CFX_WideString& wsPattern,
+ IFX_Locale* pLocale,
+ CFX_WideString* pMatchFormat = NULL);
+ FX_BOOL FormatPatterns(CFX_WideString& wsResult,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale,
+ XFA_VALUEPICTURE eValueType) const;
+ FX_BOOL FormatSinglePattern(CFX_WideString& wsResult,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale,
+ XFA_VALUEPICTURE eValueType) const;
+ FX_BOOL ValidateCanonicalValue(const CFX_WideString& wsValue,
+ FX_DWORD dwVType);
+ FX_BOOL ValidateCanonicalDate(const CFX_WideString& wsDate,
+ CFX_Unitime& unDate);
+ FX_BOOL ValidateCanonicalTime(const CFX_WideString& wsTime);
+ FX_BOOL ValidateCanonicalDateTime(const CFX_WideString& wsDateTime);
+ void GetNumbericFormat(CFX_WideString& wsFormat,
+ int32_t nIntLen,
+ int32_t nDecLen,
+ FX_BOOL bSign = TRUE);
+ FX_BOOL ValidateNumericTemp(CFX_WideString& wsNumeric,
+ CFX_WideString& wsFormat,
+ IFX_Locale* pLocale = NULL,
+ int32_t* pos = NULL);
- CFX_WideString GetValue() const;
- FX_DWORD GetType() const;
- void SetValue(const CFX_WideString& wsValue, FX_DWORD dwType);
- CFX_WideString GetText() const;
- FX_FLOAT GetNum() const;
- FX_DOUBLE GetDoubleNum() const;
- CFX_Unitime GetDate() const;
- CFX_Unitime GetTime() const;
- CFX_Unitime GetDateTime() const;
- FX_BOOL SetText(const CFX_WideString& wsText);
- FX_BOOL SetText(const CFX_WideString& wsText, const CFX_WideString& wsFormat, IFX_Locale* pLocale);
- FX_BOOL SetNum(FX_FLOAT fNum);
- FX_BOOL SetNum(const CFX_WideString& wsNum, const CFX_WideString& wsFormat, IFX_Locale* pLocale);
- FX_BOOL SetDate(const CFX_Unitime& d);
- FX_BOOL SetDate(const CFX_WideString& wsDate, const CFX_WideString& wsFormat, IFX_Locale* pLocale);
- FX_BOOL SetTime(const CFX_Unitime& t);
- FX_BOOL SetTime(const CFX_WideString& wsTime, const CFX_WideString& wsFormat, IFX_Locale* pLocale);
- FX_BOOL SetDateTime(const CFX_Unitime& dt);
- FX_BOOL SetDateTime(const CFX_WideString& wsDateTime, const CFX_WideString& wsFormat, IFX_Locale* pLocale);
- inline FX_BOOL IsNull() const
- {
- return m_dwType == XFA_VT_NULL;
- }
- inline FX_BOOL IsEmpty() const
- {
- return m_wsValue.IsEmpty();
- }
- inline FX_BOOL IsValid() const
- {
- return m_bValid;
- }
-protected:
- FX_BOOL ParsePatternValue(const CFX_WideString& wsValue, const CFX_WideString& wsPattern, IFX_Locale* pLocale);
- CXFA_LocaleMgr* m_pLocaleMgr;
- CFX_WideString m_wsValue;
- FX_DWORD m_dwType;
- FX_BOOL m_bValid;
+ CFX_WideString GetValue() const;
+ FX_DWORD GetType() const;
+ void SetValue(const CFX_WideString& wsValue, FX_DWORD dwType);
+ CFX_WideString GetText() const;
+ FX_FLOAT GetNum() const;
+ FX_DOUBLE GetDoubleNum() const;
+ CFX_Unitime GetDate() const;
+ CFX_Unitime GetTime() const;
+ CFX_Unitime GetDateTime() const;
+ FX_BOOL SetText(const CFX_WideString& wsText);
+ FX_BOOL SetText(const CFX_WideString& wsText,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale);
+ FX_BOOL SetNum(FX_FLOAT fNum);
+ FX_BOOL SetNum(const CFX_WideString& wsNum,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale);
+ FX_BOOL SetDate(const CFX_Unitime& d);
+ FX_BOOL SetDate(const CFX_WideString& wsDate,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale);
+ FX_BOOL SetTime(const CFX_Unitime& t);
+ FX_BOOL SetTime(const CFX_WideString& wsTime,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale);
+ FX_BOOL SetDateTime(const CFX_Unitime& dt);
+ FX_BOOL SetDateTime(const CFX_WideString& wsDateTime,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale);
+ inline FX_BOOL IsNull() const { return m_dwType == XFA_VT_NULL; }
+ inline FX_BOOL IsEmpty() const { return m_wsValue.IsEmpty(); }
+ inline FX_BOOL IsValid() const { return m_bValid; }
+
+ protected:
+ FX_BOOL ParsePatternValue(const CFX_WideString& wsValue,
+ const CFX_WideString& wsPattern,
+ IFX_Locale* pLocale);
+ CXFA_LocaleMgr* m_pLocaleMgr;
+ CFX_WideString m_wsValue;
+ FX_DWORD m_dwType;
+ FX_BOOL m_bValid;
};
#endif
diff --git a/xfa/src/fxfa/src/common/xfa_docdata.h b/xfa/src/fxfa/src/common/xfa_docdata.h index b709fce016..7b0a9c428d 100644 --- a/xfa/src/fxfa/src/common/xfa_docdata.h +++ b/xfa/src/fxfa/src/common/xfa_docdata.h @@ -7,23 +7,25 @@ #ifndef _XFA_DOCDATA_H
#define _XFA_DOCDATA_H
enum XFA_DATAFORMAT {
- XFA_DATAFORMAT_XDP,
+ XFA_DATAFORMAT_XDP,
};
-class IXFA_PacketExport
-{
-public:
- static IXFA_PacketExport* Create(CXFA_Document *pDocument, XFA_DATAFORMAT eFormat = XFA_DATAFORMAT_XDP);
- virtual ~IXFA_PacketExport() {}
- virtual void Release() = 0;
- virtual FX_BOOL Export(IFX_FileWrite *pWrite) = 0;
- virtual FX_BOOL Export(IFX_FileWrite *pWrite, CXFA_Node *pNode, FX_DWORD dwFlag = 0, const FX_CHAR* pChecksum = NULL) = 0;
+class IXFA_PacketExport {
+ public:
+ static IXFA_PacketExport* Create(CXFA_Document* pDocument,
+ XFA_DATAFORMAT eFormat = XFA_DATAFORMAT_XDP);
+ virtual ~IXFA_PacketExport() {}
+ virtual void Release() = 0;
+ virtual FX_BOOL Export(IFX_FileWrite* pWrite) = 0;
+ virtual FX_BOOL Export(IFX_FileWrite* pWrite,
+ CXFA_Node* pNode,
+ FX_DWORD dwFlag = 0,
+ const FX_CHAR* pChecksum = NULL) = 0;
};
-class IXFA_PacketImport
-{
-public:
- static IXFA_PacketImport* Create(CXFA_Document *pDstDoc);
- virtual ~IXFA_PacketImport() {}
- virtual void Release() = 0;
- virtual FX_BOOL ImportData(IFX_FileRead* pDataDocument) = 0;
+class IXFA_PacketImport {
+ public:
+ static IXFA_PacketImport* Create(CXFA_Document* pDstDoc);
+ virtual ~IXFA_PacketImport() {}
+ virtual void Release() = 0;
+ virtual FX_BOOL ImportData(IFX_FileRead* pDataDocument) = 0;
};
#endif
diff --git a/xfa/src/fxfa/src/common/xfa_doclayout.h b/xfa/src/fxfa/src/common/xfa_doclayout.h index 78c58a1edf..588e78dd1f 100644 --- a/xfa/src/fxfa/src/common/xfa_doclayout.h +++ b/xfa/src/fxfa/src/common/xfa_doclayout.h @@ -9,100 +9,92 @@ #define _XFA_LAYOUTITEM_ProcessCACHE_
class CXFA_LayoutItem;
class IXFA_LayoutPage;
-class CXFA_LayoutItem
-{
-public:
- IXFA_LayoutPage* GetPage() const;
- CXFA_Node* GetFormNode() const;
- void GetRect(CFX_RectF &rtLayout, FX_BOOL bRelative = FALSE) const;
- int32_t GetIndex() const;
- int32_t GetCount() const;
- CXFA_LayoutItem* GetParent() const;
- CXFA_LayoutItem* GetFirst() const;
- CXFA_LayoutItem* GetPrev() const;
- CXFA_LayoutItem* GetNext() const;
- CXFA_LayoutItem* GetLast() const;
+class CXFA_LayoutItem {
+ public:
+ IXFA_LayoutPage* GetPage() const;
+ CXFA_Node* GetFormNode() const;
+ void GetRect(CFX_RectF& rtLayout, FX_BOOL bRelative = FALSE) const;
+ int32_t GetIndex() const;
+ int32_t GetCount() const;
+ CXFA_LayoutItem* GetParent() const;
+ CXFA_LayoutItem* GetFirst() const;
+ CXFA_LayoutItem* GetPrev() const;
+ CXFA_LayoutItem* GetNext() const;
+ CXFA_LayoutItem* GetLast() const;
};
-class CXFA_LayoutItemImpl
-{
-public:
- CXFA_LayoutItemImpl(CXFA_Node *pNode, FX_BOOL bIsContentLayoutItem);
- virtual ~CXFA_LayoutItemImpl();
- FX_BOOL IsContentLayoutItem()
- {
- return m_bIsContentLayoutItem;
- }
- void AddChild(CXFA_LayoutItemImpl *pChildItem);
- void AddHeadChild(CXFA_LayoutItemImpl *pChildItem);
- void RemoveChild(CXFA_LayoutItemImpl *pChildItem);
- void InsertChild(CXFA_LayoutItemImpl *pBeforeItem, CXFA_LayoutItemImpl *pChildItem);
-public:
- CXFA_Node* m_pFormNode;
- CXFA_LayoutItemImpl* m_pParent;
- CXFA_LayoutItemImpl* m_pNextSibling;
- CXFA_LayoutItemImpl* m_pFirstChild;
- FX_BOOL m_bIsContentLayoutItem;
+class CXFA_LayoutItemImpl {
+ public:
+ CXFA_LayoutItemImpl(CXFA_Node* pNode, FX_BOOL bIsContentLayoutItem);
+ virtual ~CXFA_LayoutItemImpl();
+ FX_BOOL IsContentLayoutItem() { return m_bIsContentLayoutItem; }
+ void AddChild(CXFA_LayoutItemImpl* pChildItem);
+ void AddHeadChild(CXFA_LayoutItemImpl* pChildItem);
+ void RemoveChild(CXFA_LayoutItemImpl* pChildItem);
+ void InsertChild(CXFA_LayoutItemImpl* pBeforeItem,
+ CXFA_LayoutItemImpl* pChildItem);
+
+ public:
+ CXFA_Node* m_pFormNode;
+ CXFA_LayoutItemImpl* m_pParent;
+ CXFA_LayoutItemImpl* m_pNextSibling;
+ CXFA_LayoutItemImpl* m_pFirstChild;
+ FX_BOOL m_bIsContentLayoutItem;
};
-class CXFA_ContainerLayoutItemImpl : public CXFA_LayoutItemImpl
-{
-public:
- CXFA_ContainerLayoutItemImpl(CXFA_Node *pNode);
-public:
- CXFA_Node* m_pOldSubform;
+class CXFA_ContainerLayoutItemImpl : public CXFA_LayoutItemImpl {
+ public:
+ CXFA_ContainerLayoutItemImpl(CXFA_Node* pNode);
+
+ public:
+ CXFA_Node* m_pOldSubform;
};
-#define XFA_WIDGETSTATUS_Access 0x80000000
-#define XFA_WIDGETSTATUS_Disabled 0x40000000
-#define XFA_WIDGETSTATUS_RectCached 0x20000000
-#define XFA_WIDGETSTATUS_ButtonDown 0x10000000
-#define XFA_WIDGETSTATUS_Highlight 0x08000000
-#define XFA_WIDGETSTATUS_TextEditValueChanged 0x04000000
-class CXFA_ContentLayoutItemImpl : public CXFA_LayoutItemImpl
-{
-public:
- CXFA_ContentLayoutItemImpl(CXFA_Node *pNode);
- virtual ~CXFA_ContentLayoutItemImpl();
-public:
- CXFA_ContentLayoutItemImpl* m_pPrev;
- CXFA_ContentLayoutItemImpl* m_pNext;
- CFX_PointF m_sPos;
- CFX_SizeF m_sSize;
- FX_DWORD m_dwStatus;
+#define XFA_WIDGETSTATUS_Access 0x80000000
+#define XFA_WIDGETSTATUS_Disabled 0x40000000
+#define XFA_WIDGETSTATUS_RectCached 0x20000000
+#define XFA_WIDGETSTATUS_ButtonDown 0x10000000
+#define XFA_WIDGETSTATUS_Highlight 0x08000000
+#define XFA_WIDGETSTATUS_TextEditValueChanged 0x04000000
+class CXFA_ContentLayoutItemImpl : public CXFA_LayoutItemImpl {
+ public:
+ CXFA_ContentLayoutItemImpl(CXFA_Node* pNode);
+ virtual ~CXFA_ContentLayoutItemImpl();
+
+ public:
+ CXFA_ContentLayoutItemImpl* m_pPrev;
+ CXFA_ContentLayoutItemImpl* m_pNext;
+ CFX_PointF m_sPos;
+ CFX_SizeF m_sSize;
+ FX_DWORD m_dwStatus;
};
-class CXFA_TraverseStrategy_LayoutItem
-{
-public:
- static inline CXFA_LayoutItem* GetFirstChild(CXFA_LayoutItem* pLayoutItem)
- {
- return (CXFA_LayoutItem*)((CXFA_LayoutItemImpl*)pLayoutItem)->m_pFirstChild;
- }
- static inline CXFA_LayoutItem* GetNextSibling(CXFA_LayoutItem* pLayoutItem)
- {
- return (CXFA_LayoutItem*)((CXFA_LayoutItemImpl*)pLayoutItem)->m_pNextSibling;
- }
- static inline CXFA_LayoutItem* GetParent(CXFA_LayoutItem* pLayoutItem)
- {
- return (CXFA_LayoutItem*)((CXFA_LayoutItemImpl*)pLayoutItem)->m_pParent;
- }
+class CXFA_TraverseStrategy_LayoutItem {
+ public:
+ static inline CXFA_LayoutItem* GetFirstChild(CXFA_LayoutItem* pLayoutItem) {
+ return (CXFA_LayoutItem*)((CXFA_LayoutItemImpl*)pLayoutItem)->m_pFirstChild;
+ }
+ static inline CXFA_LayoutItem* GetNextSibling(CXFA_LayoutItem* pLayoutItem) {
+ return (CXFA_LayoutItem*)((CXFA_LayoutItemImpl*)pLayoutItem)
+ ->m_pNextSibling;
+ }
+ static inline CXFA_LayoutItem* GetParent(CXFA_LayoutItem* pLayoutItem) {
+ return (CXFA_LayoutItem*)((CXFA_LayoutItemImpl*)pLayoutItem)->m_pParent;
+ }
};
-class IXFA_LayoutPage
-{
-public:
- IXFA_DocLayout* GetLayout() const;
- int32_t GetPageIndex() const;
- void GetPageSize(CFX_SizeF &size);
- CXFA_Node* GetMasterPage() const;
+class IXFA_LayoutPage {
+ public:
+ IXFA_DocLayout* GetLayout() const;
+ int32_t GetPageIndex() const;
+ void GetPageSize(CFX_SizeF& size);
+ CXFA_Node* GetMasterPage() const;
};
-class IXFA_DocLayout
-{
-public:
- virtual ~IXFA_DocLayout() {}
- virtual CXFA_Document* GetDocument() const = 0;
- virtual int32_t StartLayout(FX_BOOL bForceRestart = FALSE) = 0;
- virtual int32_t DoLayout(IFX_Pause *pPause = NULL) = 0;
- virtual FX_BOOL IncrementLayout() = 0;
- virtual int32_t CountPages() const = 0;
- virtual IXFA_LayoutPage* GetPage(int32_t index) const = 0;
+class IXFA_DocLayout {
+ public:
+ virtual ~IXFA_DocLayout() {}
+ virtual CXFA_Document* GetDocument() const = 0;
+ virtual int32_t StartLayout(FX_BOOL bForceRestart = FALSE) = 0;
+ virtual int32_t DoLayout(IFX_Pause* pPause = NULL) = 0;
+ virtual FX_BOOL IncrementLayout() = 0;
+ virtual int32_t CountPages() const = 0;
+ virtual IXFA_LayoutPage* GetPage(int32_t index) const = 0;
- virtual CXFA_LayoutItem* GetLayoutItem(CXFA_Node *pFormItem) = 0;
+ virtual CXFA_LayoutItem* GetLayoutItem(CXFA_Node* pFormItem) = 0;
};
#endif
diff --git a/xfa/src/fxfa/src/common/xfa_document.h b/xfa/src/fxfa/src/common/xfa_document.h index 47cf98e717..fe19ea06a6 100644 --- a/xfa/src/fxfa/src/common/xfa_document.h +++ b/xfa/src/fxfa/src/common/xfa_document.h @@ -18,162 +18,179 @@ class IXFA_Notify; class IXFA_ObjFactory;
class CXFA_Document;
enum XFA_VERSION {
- XFA_VERSION_UNKNOWN = 0,
- XFA_VERSION_200 = 200,
- XFA_VERSION_202 = 202,
- XFA_VERSION_204 = 204,
- XFA_VERSION_205 = 205,
- XFA_VERSION_206 = 206,
- XFA_VERSION_207 = 207,
- XFA_VERSION_208 = 208,
- XFA_VERSION_300 = 300,
- XFA_VERSION_301 = 301,
- XFA_VERSION_303 = 303,
- XFA_VERSION_306 = 306,
- XFA_VERSION_DEFAULT = XFA_VERSION_303,
- XFA_VERSION_MIN = 200,
- XFA_VERSION_MAX = 400,
+ XFA_VERSION_UNKNOWN = 0,
+ XFA_VERSION_200 = 200,
+ XFA_VERSION_202 = 202,
+ XFA_VERSION_204 = 204,
+ XFA_VERSION_205 = 205,
+ XFA_VERSION_206 = 206,
+ XFA_VERSION_207 = 207,
+ XFA_VERSION_208 = 208,
+ XFA_VERSION_300 = 300,
+ XFA_VERSION_301 = 301,
+ XFA_VERSION_303 = 303,
+ XFA_VERSION_306 = 306,
+ XFA_VERSION_DEFAULT = XFA_VERSION_303,
+ XFA_VERSION_MIN = 200,
+ XFA_VERSION_MAX = 400,
};
-#define XFA_LAYOUTSTATUS_Visible 0x0001
-#define XFA_LAYOUTSTATUS_Viewable 0x0010
-#define XFA_LAYOUTSTATUS_Printable 0x0020
+#define XFA_LAYOUTSTATUS_Visible 0x0001
+#define XFA_LAYOUTSTATUS_Viewable 0x0010
+#define XFA_LAYOUTSTATUS_Printable 0x0020
enum XFA_NODEEVENT {
- XFA_NODEEVENT_Ready,
- XFA_NODEEVENT_ValueChanging,
- XFA_NODEEVENT_ValueChanged,
- XFA_NODEEVENT_ChildAdded,
- XFA_NODEEVENT_ChildRemoved,
+ XFA_NODEEVENT_Ready,
+ XFA_NODEEVENT_ValueChanging,
+ XFA_NODEEVENT_ValueChanged,
+ XFA_NODEEVENT_ChildAdded,
+ XFA_NODEEVENT_ChildRemoved,
};
enum XFA_PAGEEVENT {
- XFA_PAGEEVENT_PageAdded,
- XFA_PAGEEVENT_PageRemoved,
+ XFA_PAGEEVENT_PageAdded,
+ XFA_PAGEEVENT_PageRemoved,
};
enum XFA_LAYOUTEVENT {
- XFA_LAYOUTEVENT_ItemAdded,
- XFA_LAYOUTEVENT_ItemRemoving,
- XFA_LAYOUTEVENT_RectChanged,
- XFA_LAYOUTEVENT_StatusChanged,
+ XFA_LAYOUTEVENT_ItemAdded,
+ XFA_LAYOUTEVENT_ItemRemoving,
+ XFA_LAYOUTEVENT_RectChanged,
+ XFA_LAYOUTEVENT_StatusChanged,
};
enum XFA_LAYOUTRESULT {
- XFA_LAYOUTRESULT_Continue,
- XFA_LAYOUTRESULT_Done,
- XFA_LAYOUTRESULT_NextContent,
+ XFA_LAYOUTRESULT_Continue,
+ XFA_LAYOUTRESULT_Done,
+ XFA_LAYOUTRESULT_NextContent,
};
-#define XFA_LAYOUTNOTIFY_StrictHeight 0x0001
-#define XFA_LAYOUTNOTIFY_NoParentBreak 0x0002
-class IXFA_Notify
-{
-public:
- virtual ~IXFA_Notify() {}
- virtual void OnPageEvent(IXFA_LayoutPage *pSender, XFA_PAGEEVENT eEvent, void* pParam = NULL) = 0;
+#define XFA_LAYOUTNOTIFY_StrictHeight 0x0001
+#define XFA_LAYOUTNOTIFY_NoParentBreak 0x0002
+class IXFA_Notify {
+ public:
+ virtual ~IXFA_Notify() {}
+ virtual void OnPageEvent(IXFA_LayoutPage* pSender,
+ XFA_PAGEEVENT eEvent,
+ void* pParam = NULL) = 0;
- virtual void OnNodeEvent(CXFA_Node *pSender, XFA_NODEEVENT eEvent, void* pParam = NULL, void* pParam2 = NULL, void* pParam3 = NULL, void* pParam4 = NULL) = 0;
- virtual void OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent, void* pParam = NULL, void* pAdditional = NULL, void* pAdditional2 = NULL) = 0;
+ virtual void OnNodeEvent(CXFA_Node* pSender,
+ XFA_NODEEVENT eEvent,
+ void* pParam = NULL,
+ void* pParam2 = NULL,
+ void* pParam3 = NULL,
+ void* pParam4 = NULL) = 0;
+ virtual void OnWidgetDataEvent(CXFA_WidgetData* pSender,
+ FX_DWORD dwEvent,
+ void* pParam = NULL,
+ void* pAdditional = NULL,
+ void* pAdditional2 = NULL) = 0;
- virtual CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node *pNode) = 0;
- virtual void OnLayoutEvent(IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, XFA_LAYOUTEVENT eEvent, void* pParam = NULL, void* pParam2 = NULL) = 0;
- virtual void StartFieldDrawLayout(CXFA_Node *pItem, FX_FLOAT &fCalcWidth, FX_FLOAT &fCalcHeight) = 0;
- virtual FX_BOOL FindSplitPos(CXFA_Node *pItem, int32_t iBlockIndex, FX_FLOAT &fCalcHeightPos) = 0;
- virtual FX_BOOL RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem) = 0;
- virtual int32_t ExecEventByDeepFirst(CXFA_Node* pFormNode, XFA_EVENTTYPE eEventType, FX_BOOL bIsFormReady = FALSE, FX_BOOL bRecursive = TRUE, CXFA_WidgetAcc* pExclude = NULL) = 0;
- virtual void AddCalcValidate(CXFA_Node* pNode) = 0;
- virtual IXFA_Doc* GetHDOC() = 0;
- virtual IXFA_DocProvider* GetDocProvider() = 0;
- virtual IXFA_AppProvider* GetAppProvider() = 0;
- virtual IXFA_WidgetHandler* GetWidgetHandler() = 0;
- virtual IXFA_Widget* GetHWidget(CXFA_LayoutItem* pLayoutItem) = 0;
- virtual void OpenDropDownList(IXFA_Widget* hWidget) = 0;
- virtual CFX_WideString GetCurrentDateTime() = 0;
- virtual void ResetData(CXFA_WidgetData* pWidgetData = NULL) = 0;
- virtual int32_t GetLayoutStatus() = 0;
- virtual void RunNodeInitialize(CXFA_Node* pNode) = 0;
- virtual void RunSubformIndexChange(CXFA_Node* pSubformNode) = 0;
- virtual CXFA_Node* GetFocusWidgetNode() = 0;
- virtual void SetFocusWidgetNode(CXFA_Node* pNode) = 0;
+ virtual CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node* pNode) = 0;
+ virtual void OnLayoutEvent(IXFA_DocLayout* pLayout,
+ CXFA_LayoutItem* pSender,
+ XFA_LAYOUTEVENT eEvent,
+ void* pParam = NULL,
+ void* pParam2 = NULL) = 0;
+ virtual void StartFieldDrawLayout(CXFA_Node* pItem,
+ FX_FLOAT& fCalcWidth,
+ FX_FLOAT& fCalcHeight) = 0;
+ virtual FX_BOOL FindSplitPos(CXFA_Node* pItem,
+ int32_t iBlockIndex,
+ FX_FLOAT& fCalcHeightPos) = 0;
+ virtual FX_BOOL RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem) = 0;
+ virtual int32_t ExecEventByDeepFirst(CXFA_Node* pFormNode,
+ XFA_EVENTTYPE eEventType,
+ FX_BOOL bIsFormReady = FALSE,
+ FX_BOOL bRecursive = TRUE,
+ CXFA_WidgetAcc* pExclude = NULL) = 0;
+ virtual void AddCalcValidate(CXFA_Node* pNode) = 0;
+ virtual IXFA_Doc* GetHDOC() = 0;
+ virtual IXFA_DocProvider* GetDocProvider() = 0;
+ virtual IXFA_AppProvider* GetAppProvider() = 0;
+ virtual IXFA_WidgetHandler* GetWidgetHandler() = 0;
+ virtual IXFA_Widget* GetHWidget(CXFA_LayoutItem* pLayoutItem) = 0;
+ virtual void OpenDropDownList(IXFA_Widget* hWidget) = 0;
+ virtual CFX_WideString GetCurrentDateTime() = 0;
+ virtual void ResetData(CXFA_WidgetData* pWidgetData = NULL) = 0;
+ virtual int32_t GetLayoutStatus() = 0;
+ virtual void RunNodeInitialize(CXFA_Node* pNode) = 0;
+ virtual void RunSubformIndexChange(CXFA_Node* pSubformNode) = 0;
+ virtual CXFA_Node* GetFocusWidgetNode() = 0;
+ virtual void SetFocusWidgetNode(CXFA_Node* pNode) = 0;
};
-class IXFA_ObjFactory
-{
-public:
- virtual ~IXFA_ObjFactory() {}
- virtual CXFA_Node* CreateNode(FX_DWORD dwPacket, XFA_ELEMENT eElement) = 0;
- virtual CXFA_Node* CreateNode(XFA_LPCPACKETINFO pPacket, XFA_ELEMENT eElement) = 0;
+class IXFA_ObjFactory {
+ public:
+ virtual ~IXFA_ObjFactory() {}
+ virtual CXFA_Node* CreateNode(FX_DWORD dwPacket, XFA_ELEMENT eElement) = 0;
+ virtual CXFA_Node* CreateNode(XFA_LPCPACKETINFO pPacket,
+ XFA_ELEMENT eElement) = 0;
};
-#define XFA_DOCFLAG_StrictScoping 0x0001
-#define XFA_DOCFLAG_HasInteractive 0x0002
-#define XFA_DOCFLAG_Interactive 0x0004
-#define XFA_DOCFLAG_Scripting 0x0008
+#define XFA_DOCFLAG_StrictScoping 0x0001
+#define XFA_DOCFLAG_HasInteractive 0x0002
+#define XFA_DOCFLAG_Interactive 0x0004
+#define XFA_DOCFLAG_Scripting 0x0008
class CScript_DataWindow;
class CScript_EventPseudoModel;
class CScript_HostPseudoModel;
class CScript_LogPseudoModel;
class CScript_LayoutPseudoModel;
class CScript_SignaturePseudoModel;
-class CXFA_Document : public IXFA_ObjFactory
-{
-public:
- CXFA_Document(IXFA_DocParser *pParser);
- ~CXFA_Document();
- CXFA_Node* GetRoot() const
- {
- return m_pRootNode;
- }
- IXFA_DocParser* GetParser() const
- {
- return m_pParser;
- }
- IXFA_Notify* GetNotify() const;
- void SetRoot(CXFA_Node* pNewRoot);
- CXFA_Object* GetXFANode(const CFX_WideStringC& wsNodeName);
- CXFA_Object* GetXFANode(FX_DWORD wsNodeNameHash);
- void AddPurgeNode(CXFA_Node *pNode);
- FX_BOOL RemovePurgeNode(CXFA_Node *pNode);
- void PurgeNodes();
- FX_BOOL HasFlag(FX_DWORD dwFlag)
- {
- return (m_dwDocFlags & dwFlag) == dwFlag;
- }
- void SetFlag(FX_DWORD dwFlag, FX_BOOL bOn = TRUE);
- FX_BOOL IsInteractive();
- XFA_VERSION GetCurVersionMode()
- {
- return m_eCurVersionMode;
- }
- XFA_VERSION RecognizeXFAVersionNumber(CFX_WideString& wsTemplateNS);
- CXFA_LocaleMgr* GetLocalMgr();
- virtual CXFA_Node* CreateNode(FX_DWORD dwPacket, XFA_ELEMENT eElement);
- virtual CXFA_Node* CreateNode(XFA_LPCPACKETINFO pPacket, XFA_ELEMENT eElement);
- void DoProtoMerge();
- CXFA_Node* GetNodeByID(CXFA_Node* pRoot, const CFX_WideStringC& wsID);
+class CXFA_Document : public IXFA_ObjFactory {
+ public:
+ CXFA_Document(IXFA_DocParser* pParser);
+ ~CXFA_Document();
+ CXFA_Node* GetRoot() const { return m_pRootNode; }
+ IXFA_DocParser* GetParser() const { return m_pParser; }
+ IXFA_Notify* GetNotify() const;
+ void SetRoot(CXFA_Node* pNewRoot);
+ CXFA_Object* GetXFANode(const CFX_WideStringC& wsNodeName);
+ CXFA_Object* GetXFANode(FX_DWORD wsNodeNameHash);
+ void AddPurgeNode(CXFA_Node* pNode);
+ FX_BOOL RemovePurgeNode(CXFA_Node* pNode);
+ void PurgeNodes();
+ FX_BOOL HasFlag(FX_DWORD dwFlag) { return (m_dwDocFlags & dwFlag) == dwFlag; }
+ void SetFlag(FX_DWORD dwFlag, FX_BOOL bOn = TRUE);
+ FX_BOOL IsInteractive();
+ XFA_VERSION GetCurVersionMode() { return m_eCurVersionMode; }
+ XFA_VERSION RecognizeXFAVersionNumber(CFX_WideString& wsTemplateNS);
+ CXFA_LocaleMgr* GetLocalMgr();
+ virtual CXFA_Node* CreateNode(FX_DWORD dwPacket, XFA_ELEMENT eElement);
+ virtual CXFA_Node* CreateNode(XFA_LPCPACKETINFO pPacket,
+ XFA_ELEMENT eElement);
+ void DoProtoMerge();
+ CXFA_Node* GetNodeByID(CXFA_Node* pRoot, const CFX_WideStringC& wsID);
- void DoDataMerge();
- void DoDataRemerge(FX_BOOL bDoDataMerge);
- CXFA_Node* DataMerge_CopyContainer(CXFA_Node* pTemplateNode, CXFA_Node* pFormNode, CXFA_Node* pDataScope, FX_BOOL bOneInstance = FALSE, FX_BOOL bDataMerge = TRUE, FX_BOOL bUpLevel = TRUE);
- void DataMerge_UpdateBindingRelations(CXFA_Node* pFormUpdateRoot);
- CXFA_Node* GetNotBindNode(CXFA_ObjArray& arrayNodes);
- CXFA_LayoutProcessor* GetLayoutProcessor();
- IXFA_DocLayout* GetDocLayout();
- IXFA_ScriptContext* InitScriptContext(FXJSE_HRUNTIME hRuntime);
- IXFA_ScriptContext* GetScriptContext();
- void ClearLayoutData();
-public:
- CFX_MapPtrTemplate<FX_DWORD, CXFA_Node*> m_rgGlobalBinding;
- CXFA_NodeArray m_pPendingPageSet;
-protected:
- IXFA_DocParser* m_pParser;
- IXFA_ScriptContext* m_pScriptContext;
- CXFA_LayoutProcessor* m_pLayoutProcessor;
- CXFA_Node* m_pRootNode;
+ void DoDataMerge();
+ void DoDataRemerge(FX_BOOL bDoDataMerge);
+ CXFA_Node* DataMerge_CopyContainer(CXFA_Node* pTemplateNode,
+ CXFA_Node* pFormNode,
+ CXFA_Node* pDataScope,
+ FX_BOOL bOneInstance = FALSE,
+ FX_BOOL bDataMerge = TRUE,
+ FX_BOOL bUpLevel = TRUE);
+ void DataMerge_UpdateBindingRelations(CXFA_Node* pFormUpdateRoot);
+ CXFA_Node* GetNotBindNode(CXFA_ObjArray& arrayNodes);
+ CXFA_LayoutProcessor* GetLayoutProcessor();
+ IXFA_DocLayout* GetDocLayout();
+ IXFA_ScriptContext* InitScriptContext(FXJSE_HRUNTIME hRuntime);
+ IXFA_ScriptContext* GetScriptContext();
+ void ClearLayoutData();
- CXFA_LocaleMgr* m_pLocalMgr;
- CScript_DataWindow* m_pScriptDataWindow;
- CScript_EventPseudoModel* m_pScriptEvent;
- CScript_HostPseudoModel* m_pScriptHost;
- CScript_LogPseudoModel* m_pScriptLog;
- CScript_LayoutPseudoModel* m_pScriptLayout;
- CScript_SignaturePseudoModel* m_pScriptSignature;
- CXFA_NodeSet m_rgPurgeNodes;
- XFA_VERSION m_eCurVersionMode;
- FX_DWORD m_dwDocFlags;
- friend class CXFA_SimpleParser;
+ public:
+ CFX_MapPtrTemplate<FX_DWORD, CXFA_Node*> m_rgGlobalBinding;
+ CXFA_NodeArray m_pPendingPageSet;
+
+ protected:
+ IXFA_DocParser* m_pParser;
+ IXFA_ScriptContext* m_pScriptContext;
+ CXFA_LayoutProcessor* m_pLayoutProcessor;
+ CXFA_Node* m_pRootNode;
+
+ CXFA_LocaleMgr* m_pLocalMgr;
+ CScript_DataWindow* m_pScriptDataWindow;
+ CScript_EventPseudoModel* m_pScriptEvent;
+ CScript_HostPseudoModel* m_pScriptHost;
+ CScript_LogPseudoModel* m_pScriptLog;
+ CScript_LayoutPseudoModel* m_pScriptLayout;
+ CScript_SignaturePseudoModel* m_pScriptSignature;
+ CXFA_NodeSet m_rgPurgeNodes;
+ XFA_VERSION m_eCurVersionMode;
+ FX_DWORD m_dwDocFlags;
+ friend class CXFA_SimpleParser;
};
#endif
diff --git a/xfa/src/fxfa/src/common/xfa_fm2jsapi.h b/xfa/src/fxfa/src/common/xfa_fm2jsapi.h index 41fee6d133..5056e16eff 100644 --- a/xfa/src/fxfa/src/common/xfa_fm2jsapi.h +++ b/xfa/src/fxfa/src/common/xfa_fm2jsapi.h @@ -6,21 +6,22 @@ #ifndef _XFA_FM2JS_API_H
#define _XFA_FM2JS_API_H
-#define FOXIT_XFA_FM2JS_FORMCALC_RUNTIME "foxit_xfa_formcalc_runtime"
+#define FOXIT_XFA_FM2JS_FORMCALC_RUNTIME "foxit_xfa_formcalc_runtime"
#ifdef __cplusplus
-extern "C"
-{
+extern "C" {
#endif
-typedef struct XFA_HFM2JSCONTEXT_ {
- void** pData;
-}* XFA_HFM2JSCONTEXT;
-int32_t XFA_FM2JS_Translate(const CFX_WideStringC& wsFormcalc, CFX_WideTextBuf& wsJavascript, CFX_WideString& wsError);
-XFA_HFM2JSCONTEXT XFA_FM2JS_ContextCreate();
-void XFA_FM2JS_ContextInitialize(XFA_HFM2JSCONTEXT hFM2JSContext, FXJSE_HRUNTIME hScriptRuntime,
- FXJSE_HCONTEXT hScriptContext,
- CXFA_Document* pDocument);
-void XFA_FM2JS_GlobalPropertyGetter(XFA_HFM2JSCONTEXT hFM2JSContext, FXJSE_HVALUE hValue);
-void XFA_FM2JS_ContextRelease(XFA_HFM2JSCONTEXT hFM2JSContext);
+typedef struct XFA_HFM2JSCONTEXT_ { void** pData; } * XFA_HFM2JSCONTEXT;
+int32_t XFA_FM2JS_Translate(const CFX_WideStringC& wsFormcalc,
+ CFX_WideTextBuf& wsJavascript,
+ CFX_WideString& wsError);
+XFA_HFM2JSCONTEXT XFA_FM2JS_ContextCreate();
+void XFA_FM2JS_ContextInitialize(XFA_HFM2JSCONTEXT hFM2JSContext,
+ FXJSE_HRUNTIME hScriptRuntime,
+ FXJSE_HCONTEXT hScriptContext,
+ CXFA_Document* pDocument);
+void XFA_FM2JS_GlobalPropertyGetter(XFA_HFM2JSCONTEXT hFM2JSContext,
+ FXJSE_HVALUE hValue);
+void XFA_FM2JS_ContextRelease(XFA_HFM2JSCONTEXT hFM2JSContext);
#ifdef __cplusplus
}
#endif
diff --git a/xfa/src/fxfa/src/common/xfa_localemgr.h b/xfa/src/fxfa/src/common/xfa_localemgr.h index 19c7b96172..8dda6d0dff 100644 --- a/xfa/src/fxfa/src/common/xfa_localemgr.h +++ b/xfa/src/fxfa/src/common/xfa_localemgr.h @@ -10,62 +10,61 @@ class CXFA_Node; class IFX_Locale;
class IFX_LocaleMgr;
class CXFA_LocaleMgr;
-#define XFA_LANGID_zh_CN 0x0804
-#define XFA_LANGID_zh_TW 0x0404
-#define XFA_LANGID_zh_HK 0x0c04
-#define XFA_LANGID_ja_JP 0x0411
-#define XFA_LANGID_ko_KR 0x0412
-#define XFA_LANGID_en_US 0x0409
-#define XFA_LANGID_en_GB 0x0809
-#define XFA_LANGID_es_ES 0x0c0a
-#define XFA_LANGID_es_LA 0x080a
-#define XFA_LANGID_de_DE 0x0407
-#define XFA_LANGID_fr_FR 0x040c
-#define XFA_LANGID_it_IT 0x0410
-#define XFA_LANGID_pt_BR 0x0416
-#define XFA_LANGID_nl_NL 0x0413
-#define XFA_LANGID_ru_RU 0x0419
-class CXFA_LocaleMgr : public IFX_LocaleMgr
-{
-public:
- CXFA_LocaleMgr(CXFA_Node* pLocaleSet, CFX_WideString wsDeflcid);
- virtual void Release();
- virtual FX_WORD GetDefLocaleID();
- virtual IFX_Locale* GetDefLocale();
- virtual IFX_Locale* GetLocale(FX_WORD lcid);
- virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName);
- ~CXFA_LocaleMgr();
- void SetDefLocale(IFX_Locale* pLocale);
- CFX_WideStringC GetConfigLocaleName(CXFA_Node* pConfig);
-protected:
- CFX_PtrArray m_LocaleArray;
- CFX_PtrArray m_XMLLocaleArray;
- IFX_Locale* m_pDefLocale;
- CFX_WideString m_wsConfigLocale;
- FX_WORD m_dwDeflcid;
- FX_WORD m_dwLocaleFlags;
+#define XFA_LANGID_zh_CN 0x0804
+#define XFA_LANGID_zh_TW 0x0404
+#define XFA_LANGID_zh_HK 0x0c04
+#define XFA_LANGID_ja_JP 0x0411
+#define XFA_LANGID_ko_KR 0x0412
+#define XFA_LANGID_en_US 0x0409
+#define XFA_LANGID_en_GB 0x0809
+#define XFA_LANGID_es_ES 0x0c0a
+#define XFA_LANGID_es_LA 0x080a
+#define XFA_LANGID_de_DE 0x0407
+#define XFA_LANGID_fr_FR 0x040c
+#define XFA_LANGID_it_IT 0x0410
+#define XFA_LANGID_pt_BR 0x0416
+#define XFA_LANGID_nl_NL 0x0413
+#define XFA_LANGID_ru_RU 0x0419
+class CXFA_LocaleMgr : public IFX_LocaleMgr {
+ public:
+ CXFA_LocaleMgr(CXFA_Node* pLocaleSet, CFX_WideString wsDeflcid);
+ virtual void Release();
+ virtual FX_WORD GetDefLocaleID();
+ virtual IFX_Locale* GetDefLocale();
+ virtual IFX_Locale* GetLocale(FX_WORD lcid);
+ virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName);
+ ~CXFA_LocaleMgr();
+ void SetDefLocale(IFX_Locale* pLocale);
+ CFX_WideStringC GetConfigLocaleName(CXFA_Node* pConfig);
+
+ protected:
+ CFX_PtrArray m_LocaleArray;
+ CFX_PtrArray m_XMLLocaleArray;
+ IFX_Locale* m_pDefLocale;
+ CFX_WideString m_wsConfigLocale;
+ FX_WORD m_dwDeflcid;
+ FX_WORD m_dwLocaleFlags;
};
-class IXFA_TimeZoneProvider
-{
-public:
- static IXFA_TimeZoneProvider* Create();
- static IXFA_TimeZoneProvider* Get();
- static void Destroy();
+class IXFA_TimeZoneProvider {
+ public:
+ static IXFA_TimeZoneProvider* Create();
+ static IXFA_TimeZoneProvider* Get();
+ static void Destroy();
- virtual ~IXFA_TimeZoneProvider() {}
+ virtual ~IXFA_TimeZoneProvider() {}
- virtual void SetTimeZone(FX_TIMEZONE& tz) = 0;
+ virtual void SetTimeZone(FX_TIMEZONE& tz) = 0;
- virtual void GetTimeZone(FX_TIMEZONE& tz) = 0;
+ virtual void GetTimeZone(FX_TIMEZONE& tz) = 0;
};
-class CXFA_TimeZoneProvider : public IXFA_TimeZoneProvider
-{
-public:
- CXFA_TimeZoneProvider();
- virtual ~CXFA_TimeZoneProvider();
- virtual void SetTimeZone(FX_TIMEZONE& tz);
- virtual void GetTimeZone(FX_TIMEZONE& tz);
-private:
- FX_TIMEZONE m_tz;
+class CXFA_TimeZoneProvider : public IXFA_TimeZoneProvider {
+ public:
+ CXFA_TimeZoneProvider();
+ virtual ~CXFA_TimeZoneProvider();
+ virtual void SetTimeZone(FX_TIMEZONE& tz);
+ virtual void GetTimeZone(FX_TIMEZONE& tz);
+
+ private:
+ FX_TIMEZONE m_tz;
};
#endif
diff --git a/xfa/src/fxfa/src/common/xfa_object.h b/xfa/src/fxfa/src/common/xfa_object.h index 69c80da73e..efc0ca9afd 100644 --- a/xfa/src/fxfa/src/common/xfa_object.h +++ b/xfa/src/fxfa/src/common/xfa_object.h @@ -16,573 +16,734 @@ class CXFA_NodeList; class CXFA_ArrayNodeList;
class CXFA_AttachNodeList;
enum XFA_OBJECTTYPE {
- XFA_OBJECTTYPE_OrdinaryObject = 0x0,
- XFA_OBJECTTYPE_OrdinaryList = 0x1,
- XFA_OBJECTTYPE_NodeList = 0x2,
- XFA_OBJECTTYPE_Node = 0x4,
- XFA_OBJECTTYPE_NodeC = 0x5,
- XFA_OBJECTTYPE_NodeV = 0x6,
- XFA_OBJECTTYPE_ModelNode = 0x8,
- XFA_OBJECTTYPE_TextNode = 0x9,
- XFA_OBJECTTYPE_ContainerNode = 0xA,
- XFA_OBJECTTYPE_ContentNode = 0xB,
- XFA_OBJECTTYPE_VariablesThis = 0xC,
- XFA_OBJECTTYPEMASK = 0xF,
- XFA_NODEFLAG_Initialized = 0x00020,
- XFA_NODEFLAG_HasRemoved = 0x00200,
- XFA_NODEFLAG_NeedsInitApp = 0x00400,
- XFA_NODEFLAG_BindFormItems = 0x00800,
- XFA_NODEFLAG_UserInteractive = 0x01000,
- XFA_NODEFLAG_SkipDataBinding = 0x02000,
- XFA_NODEFLAG_OwnXMLNode = 0x04000,
- XFA_NODEFLAG_UnusedNode = 0x08000,
- XFA_NODEFLAG_LayoutGeneratedNode = 0x10000,
+ XFA_OBJECTTYPE_OrdinaryObject = 0x0,
+ XFA_OBJECTTYPE_OrdinaryList = 0x1,
+ XFA_OBJECTTYPE_NodeList = 0x2,
+ XFA_OBJECTTYPE_Node = 0x4,
+ XFA_OBJECTTYPE_NodeC = 0x5,
+ XFA_OBJECTTYPE_NodeV = 0x6,
+ XFA_OBJECTTYPE_ModelNode = 0x8,
+ XFA_OBJECTTYPE_TextNode = 0x9,
+ XFA_OBJECTTYPE_ContainerNode = 0xA,
+ XFA_OBJECTTYPE_ContentNode = 0xB,
+ XFA_OBJECTTYPE_VariablesThis = 0xC,
+ XFA_OBJECTTYPEMASK = 0xF,
+ XFA_NODEFLAG_Initialized = 0x00020,
+ XFA_NODEFLAG_HasRemoved = 0x00200,
+ XFA_NODEFLAG_NeedsInitApp = 0x00400,
+ XFA_NODEFLAG_BindFormItems = 0x00800,
+ XFA_NODEFLAG_UserInteractive = 0x01000,
+ XFA_NODEFLAG_SkipDataBinding = 0x02000,
+ XFA_NODEFLAG_OwnXMLNode = 0x04000,
+ XFA_NODEFLAG_UnusedNode = 0x08000,
+ XFA_NODEFLAG_LayoutGeneratedNode = 0x10000,
};
-class CXFA_Object
-{
-public:
- CXFA_Object(CXFA_Document* pDocument, FX_DWORD uFlags);
- inline CXFA_Document* GetDocument() const
- {
- return m_pDocument;
- }
- inline FX_DWORD GetFlag() const
- {
- return m_uFlags;
- }
- inline XFA_OBJECTTYPE GetObjectType() const
- {
- return (XFA_OBJECTTYPE)(m_uFlags & XFA_OBJECTTYPEMASK);
- }
- inline FX_BOOL IsNode() const
- {
- return (m_uFlags & XFA_OBJECTTYPEMASK) >= XFA_OBJECTTYPE_Node;
- }
- inline FX_BOOL IsOrdinaryObject() const
- {
- return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_OrdinaryObject;
- }
- inline FX_BOOL IsNodeList() const
- {
- return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_NodeList;
- }
- inline FX_BOOL IsOrdinaryList() const
- {
- return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_OrdinaryList;
- }
- FX_BOOL IsContentNode() const
- {
- return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_ContentNode;
- }
- FX_BOOL IsContainerNode() const
- {
- return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_ContainerNode;
- }
- XFA_ELEMENT GetClassID() const;
- void GetClassName(CFX_WideStringC &wsName) const;
- uint32_t GetClassHashCode() const;
- void Script_ObjectClass_ClassName(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void ThrowScriptErrorMessage(int32_t iStringID, ...);
-protected:
- CXFA_Document *m_pDocument;
- FX_DWORD m_uFlags;
+class CXFA_Object {
+ public:
+ CXFA_Object(CXFA_Document* pDocument, FX_DWORD uFlags);
+ inline CXFA_Document* GetDocument() const { return m_pDocument; }
+ inline FX_DWORD GetFlag() const { return m_uFlags; }
+ inline XFA_OBJECTTYPE GetObjectType() const {
+ return (XFA_OBJECTTYPE)(m_uFlags & XFA_OBJECTTYPEMASK);
+ }
+ inline FX_BOOL IsNode() const {
+ return (m_uFlags & XFA_OBJECTTYPEMASK) >= XFA_OBJECTTYPE_Node;
+ }
+ inline FX_BOOL IsOrdinaryObject() const {
+ return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_OrdinaryObject;
+ }
+ inline FX_BOOL IsNodeList() const {
+ return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_NodeList;
+ }
+ inline FX_BOOL IsOrdinaryList() const {
+ return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_OrdinaryList;
+ }
+ FX_BOOL IsContentNode() const {
+ return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_ContentNode;
+ }
+ FX_BOOL IsContainerNode() const {
+ return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_ContainerNode;
+ }
+ XFA_ELEMENT GetClassID() const;
+ void GetClassName(CFX_WideStringC& wsName) const;
+ uint32_t GetClassHashCode() const;
+ void Script_ObjectClass_ClassName(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void ThrowScriptErrorMessage(int32_t iStringID, ...);
+
+ protected:
+ CXFA_Document* m_pDocument;
+ FX_DWORD m_uFlags;
};
-#define XFA_NODEFILTER_Children 0x01
-#define XFA_NODEFILTER_Properties 0x02
-#define XFA_NODEFILTER_OneOfProperty 0x04
-#define XFA_CLONEFLAG_Content 0x01
+#define XFA_NODEFILTER_Children 0x01
+#define XFA_NODEFILTER_Properties 0x02
+#define XFA_NODEFILTER_OneOfProperty 0x04
+#define XFA_CLONEFLAG_Content 0x01
enum XFA_NODEITEM {
- XFA_NODEITEM_Parent,
- XFA_NODEITEM_FirstChild,
- XFA_NODEITEM_NextSibling,
- XFA_NODEITEM_PrevSibling,
+ XFA_NODEITEM_Parent,
+ XFA_NODEITEM_FirstChild,
+ XFA_NODEITEM_NextSibling,
+ XFA_NODEITEM_PrevSibling,
};
enum XFA_SOM_MESSAGETYPE {
- XFA_SOM_ValidationMessage,
- XFA_SOM_FormatMessage,
- XFA_SOM_MandatoryMessage
+ XFA_SOM_ValidationMessage,
+ XFA_SOM_FormatMessage,
+ XFA_SOM_MandatoryMessage
};
typedef CFX_StackTemplate<CXFA_Node*> CXFA_NodeStack;
typedef CXFA_PtrSetTemplate<CXFA_Node*> CXFA_NodeSet;
typedef void (*PD_CALLBACK_DUPLICATEDATA)(void*& pData);
typedef struct _XFA_MAPDATABLOCKCALLBACKINFO {
- PD_CALLBACK_FREEDATA pFree;
- PD_CALLBACK_DUPLICATEDATA pCopy;
+ PD_CALLBACK_FREEDATA pFree;
+ PD_CALLBACK_DUPLICATEDATA pCopy;
} XFA_MAPDATABLOCKCALLBACKINFO;
typedef struct _XFA_MAPDATABLOCK {
- uint8_t* GetData() const
- {
- return (uint8_t*)this + sizeof(_XFA_MAPDATABLOCK);
- }
- XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo;
- int32_t iBytes;
-} XFA_MAPDATABLOCK, * XFA_LPMAPDATABLOCK;
+ uint8_t* GetData() const {
+ return (uint8_t*)this + sizeof(_XFA_MAPDATABLOCK);
+ }
+ XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo;
+ int32_t iBytes;
+} XFA_MAPDATABLOCK, *XFA_LPMAPDATABLOCK;
typedef struct _XFA_MAPMODULEDATA {
- CFX_MapPtrToPtr m_ValueMap;
- CFX_MapPtrTemplate<void*, XFA_LPMAPDATABLOCK> m_BufferMap;
-} XFA_MAPMODULEDATA, * XFA_LPMAPMODULEDATA;
-#define XFA_CalcRefCount (void*)(uintptr_t)FXBSTR_ID('X', 'F', 'A', 'R')
-#define XFA_CalcData (void*)(uintptr_t)FXBSTR_ID('X', 'F', 'A', 'C')
-#define XFA_LAYOUTITEMKEY (void*)(uintptr_t)FXBSTR_ID('L', 'Y', 'I', 'M')
-class CXFA_Node : public CXFA_Object
-{
-public:
- XFA_ELEMENT GetClassID() const
- {
- return (XFA_ELEMENT)m_eNodeClass;
- }
- FX_DWORD GetPacketID() const
- {
- return m_ePacket;
- }
- FX_BOOL HasFlag(FX_DWORD dwFlag) const;
- void SetFlag(FX_DWORD dwFlag, FX_BOOL bOn = TRUE, FX_BOOL bNotify = TRUE);
- FX_BOOL IsAttributeInXML();
- FX_BOOL IsFormContainer()
- {
- return m_ePacket == XFA_XDPPACKET_Form && IsContainerNode();
- }
- void SetXMLMappingNode(IFDE_XMLNode* pXMLNode)
- {
- m_pXMLNode = pXMLNode;
- }
- IFDE_XMLNode* GetXMLMappingNode() const
- {
- return m_pXMLNode;
- }
- IFDE_XMLNode* CreateXMLMappingNode();
- FX_BOOL IsNeedSavingXMLNode();
- inline FX_DWORD GetNameHash() const
- {
- return m_dwNameHash;
- }
- inline FX_BOOL IsUnnamed() const
- {
- return m_dwNameHash == 0;
- }
- CXFA_Node* GetModelNode();
- void UpdateNameHash();
- FX_BOOL HasAttribute(XFA_ATTRIBUTE eAttr, FX_BOOL bCanInherit = FALSE);
- FX_BOOL SetAttribute(XFA_ATTRIBUTE eAttr, const CFX_WideStringC& wsValue, FX_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);
- 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, FX_BOOL bScriptModify = FALSE, FX_BOOL bSyncData = TRUE);
- FX_BOOL TryContent(CFX_WideString& wsContent, FX_BOOL bScriptModify = FALSE, FX_BOOL bProto = TRUE);
- CFX_WideString GetContent();
+ CFX_MapPtrToPtr m_ValueMap;
+ CFX_MapPtrTemplate<void*, XFA_LPMAPDATABLOCK> m_BufferMap;
+} XFA_MAPMODULEDATA, *XFA_LPMAPMODULEDATA;
+#define XFA_CalcRefCount (void*)(uintptr_t) FXBSTR_ID('X', 'F', 'A', 'R')
+#define XFA_CalcData (void*)(uintptr_t) FXBSTR_ID('X', 'F', 'A', 'C')
+#define XFA_LAYOUTITEMKEY (void*)(uintptr_t) FXBSTR_ID('L', 'Y', 'I', 'M')
+class CXFA_Node : public CXFA_Object {
+ public:
+ XFA_ELEMENT GetClassID() const { return (XFA_ELEMENT)m_eNodeClass; }
+ FX_DWORD GetPacketID() const { return m_ePacket; }
+ FX_BOOL HasFlag(FX_DWORD dwFlag) const;
+ void SetFlag(FX_DWORD dwFlag, FX_BOOL bOn = TRUE, FX_BOOL bNotify = TRUE);
+ FX_BOOL IsAttributeInXML();
+ FX_BOOL IsFormContainer() {
+ return m_ePacket == XFA_XDPPACKET_Form && IsContainerNode();
+ }
+ void SetXMLMappingNode(IFDE_XMLNode* pXMLNode) { m_pXMLNode = pXMLNode; }
+ IFDE_XMLNode* GetXMLMappingNode() const { return m_pXMLNode; }
+ IFDE_XMLNode* CreateXMLMappingNode();
+ FX_BOOL IsNeedSavingXMLNode();
+ inline FX_DWORD GetNameHash() const { return m_dwNameHash; }
+ inline FX_BOOL IsUnnamed() const { return m_dwNameHash == 0; }
+ CXFA_Node* GetModelNode();
+ void UpdateNameHash();
+ FX_BOOL HasAttribute(XFA_ATTRIBUTE eAttr, FX_BOOL bCanInherit = FALSE);
+ FX_BOOL SetAttribute(XFA_ATTRIBUTE eAttr,
+ const CFX_WideStringC& wsValue,
+ FX_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);
+ 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,
+ FX_BOOL bScriptModify = FALSE,
+ FX_BOOL bSyncData = TRUE);
+ FX_BOOL TryContent(CFX_WideString& wsContent,
+ FX_BOOL bScriptModify = FALSE,
+ FX_BOOL bProto = TRUE);
+ CFX_WideString GetContent();
+
+ FX_BOOL TryNamespace(CFX_WideString& wsNamespace);
- FX_BOOL TryNamespace(CFX_WideString& wsNamespace);
+ FX_BOOL SetBoolean(XFA_ATTRIBUTE eAttr,
+ FX_BOOL bValue,
+ FX_BOOL bNotify = FALSE) {
+ return SetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, (void*)(uintptr_t)bValue,
+ bNotify);
+ }
+ FX_BOOL TryBoolean(XFA_ATTRIBUTE eAttr,
+ FX_BOOL& bValue,
+ FX_BOOL bUseDefault = TRUE);
+ FX_BOOL GetBoolean(XFA_ATTRIBUTE eAttr) {
+ FX_BOOL bValue;
+ return TryBoolean(eAttr, bValue, TRUE) ? bValue : FALSE;
+ }
+ FX_BOOL SetInteger(XFA_ATTRIBUTE eAttr,
+ int32_t iValue,
+ FX_BOOL bNotify = FALSE) {
+ return SetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, (void*)(uintptr_t)iValue,
+ bNotify);
+ }
+ FX_BOOL TryInteger(XFA_ATTRIBUTE eAttr,
+ int32_t& iValue,
+ FX_BOOL bUseDefault = TRUE);
+ int32_t GetInteger(XFA_ATTRIBUTE eAttr) {
+ int32_t iValue;
+ return TryInteger(eAttr, iValue, TRUE) ? iValue : 0;
+ }
+ FX_BOOL SetEnum(XFA_ATTRIBUTE eAttr,
+ XFA_ATTRIBUTEENUM eValue,
+ FX_BOOL bNotify = FALSE) {
+ return SetValue(eAttr, XFA_ATTRIBUTETYPE_Enum, (void*)(uintptr_t)eValue,
+ bNotify);
+ }
+ FX_BOOL TryEnum(XFA_ATTRIBUTE eAttr,
+ XFA_ATTRIBUTEENUM& eValue,
+ FX_BOOL bUseDefault = TRUE);
+ XFA_ATTRIBUTEENUM GetEnum(XFA_ATTRIBUTE eAttr) {
+ XFA_ATTRIBUTEENUM eValue;
+ return TryEnum(eAttr, eValue, TRUE) ? eValue : XFA_ATTRIBUTEENUM_Unknown;
+ }
+ FX_BOOL SetCData(XFA_ATTRIBUTE eAttr,
+ const CFX_WideString& wsValue,
+ FX_BOOL bNotify = FALSE,
+ FX_BOOL bScriptModify = FALSE);
+ FX_BOOL SetAttributeValue(const CFX_WideString& wsValue,
+ const CFX_WideString& wsXMLValue,
+ FX_BOOL bNotify = FALSE,
+ FX_BOOL bScriptModify = FALSE);
+ FX_BOOL TryCData(XFA_ATTRIBUTE eAttr,
+ CFX_WideString& wsValue,
+ FX_BOOL bUseDefault = TRUE,
+ FX_BOOL bProto = TRUE);
+ FX_BOOL TryCData(XFA_ATTRIBUTE eAttr,
+ CFX_WideStringC& wsValue,
+ FX_BOOL bUseDefault = TRUE,
+ FX_BOOL bProto = TRUE);
+ CFX_WideStringC GetCData(XFA_ATTRIBUTE eAttr) {
+ CFX_WideStringC wsValue;
+ return TryCData(eAttr, wsValue) ? wsValue : CFX_WideStringC();
+ }
+ FX_BOOL SetMeasure(XFA_ATTRIBUTE eAttr,
+ CXFA_Measurement mValue,
+ FX_BOOL bNotify = FALSE);
+ FX_BOOL TryMeasure(XFA_ATTRIBUTE eAttr,
+ CXFA_Measurement& mValue,
+ FX_BOOL bUseDefault = TRUE);
+ CXFA_Measurement GetMeasure(XFA_ATTRIBUTE eAttr) {
+ CXFA_Measurement mValue;
+ return TryMeasure(eAttr, mValue, TRUE) ? mValue : CXFA_Measurement();
+ }
+ FX_BOOL SetObject(XFA_ATTRIBUTE eAttr,
+ void* pData,
+ XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL);
+ FX_BOOL TryObject(XFA_ATTRIBUTE eAttr, void*& pData);
+ void* GetObject(XFA_ATTRIBUTE eAttr) {
+ void* pData;
+ return TryObject(eAttr, pData) ? pData : NULL;
+ }
+ FX_BOOL SetUserData(void* pKey,
+ void* pData,
+ XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL);
+ FX_BOOL TryUserData(void* pKey, void*& pData, FX_BOOL bProtoAlso = FALSE);
+ void* GetUserData(void* pKey, FX_BOOL bProtoAlso = FALSE) {
+ void* pData;
+ return TryUserData(pKey, pData, bProtoAlso) ? pData : NULL;
+ }
+ CXFA_Node* GetProperty(int32_t index,
+ XFA_ELEMENT eProperty,
+ FX_BOOL bCreateProperty = TRUE);
+ int32_t CountChildren(XFA_ELEMENT eElement, FX_BOOL bOnlyChild = FALSE);
+ CXFA_Node* GetChild(int32_t index,
+ XFA_ELEMENT eElement,
+ 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);
+ CXFA_Node* Clone(FX_BOOL bRecursive);
+ CXFA_Node* GetNodeItem(XFA_NODEITEM eItem) const;
+ CXFA_Node* GetNodeItem(XFA_NODEITEM eItem, XFA_OBJECTTYPE eType) const;
+ int32_t GetNodeList(CXFA_NodeArray& nodes,
+ FX_DWORD dwTypeFilter = XFA_NODEFILTER_Children |
+ XFA_NODEFILTER_Properties,
+ XFA_ELEMENT eElementFilter = XFA_ELEMENT_UNKNOWN,
+ int32_t iLevel = 1);
+ CXFA_Node* CreateSamePacketNode(XFA_ELEMENT eElement,
+ FX_DWORD dwFlags = XFA_NODEFLAG_Initialized);
+ CXFA_Node* CloneTemplateToForm(FX_BOOL bRecursive);
+ CXFA_Node* GetTemplateNode();
+ void SetTemplateNode(CXFA_Node* pTemplateNode);
+ CXFA_Node* GetDataDescriptionNode();
+ void SetDataDescriptionNode(CXFA_Node* pDataDescriptionNode);
+ CXFA_Node* GetBindData();
+ int32_t GetBindItems(CXFA_NodeArray& formItems);
+ int32_t AddBindItem(CXFA_Node* pFormNode);
+ int32_t RemoveBindItem(CXFA_Node* pFormNode);
+ FX_BOOL HasBindItem();
+ CXFA_WidgetData* GetWidgetData();
+ CXFA_WidgetData* GetContainerWidgetData();
+ FX_BOOL GetLocaleName(CFX_WideString& wsLocaleName);
+ XFA_ATTRIBUTEENUM GetIntact();
+ CXFA_Node* GetFirstChildByName(const CFX_WideStringC& wsNodeName) const;
+ CXFA_Node* GetFirstChildByName(FX_DWORD dwNodeNameHash) const;
+ CXFA_Node* GetFirstChildByClass(XFA_ELEMENT eNodeClass) const;
+ CXFA_Node* GetNextSameNameSibling(FX_DWORD dwNodeNameHash) const;
+ CXFA_Node* GetNextSameNameSibling(const CFX_WideStringC& wsNodeName) const;
+ CXFA_Node* GetNextSameClassSibling(XFA_ELEMENT eNodeClass) const;
+ int32_t GetNodeSameNameIndex() const;
+ int32_t GetNodeSameClassIndex() const;
+ void GetSOMExpression(CFX_WideString& wsSOMExpression);
+ CXFA_Node* GetInstanceMgrOfSubform();
- FX_BOOL SetBoolean(XFA_ATTRIBUTE eAttr, FX_BOOL bValue, FX_BOOL bNotify = FALSE)
- {
- return SetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, (void*)(uintptr_t)bValue, bNotify);
- }
- FX_BOOL TryBoolean(XFA_ATTRIBUTE eAttr, FX_BOOL &bValue, FX_BOOL bUseDefault = TRUE);
- FX_BOOL GetBoolean(XFA_ATTRIBUTE eAttr)
- {
- FX_BOOL bValue;
- return TryBoolean(eAttr, bValue, TRUE) ? bValue : FALSE;
- }
- FX_BOOL SetInteger(XFA_ATTRIBUTE eAttr, int32_t iValue, FX_BOOL bNotify = FALSE)
- {
- return SetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, (void*)(uintptr_t)iValue, bNotify);
- }
- FX_BOOL TryInteger(XFA_ATTRIBUTE eAttr, int32_t &iValue, FX_BOOL bUseDefault = TRUE);
- int32_t GetInteger(XFA_ATTRIBUTE eAttr)
- {
- int32_t iValue;
- return TryInteger(eAttr, iValue, TRUE) ? iValue : 0;
- }
- FX_BOOL SetEnum(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTEENUM eValue, FX_BOOL bNotify = FALSE)
- {
- return SetValue(eAttr, XFA_ATTRIBUTETYPE_Enum, (void*)(uintptr_t)eValue, bNotify);
- }
- FX_BOOL TryEnum(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTEENUM &eValue, FX_BOOL bUseDefault = TRUE);
- XFA_ATTRIBUTEENUM GetEnum(XFA_ATTRIBUTE eAttr)
- {
- XFA_ATTRIBUTEENUM eValue;
- return TryEnum(eAttr, eValue, TRUE) ? eValue : XFA_ATTRIBUTEENUM_Unknown;
- }
- FX_BOOL SetCData(XFA_ATTRIBUTE eAttr, const CFX_WideString& wsValue, FX_BOOL bNotify = FALSE, FX_BOOL bScriptModify = FALSE);
- FX_BOOL SetAttributeValue(const CFX_WideString& wsValue, const CFX_WideString& wsXMLValue, FX_BOOL bNotify = FALSE, FX_BOOL bScriptModify = FALSE);
- FX_BOOL TryCData(XFA_ATTRIBUTE eAttr, CFX_WideString &wsValue, FX_BOOL bUseDefault = TRUE, FX_BOOL bProto = TRUE);
- FX_BOOL TryCData(XFA_ATTRIBUTE eAttr, CFX_WideStringC &wsValue, FX_BOOL bUseDefault = TRUE, FX_BOOL bProto = TRUE);
- CFX_WideStringC GetCData(XFA_ATTRIBUTE eAttr)
- {
- CFX_WideStringC wsValue;
- return TryCData(eAttr, wsValue) ? wsValue : CFX_WideStringC();
- }
- FX_BOOL SetMeasure(XFA_ATTRIBUTE eAttr, CXFA_Measurement mValue, FX_BOOL bNotify = FALSE);
- FX_BOOL TryMeasure(XFA_ATTRIBUTE eAttr, CXFA_Measurement &mValue, FX_BOOL bUseDefault = TRUE);
- CXFA_Measurement GetMeasure(XFA_ATTRIBUTE eAttr)
- {
- CXFA_Measurement mValue;
- return TryMeasure(eAttr, mValue, TRUE) ? mValue : CXFA_Measurement();
- }
- FX_BOOL SetObject(XFA_ATTRIBUTE eAttr, void* pData, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL);
- FX_BOOL TryObject(XFA_ATTRIBUTE eAttr, void* &pData);
- void* GetObject(XFA_ATTRIBUTE eAttr)
- {
- void* pData;
- return TryObject(eAttr, pData) ? pData : NULL;
- }
- FX_BOOL SetUserData(void* pKey, void* pData, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL);
- FX_BOOL TryUserData(void* pKey, void* &pData, FX_BOOL bProtoAlso = FALSE);
- void* GetUserData(void* pKey, FX_BOOL bProtoAlso = FALSE)
- {
- void* pData;
- return TryUserData(pKey, pData, bProtoAlso) ? pData : NULL;
- }
- CXFA_Node* GetProperty(int32_t index, XFA_ELEMENT eProperty, FX_BOOL bCreateProperty = TRUE);
- int32_t CountChildren(XFA_ELEMENT eElement, FX_BOOL bOnlyChild = FALSE);
- CXFA_Node* GetChild(int32_t index, XFA_ELEMENT eElement, 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);
- CXFA_Node* Clone(FX_BOOL bRecursive);
- CXFA_Node* GetNodeItem(XFA_NODEITEM eItem) const;
- CXFA_Node* GetNodeItem(XFA_NODEITEM eItem, XFA_OBJECTTYPE eType) const;
- int32_t GetNodeList(CXFA_NodeArray &nodes, FX_DWORD dwTypeFilter = XFA_NODEFILTER_Children | XFA_NODEFILTER_Properties, XFA_ELEMENT eElementFilter = XFA_ELEMENT_UNKNOWN, int32_t iLevel = 1);
- CXFA_Node* CreateSamePacketNode(XFA_ELEMENT eElement, FX_DWORD dwFlags = XFA_NODEFLAG_Initialized);
- CXFA_Node* CloneTemplateToForm(FX_BOOL bRecursive);
- CXFA_Node* GetTemplateNode();
- void SetTemplateNode(CXFA_Node* pTemplateNode);
- CXFA_Node* GetDataDescriptionNode();
- void SetDataDescriptionNode(CXFA_Node* pDataDescriptionNode);
- CXFA_Node* GetBindData();
- int32_t GetBindItems(CXFA_NodeArray& formItems);
- int32_t AddBindItem(CXFA_Node* pFormNode);
- int32_t RemoveBindItem(CXFA_Node* pFormNode);
- FX_BOOL HasBindItem();
- CXFA_WidgetData* GetWidgetData();
- CXFA_WidgetData* GetContainerWidgetData();
- FX_BOOL GetLocaleName(CFX_WideString& wsLocaleName);
- XFA_ATTRIBUTEENUM GetIntact();
- CXFA_Node* GetFirstChildByName(const CFX_WideStringC& wsNodeName) const;
- CXFA_Node* GetFirstChildByName(FX_DWORD dwNodeNameHash) const;
- CXFA_Node* GetFirstChildByClass(XFA_ELEMENT eNodeClass) const;
- CXFA_Node* GetNextSameNameSibling(FX_DWORD dwNodeNameHash) const;
- CXFA_Node* GetNextSameNameSibling(const CFX_WideStringC& wsNodeName) const;
- CXFA_Node* GetNextSameClassSibling(XFA_ELEMENT eNodeClass) const;
- int32_t GetNodeSameNameIndex() const;
- int32_t GetNodeSameClassIndex() const;
- void GetSOMExpression(CFX_WideString& wsSOMExpression);
- CXFA_Node* GetInstanceMgrOfSubform();
+ CXFA_Node* GetOccurNode();
+ void Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments);
+ void Script_TreeClass_ResolveNodes(CFXJSE_Arguments* pArguments);
+ void Script_Som_ResolveNodeList(FXJSE_HVALUE hValue,
+ CFX_WideString wsExpression,
+ FX_DWORD dwFlag,
+ CXFA_Node* refNode = NULL);
+ void Script_TreeClass_All(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_TreeClass_Nodes(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_TreeClass_ClassAll(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_TreeClass_Parent(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_TreeClass_Index(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_TreeClass_ClassIndex(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_TreeClass_SomExpression(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_NodeClass_ApplyXSL(CFXJSE_Arguments* pArguments);
+ void Script_NodeClass_AssignNode(CFXJSE_Arguments* pArguments);
+ void Script_NodeClass_Clone(CFXJSE_Arguments* pArguments);
+ void Script_NodeClass_GetAttribute(CFXJSE_Arguments* pArguments);
+ void Script_NodeClass_GetElement(CFXJSE_Arguments* pArguments);
+ void Script_NodeClass_IsPropertySpecified(CFXJSE_Arguments* pArguments);
+ void Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments);
+ void Script_NodeClass_SaveFilteredXML(CFXJSE_Arguments* pArguments);
+ void Script_NodeClass_SaveXML(CFXJSE_Arguments* pArguments);
+ void Script_NodeClass_SetAttribute(CFXJSE_Arguments* pArguments);
+ void Script_NodeClass_SetElement(CFXJSE_Arguments* pArguments);
+ void Script_NodeClass_Ns(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_NodeClass_Model(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_NodeClass_IsContainer(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_NodeClass_IsNull(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_NodeClass_OneOfChild(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_ContainerClass_GetDelta(CFXJSE_Arguments* pArguments);
+ void Script_ContainerClass_GetDeltas(CFXJSE_Arguments* pArguments);
+ void Script_ModelClass_ClearErrorList(CFXJSE_Arguments* pArguments);
+ void Script_ModelClass_CreateNode(CFXJSE_Arguments* pArguments);
+ void Script_ModelClass_IsCompatibleNS(CFXJSE_Arguments* pArguments);
+ void Script_ModelClass_Context(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_ModelClass_AliasNode(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_WsdlConnection_Execute(CFXJSE_Arguments* pArguments);
+ void Script_Delta_Restore(CFXJSE_Arguments* pArguments);
+ void Script_Delta_CurrentValue(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Delta_SavedValue(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Delta_Target(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Attribute_SendAttributeChangeMessage(void* eAttribute,
+ void* eValue,
+ FX_BOOL bScriptModify);
+ void Script_Attribute_Integer(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Attribute_IntegerRead(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Attribute_BOOL(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Attribute_BOOLRead(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Attribute_String(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Attribute_StringRead(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Som_ValidationMessage(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Field_Length(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Som_DefaultValue(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Som_DefaultValue_Read(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Boolean_Value(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Som_Message(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_SOM_MESSAGETYPE iMessageType);
+ void Script_Som_BorderColor(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Som_BorderWidth(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Som_FillColor(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Som_DataNode(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Som_FontColor(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Som_Mandatory(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Som_MandatoryMessage(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Som_InstanceIndex(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Draw_DefaultValue(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Field_DefaultValue(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Field_EditValue(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Field_FormatMessage(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Field_FormattedValue(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Field_ParentSubform(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Field_SelectedIndex(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Field_ClearItems(CFXJSE_Arguments* pArguments);
+ void Script_Field_ExecEvent(CFXJSE_Arguments* pArguments);
+ void Script_Field_ExecInitialize(CFXJSE_Arguments* pArguments);
+ void Script_Field_DeleteItem(CFXJSE_Arguments* pArguments);
+ void Script_Field_GetSaveItem(CFXJSE_Arguments* pArguments);
+ void Script_Field_BoundItem(CFXJSE_Arguments* pArguments);
+ void Script_Field_GetItemState(CFXJSE_Arguments* pArguments);
+ void Script_Field_ExecCalculate(CFXJSE_Arguments* pArguments);
+ void Script_Field_SetItems(CFXJSE_Arguments* pArguments);
+ void Script_Field_GetDisplayItem(CFXJSE_Arguments* pArguments);
+ void Script_Field_SetItemState(CFXJSE_Arguments* pArguments);
+ void Script_Field_AddItem(CFXJSE_Arguments* pArguments);
+ void Script_Field_ExecValidate(CFXJSE_Arguments* pArguments);
+ void Script_ExclGroup_DefaultAndRawValue(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_ExclGroup_ErrorText(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_ExclGroup_Transient(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_ExclGroup_ExecEvent(CFXJSE_Arguments* pArguments);
+ void Script_ExclGroup_SelectedMember(CFXJSE_Arguments* pArguments);
+ void Script_ExclGroup_ExecInitialize(CFXJSE_Arguments* pArguments);
+ void Script_ExclGroup_ExecCalculate(CFXJSE_Arguments* pArguments);
+ void Script_ExclGroup_ExecValidate(CFXJSE_Arguments* pArguments);
+ void Script_Subform_InstanceManager(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Subform_Locale(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Subform_ExecEvent(CFXJSE_Arguments* pArguments);
+ void Script_Subform_ExecInitialize(CFXJSE_Arguments* pArguments);
+ void Script_Subform_ExecCalculate(CFXJSE_Arguments* pArguments);
+ void Script_Subform_ExecValidate(CFXJSE_Arguments* pArguments);
+ void Script_Subform_GetInvalidObjects(CFXJSE_Arguments* pArguments);
+ int32_t Subform_and_SubformSet_InstanceIndex();
+ void Script_Template_FormNodes(CFXJSE_Arguments* pArguments);
+ void Script_Template_Remerge(CFXJSE_Arguments* pArguments);
+ void Script_Template_ExecInitialize(CFXJSE_Arguments* pArguments);
+ void Script_Template_CreateNode(CFXJSE_Arguments* pArguments);
+ void Script_Template_Recalculate(CFXJSE_Arguments* pArguments);
+ void Script_Template_ExecCalculate(CFXJSE_Arguments* pArguments);
+ void Script_Template_ExecValidate(CFXJSE_Arguments* pArguments);
+ void Script_Manifest_Evaluate(CFXJSE_Arguments* pArguments);
+ void Script_InstanceManager_Count(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_InstanceManager_Max(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_InstanceManager_Min(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_InstanceManager_MoveInstance(CFXJSE_Arguments* pArguments);
+ void Script_InstanceManager_RemoveInstance(CFXJSE_Arguments* pArguments);
+ void Script_InstanceManager_SetInstances(CFXJSE_Arguments* pArguments);
+ void Script_InstanceManager_AddInstance(CFXJSE_Arguments* pArguments);
+ void Script_InstanceManager_InsertInstance(CFXJSE_Arguments* pArguments);
+ int32_t InstanceManager_SetInstances(int32_t iCount);
+ int32_t InstanceManager_MoveInstance(int32_t iTo, int32_t iFrom);
+ void Script_Occur_Max(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Occur_Min(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Desc_Metadata(CFXJSE_Arguments* pArguments);
+ void Script_Form_FormNodes(CFXJSE_Arguments* pArguments);
+ void Script_Form_Remerge(CFXJSE_Arguments* pArguments);
+ void Script_Form_ExecInitialize(CFXJSE_Arguments* pArguments);
+ void Script_Form_Recalculate(CFXJSE_Arguments* pArguments);
+ void Script_Form_ExecCalculate(CFXJSE_Arguments* pArguments);
+ void Script_Form_ExecValidate(CFXJSE_Arguments* pArguments);
+ void Script_Form_Checksum(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Packet_GetAttribute(CFXJSE_Arguments* pArguments);
+ void Script_Packet_SetAttribute(CFXJSE_Arguments* pArguments);
+ void Script_Packet_RemoveAttribute(CFXJSE_Arguments* pArguments);
+ void Script_Packet_Content(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Source_Next(CFXJSE_Arguments* pArguments);
+ void Script_Source_CancelBatch(CFXJSE_Arguments* pArguments);
+ void Script_Source_First(CFXJSE_Arguments* pArguments);
+ void Script_Source_UpdateBatch(CFXJSE_Arguments* pArguments);
+ void Script_Source_Previous(CFXJSE_Arguments* pArguments);
+ void Script_Source_IsBOF(CFXJSE_Arguments* pArguments);
+ void Script_Source_IsEOF(CFXJSE_Arguments* pArguments);
+ void Script_Source_Cancel(CFXJSE_Arguments* pArguments);
+ void Script_Source_Update(CFXJSE_Arguments* pArguments);
+ void Script_Source_Open(CFXJSE_Arguments* pArguments);
+ void Script_Source_Delete(CFXJSE_Arguments* pArguments);
+ void Script_Source_AddNew(CFXJSE_Arguments* pArguments);
+ void Script_Source_Requery(CFXJSE_Arguments* pArguments);
+ void Script_Source_Resync(CFXJSE_Arguments* pArguments);
+ void Script_Source_Close(CFXJSE_Arguments* pArguments);
+ void Script_Source_Last(CFXJSE_Arguments* pArguments);
+ void Script_Source_HasDataChanged(CFXJSE_Arguments* pArguments);
+ void Script_Source_Db(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Xfa_This(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Handler_Version(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_SubmitFormat_Mode(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Extras_Type(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Encrypt_Format(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
+ void Script_Script_Stateless(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
- CXFA_Node* GetOccurNode();
- void Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments);
- void Script_TreeClass_ResolveNodes(CFXJSE_Arguments* pArguments);
- void Script_Som_ResolveNodeList(FXJSE_HVALUE hValue, CFX_WideString wsExpression, FX_DWORD dwFlag, CXFA_Node* refNode = NULL);
- void Script_TreeClass_All(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_TreeClass_Nodes(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_TreeClass_ClassAll(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_TreeClass_Parent(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_TreeClass_Index(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_TreeClass_ClassIndex(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_TreeClass_SomExpression(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_NodeClass_ApplyXSL(CFXJSE_Arguments* pArguments);
- void Script_NodeClass_AssignNode(CFXJSE_Arguments* pArguments);
- void Script_NodeClass_Clone(CFXJSE_Arguments* pArguments);
- void Script_NodeClass_GetAttribute(CFXJSE_Arguments* pArguments);
- void Script_NodeClass_GetElement(CFXJSE_Arguments* pArguments);
- void Script_NodeClass_IsPropertySpecified(CFXJSE_Arguments* pArguments);
- void Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments);
- void Script_NodeClass_SaveFilteredXML(CFXJSE_Arguments* pArguments);
- void Script_NodeClass_SaveXML(CFXJSE_Arguments* pArguments);
- void Script_NodeClass_SetAttribute(CFXJSE_Arguments* pArguments);
- void Script_NodeClass_SetElement(CFXJSE_Arguments* pArguments);
- void Script_NodeClass_Ns(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_NodeClass_Model(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_NodeClass_IsContainer(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_NodeClass_IsNull(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_NodeClass_OneOfChild(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_ContainerClass_GetDelta(CFXJSE_Arguments* pArguments);
- void Script_ContainerClass_GetDeltas(CFXJSE_Arguments* pArguments);
- void Script_ModelClass_ClearErrorList(CFXJSE_Arguments* pArguments);
- void Script_ModelClass_CreateNode(CFXJSE_Arguments* pArguments);
- void Script_ModelClass_IsCompatibleNS(CFXJSE_Arguments* pArguments);
- void Script_ModelClass_Context(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_ModelClass_AliasNode(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_WsdlConnection_Execute(CFXJSE_Arguments* pArguments);
- void Script_Delta_Restore(CFXJSE_Arguments* pArguments);
- void Script_Delta_CurrentValue(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Delta_SavedValue(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Delta_Target(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Attribute_SendAttributeChangeMessage(void* eAttribute, void* eValue, FX_BOOL bScriptModify);
- void Script_Attribute_Integer(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Attribute_IntegerRead(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Attribute_BOOL(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Attribute_BOOLRead(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Attribute_String(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Attribute_StringRead(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Som_ValidationMessage(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Field_Length(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Som_DefaultValue(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Som_DefaultValue_Read(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Boolean_Value(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Som_Message(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_SOM_MESSAGETYPE iMessageType);
- void Script_Som_BorderColor(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Som_BorderWidth(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Som_FillColor(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Som_DataNode(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Som_FontColor(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Som_Mandatory(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Som_MandatoryMessage(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Som_InstanceIndex(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Draw_DefaultValue(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Field_DefaultValue(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Field_EditValue(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Field_FormatMessage(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Field_FormattedValue(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Field_ParentSubform(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Field_SelectedIndex(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Field_ClearItems(CFXJSE_Arguments* pArguments);
- void Script_Field_ExecEvent(CFXJSE_Arguments* pArguments);
- void Script_Field_ExecInitialize(CFXJSE_Arguments* pArguments);
- void Script_Field_DeleteItem(CFXJSE_Arguments* pArguments);
- void Script_Field_GetSaveItem(CFXJSE_Arguments* pArguments);
- void Script_Field_BoundItem(CFXJSE_Arguments* pArguments);
- void Script_Field_GetItemState(CFXJSE_Arguments* pArguments);
- void Script_Field_ExecCalculate(CFXJSE_Arguments* pArguments);
- void Script_Field_SetItems(CFXJSE_Arguments* pArguments);
- void Script_Field_GetDisplayItem(CFXJSE_Arguments* pArguments);
- void Script_Field_SetItemState(CFXJSE_Arguments* pArguments);
- void Script_Field_AddItem(CFXJSE_Arguments* pArguments);
- void Script_Field_ExecValidate(CFXJSE_Arguments* pArguments);
- void Script_ExclGroup_DefaultAndRawValue(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_ExclGroup_ErrorText(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_ExclGroup_Transient(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_ExclGroup_ExecEvent(CFXJSE_Arguments* pArguments);
- void Script_ExclGroup_SelectedMember(CFXJSE_Arguments* pArguments);
- void Script_ExclGroup_ExecInitialize(CFXJSE_Arguments* pArguments);
- void Script_ExclGroup_ExecCalculate(CFXJSE_Arguments* pArguments);
- void Script_ExclGroup_ExecValidate(CFXJSE_Arguments* pArguments);
- void Script_Subform_InstanceManager(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Subform_Locale(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Subform_ExecEvent(CFXJSE_Arguments* pArguments);
- void Script_Subform_ExecInitialize(CFXJSE_Arguments* pArguments);
- void Script_Subform_ExecCalculate(CFXJSE_Arguments* pArguments);
- void Script_Subform_ExecValidate(CFXJSE_Arguments* pArguments);
- void Script_Subform_GetInvalidObjects(CFXJSE_Arguments* pArguments);
+ protected:
+ CXFA_Node(CXFA_Document* pDoc, FX_WORD ePacket, XFA_ELEMENT eElement);
+ ~CXFA_Node();
+ friend class CXFA_Document;
+ CXFA_Node* Deprecated_GetPrevSibling();
+ FX_BOOL SetValue(XFA_ATTRIBUTE eAttr,
+ XFA_ATTRIBUTETYPE eType,
+ void* pValue,
+ FX_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);
+ 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,
+ FX_BOOL bScriptModify = FALSE,
+ FX_BOOL bSyncData = TRUE);
+ CFX_WideString GetScriptContent(FX_BOOL bScriptModify = FALSE);
+ XFA_LPMAPMODULEDATA GetMapModuleData(FX_BOOL bCreateNew);
+ void SetMapModuleValue(void* pKey, void* pValue);
+ FX_BOOL GetMapModuleValue(void* pKey, void*& pValue);
+ void SetMapModuleString(void* pKey, const CFX_WideStringC& wsValue);
+ FX_BOOL GetMapModuleString(void* pKey, CFX_WideStringC& wsValue);
+ void SetMapModuleBuffer(void* pKey,
+ void* pValue,
+ int32_t iBytes,
+ XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL);
+ FX_BOOL GetMapModuleBuffer(void* pKey,
+ void*& pValue,
+ int32_t& iBytes,
+ FX_BOOL bProtoAlso = TRUE);
+ FX_BOOL HasMapModuleKey(void* pKey, FX_BOOL bProtoAlso = FALSE);
+ void RemoveMapModuleKey(void* pKey = NULL);
+ void MergeAllData(void* pDstModule, FX_BOOL bUseSrcAttr = TRUE);
+ void MoveBufferMapData(CXFA_Node* pDstModule, void* pKey);
+ void MoveBufferMapData(CXFA_Node* pSrcModule,
+ CXFA_Node* pDstModule,
+ void* pKey,
+ FX_BOOL bRecursive = FALSE);
- int32_t Subform_and_SubformSet_InstanceIndex();
- void Script_Template_FormNodes(CFXJSE_Arguments* pArguments);
- void Script_Template_Remerge(CFXJSE_Arguments* pArguments);
- void Script_Template_ExecInitialize(CFXJSE_Arguments* pArguments);
- void Script_Template_CreateNode(CFXJSE_Arguments* pArguments);
- void Script_Template_Recalculate(CFXJSE_Arguments* pArguments);
- void Script_Template_ExecCalculate(CFXJSE_Arguments* pArguments);
- void Script_Template_ExecValidate(CFXJSE_Arguments* pArguments);
- void Script_Manifest_Evaluate(CFXJSE_Arguments* pArguments);
- void Script_InstanceManager_Count(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_InstanceManager_Max(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_InstanceManager_Min(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_InstanceManager_MoveInstance(CFXJSE_Arguments* pArguments);
- void Script_InstanceManager_RemoveInstance(CFXJSE_Arguments* pArguments);
- void Script_InstanceManager_SetInstances(CFXJSE_Arguments* pArguments);
- void Script_InstanceManager_AddInstance(CFXJSE_Arguments* pArguments);
- void Script_InstanceManager_InsertInstance(CFXJSE_Arguments* pArguments);
- int32_t InstanceManager_SetInstances(int32_t iCount);
- int32_t InstanceManager_MoveInstance(int32_t iTo, int32_t iFrom);
- void Script_Occur_Max(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Occur_Min(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Desc_Metadata(CFXJSE_Arguments* pArguments);
- void Script_Form_FormNodes(CFXJSE_Arguments* pArguments);
- void Script_Form_Remerge(CFXJSE_Arguments* pArguments);
- void Script_Form_ExecInitialize(CFXJSE_Arguments* pArguments);
- void Script_Form_Recalculate(CFXJSE_Arguments* pArguments);
- void Script_Form_ExecCalculate(CFXJSE_Arguments* pArguments);
- void Script_Form_ExecValidate(CFXJSE_Arguments* pArguments);
- void Script_Form_Checksum(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Packet_GetAttribute(CFXJSE_Arguments* pArguments);
- void Script_Packet_SetAttribute(CFXJSE_Arguments* pArguments);
- void Script_Packet_RemoveAttribute(CFXJSE_Arguments* pArguments);
- void Script_Packet_Content(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Source_Next(CFXJSE_Arguments* pArguments);
- void Script_Source_CancelBatch(CFXJSE_Arguments* pArguments);
- void Script_Source_First(CFXJSE_Arguments* pArguments);
- void Script_Source_UpdateBatch(CFXJSE_Arguments* pArguments);
- void Script_Source_Previous(CFXJSE_Arguments* pArguments);
- void Script_Source_IsBOF(CFXJSE_Arguments* pArguments);
- void Script_Source_IsEOF(CFXJSE_Arguments* pArguments);
- void Script_Source_Cancel(CFXJSE_Arguments* pArguments);
- void Script_Source_Update(CFXJSE_Arguments* pArguments);
- void Script_Source_Open(CFXJSE_Arguments* pArguments);
- void Script_Source_Delete(CFXJSE_Arguments* pArguments);
- void Script_Source_AddNew(CFXJSE_Arguments* pArguments);
- void Script_Source_Requery(CFXJSE_Arguments* pArguments);
- void Script_Source_Resync(CFXJSE_Arguments* pArguments);
- void Script_Source_Close(CFXJSE_Arguments* pArguments);
- void Script_Source_Last(CFXJSE_Arguments* pArguments);
- void Script_Source_HasDataChanged(CFXJSE_Arguments* pArguments);
- void Script_Source_Db(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Xfa_This(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Handler_Version(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_SubmitFormat_Mode(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Extras_Type(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Encrypt_Format(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void Script_Script_Stateless(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
-protected:
- CXFA_Node(CXFA_Document *pDoc, FX_WORD ePacket, XFA_ELEMENT eElement);
- ~CXFA_Node();
- friend class CXFA_Document;
- CXFA_Node* Deprecated_GetPrevSibling();
- FX_BOOL SetValue(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTETYPE eType, void* pValue, FX_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);
- 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, FX_BOOL bScriptModify = FALSE, FX_BOOL bSyncData = TRUE);
- CFX_WideString GetScriptContent(FX_BOOL bScriptModify = FALSE);
- XFA_LPMAPMODULEDATA GetMapModuleData(FX_BOOL bCreateNew);
- void SetMapModuleValue(void* pKey, void* pValue);
- FX_BOOL GetMapModuleValue(void* pKey, void* &pValue);
- void SetMapModuleString(void* pKey, const CFX_WideStringC& wsValue);
- FX_BOOL GetMapModuleString(void* pKey, CFX_WideStringC &wsValue);
- void SetMapModuleBuffer(void* pKey, void* pValue, int32_t iBytes, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL);
- FX_BOOL GetMapModuleBuffer(void* pKey, void* &pValue, int32_t &iBytes, FX_BOOL bProtoAlso = TRUE);
- FX_BOOL HasMapModuleKey(void* pKey, FX_BOOL bProtoAlso = FALSE);
- void RemoveMapModuleKey(void* pKey = NULL);
- void MergeAllData(void* pDstModule, FX_BOOL bUseSrcAttr = TRUE);
- void MoveBufferMapData(CXFA_Node* pDstModule, void* pKey);
- void MoveBufferMapData(CXFA_Node* pSrcModule, CXFA_Node* pDstModule, void* pKey, FX_BOOL bRecursive = FALSE);
-protected:
- CXFA_Node *m_pNext;
- CXFA_Node *m_pChild;
- CXFA_Node *m_pLastChild;
- CXFA_Node *m_pParent;
- IFDE_XMLNode *m_pXMLNode;
- XFA_ELEMENT m_eNodeClass;
- FX_WORD m_ePacket;
- FX_DWORD m_dwNameHash;
- CXFA_Node *m_pAuxNode;
- XFA_LPMAPMODULEDATA m_pMapModuleData;
+ protected:
+ CXFA_Node* m_pNext;
+ CXFA_Node* m_pChild;
+ CXFA_Node* m_pLastChild;
+ CXFA_Node* m_pParent;
+ IFDE_XMLNode* m_pXMLNode;
+ XFA_ELEMENT m_eNodeClass;
+ FX_WORD m_ePacket;
+ FX_DWORD m_dwNameHash;
+ CXFA_Node* m_pAuxNode;
+ XFA_LPMAPMODULEDATA m_pMapModuleData;
};
-class CXFA_OrdinaryObject : public CXFA_Object
-{
-public:
- CXFA_OrdinaryObject(CXFA_Document* pDocument, XFA_ELEMENT eElement) : CXFA_Object(pDocument, XFA_OBJECTTYPE_OrdinaryObject), m_uScriptHash(0)
- {
- m_eNodeClass = eElement;
- }
- XFA_ELEMENT GetClassID() const
- {
- return (XFA_ELEMENT)m_eNodeClass;
- }
- uint32_t GetScriptObjHash()
- {
- return m_uScriptHash;
- }
-protected:
- XFA_ELEMENT m_eNodeClass;
- uint32_t m_uScriptHash;
+class CXFA_OrdinaryObject : public CXFA_Object {
+ public:
+ CXFA_OrdinaryObject(CXFA_Document* pDocument, XFA_ELEMENT eElement)
+ : CXFA_Object(pDocument, XFA_OBJECTTYPE_OrdinaryObject),
+ m_uScriptHash(0) {
+ m_eNodeClass = eElement;
+ }
+ XFA_ELEMENT GetClassID() const { return (XFA_ELEMENT)m_eNodeClass; }
+ uint32_t GetScriptObjHash() { return m_uScriptHash; }
+
+ protected:
+ XFA_ELEMENT m_eNodeClass;
+ uint32_t m_uScriptHash;
};
-class CXFA_ThisProxy : public CXFA_Object
-{
-public :
- CXFA_ThisProxy(CXFA_Node* pThisNode, CXFA_Node* pScriptNode): CXFA_Object(pThisNode->GetDocument(), XFA_OBJECTTYPE_VariablesThis), m_pThisNode(NULL), m_pScriptNode(NULL)
- {
- m_pThisNode = pThisNode;
- m_pScriptNode = pScriptNode;
- }
- virtual ~CXFA_ThisProxy() {}
- CXFA_Node* GetThisNode()
- {
- return m_pThisNode;
- }
- CXFA_Node* GetScriptNode()
- {
- return m_pScriptNode;
- }
-private:
- CXFA_Node* m_pThisNode;
- CXFA_Node* m_pScriptNode;
+class CXFA_ThisProxy : public CXFA_Object {
+ public:
+ CXFA_ThisProxy(CXFA_Node* pThisNode, CXFA_Node* pScriptNode)
+ : CXFA_Object(pThisNode->GetDocument(), XFA_OBJECTTYPE_VariablesThis),
+ m_pThisNode(NULL),
+ m_pScriptNode(NULL) {
+ m_pThisNode = pThisNode;
+ m_pScriptNode = pScriptNode;
+ }
+ virtual ~CXFA_ThisProxy() {}
+ CXFA_Node* GetThisNode() { return m_pThisNode; }
+ CXFA_Node* GetScriptNode() { return m_pScriptNode; }
+
+ private:
+ CXFA_Node* m_pThisNode;
+ CXFA_Node* m_pScriptNode;
};
-class CXFA_NodeList : public CXFA_Object
-{
-public:
- CXFA_NodeList(CXFA_Document* pDocument);
- virtual ~CXFA_NodeList() {}
- XFA_ELEMENT GetClassID() const
- {
- return XFA_ELEMENT_NodeList;
- }
- CXFA_Node* NamedItem(const CFX_WideStringC& wsName);
- virtual int32_t GetLength() = 0;
- virtual FX_BOOL Append(CXFA_Node* pNode) = 0;
- virtual FX_BOOL Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode) = 0;
- virtual FX_BOOL Remove(CXFA_Node* pNode) = 0;
- virtual CXFA_Node* Item(int32_t iIndex) = 0;
+class CXFA_NodeList : public CXFA_Object {
+ public:
+ CXFA_NodeList(CXFA_Document* pDocument);
+ virtual ~CXFA_NodeList() {}
+ XFA_ELEMENT GetClassID() const { return XFA_ELEMENT_NodeList; }
+ CXFA_Node* NamedItem(const CFX_WideStringC& wsName);
+ virtual int32_t GetLength() = 0;
+ virtual FX_BOOL Append(CXFA_Node* pNode) = 0;
+ virtual FX_BOOL Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode) = 0;
+ virtual FX_BOOL Remove(CXFA_Node* pNode) = 0;
+ virtual CXFA_Node* Item(int32_t iIndex) = 0;
- void Script_ListClass_Append(CFXJSE_Arguments* pArguments);
- void Script_ListClass_Insert(CFXJSE_Arguments* pArguments);
- void Script_ListClass_Remove(CFXJSE_Arguments* pArguments);
- void Script_ListClass_Item(CFXJSE_Arguments* pArguments);
+ void Script_ListClass_Append(CFXJSE_Arguments* pArguments);
+ void Script_ListClass_Insert(CFXJSE_Arguments* pArguments);
+ void Script_ListClass_Remove(CFXJSE_Arguments* pArguments);
+ void Script_ListClass_Item(CFXJSE_Arguments* pArguments);
- void Script_TreelistClass_NamedItem(CFXJSE_Arguments* pArguments);
- void Script_ListClass_Length(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
+ void Script_TreelistClass_NamedItem(CFXJSE_Arguments* pArguments);
+ void Script_ListClass_Length(FXJSE_HVALUE hValue,
+ FX_BOOL bSetting,
+ XFA_ATTRIBUTE eAttribute);
};
-class CXFA_ArrayNodeList : public CXFA_NodeList
-{
-public:
- CXFA_ArrayNodeList(CXFA_Document* pDocument);
- void SetArrayNodeList(const CXFA_NodeArray &srcArray);
- virtual int32_t GetLength();
- virtual FX_BOOL Append(CXFA_Node* pNode);
- virtual FX_BOOL Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode);
- virtual FX_BOOL Remove(CXFA_Node* pNode);
- virtual CXFA_Node* Item(int32_t iIndex);
-protected:
- CXFA_NodeArray m_array;
+class CXFA_ArrayNodeList : public CXFA_NodeList {
+ public:
+ CXFA_ArrayNodeList(CXFA_Document* pDocument);
+ void SetArrayNodeList(const CXFA_NodeArray& srcArray);
+ virtual int32_t GetLength();
+ virtual FX_BOOL Append(CXFA_Node* pNode);
+ virtual FX_BOOL Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode);
+ virtual FX_BOOL Remove(CXFA_Node* pNode);
+ virtual CXFA_Node* Item(int32_t iIndex);
+
+ protected:
+ CXFA_NodeArray m_array;
};
-class CXFA_AttachNodeList : public CXFA_NodeList
-{
-public:
- CXFA_AttachNodeList(CXFA_Document* pDocument, CXFA_Node* pAttachNode);
+class CXFA_AttachNodeList : public CXFA_NodeList {
+ public:
+ CXFA_AttachNodeList(CXFA_Document* pDocument, CXFA_Node* pAttachNode);
+
+ virtual int32_t GetLength();
+ virtual FX_BOOL Append(CXFA_Node* pNode);
+ virtual FX_BOOL Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode);
+ virtual FX_BOOL Remove(CXFA_Node* pNode);
+ virtual CXFA_Node* Item(int32_t iIndex);
- virtual int32_t GetLength();
- virtual FX_BOOL Append(CXFA_Node* pNode);
- virtual FX_BOOL Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode);
- virtual FX_BOOL Remove(CXFA_Node* pNode);
- virtual CXFA_Node* Item(int32_t iIndex);
-protected:
- CXFA_Node* m_pAttachNode;
+ protected:
+ CXFA_Node* m_pAttachNode;
};
-class CXFA_TraverseStrategy_XFAContainerNode
-{
-public:
- static CXFA_Node* GetFirstChild(CXFA_Node* pTemplateNode, void* pUserData = NULL)
- {
- return pTemplateNode->GetNodeItem(XFA_NODEITEM_FirstChild, XFA_OBJECTTYPE_ContainerNode);
- }
- static CXFA_Node* GetNextSibling(CXFA_Node* pTemplateNode, void* pUserData = NULL)
- {
- return pTemplateNode->GetNodeItem(XFA_NODEITEM_NextSibling, XFA_OBJECTTYPE_ContainerNode);
- }
- static CXFA_Node* GetParent(CXFA_Node* pTemplateNode, void* pUserData = NULL)
- {
- return pTemplateNode->GetNodeItem(XFA_NODEITEM_Parent, XFA_OBJECTTYPE_ContainerNode);
- }
+class CXFA_TraverseStrategy_XFAContainerNode {
+ public:
+ static CXFA_Node* GetFirstChild(CXFA_Node* pTemplateNode,
+ void* pUserData = NULL) {
+ return pTemplateNode->GetNodeItem(XFA_NODEITEM_FirstChild,
+ XFA_OBJECTTYPE_ContainerNode);
+ }
+ static CXFA_Node* GetNextSibling(CXFA_Node* pTemplateNode,
+ void* pUserData = NULL) {
+ return pTemplateNode->GetNodeItem(XFA_NODEITEM_NextSibling,
+ XFA_OBJECTTYPE_ContainerNode);
+ }
+ static CXFA_Node* GetParent(CXFA_Node* pTemplateNode,
+ void* pUserData = NULL) {
+ return pTemplateNode->GetNodeItem(XFA_NODEITEM_Parent,
+ XFA_OBJECTTYPE_ContainerNode);
+ }
};
-typedef CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFAContainerNode> CXFA_ContainerIterator;
-class CXFA_TraverseStrategy_XFANode
-{
-public:
- static inline CXFA_Node* GetFirstChild(CXFA_Node* pTemplateNode)
- {
- return pTemplateNode->GetNodeItem(XFA_NODEITEM_FirstChild);
- }
- static inline CXFA_Node* GetNextSibling(CXFA_Node* pTemplateNode)
- {
- return pTemplateNode->GetNodeItem(XFA_NODEITEM_NextSibling);
- }
- static inline CXFA_Node* GetParent(CXFA_Node* pTemplateNode)
- {
- return pTemplateNode->GetNodeItem(XFA_NODEITEM_Parent);
- }
+typedef CXFA_NodeIteratorTemplate<CXFA_Node,
+ CXFA_TraverseStrategy_XFAContainerNode>
+ CXFA_ContainerIterator;
+class CXFA_TraverseStrategy_XFANode {
+ public:
+ static inline CXFA_Node* GetFirstChild(CXFA_Node* pTemplateNode) {
+ return pTemplateNode->GetNodeItem(XFA_NODEITEM_FirstChild);
+ }
+ static inline CXFA_Node* GetNextSibling(CXFA_Node* pTemplateNode) {
+ return pTemplateNode->GetNodeItem(XFA_NODEITEM_NextSibling);
+ }
+ static inline CXFA_Node* GetParent(CXFA_Node* pTemplateNode) {
+ return pTemplateNode->GetNodeItem(XFA_NODEITEM_Parent);
+ }
};
-typedef CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFANode> CXFA_NodeIterator;
+typedef CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFANode>
+ CXFA_NodeIterator;
#endif
diff --git a/xfa/src/fxfa/src/common/xfa_parser.h b/xfa/src/fxfa/src/common/xfa_parser.h index 08a8b3413d..c06f5126ce 100644 --- a/xfa/src/fxfa/src/common/xfa_parser.h +++ b/xfa/src/fxfa/src/common/xfa_parser.h @@ -7,33 +7,35 @@ #ifndef _XFA_PARSER_H
#define _XFA_PARSER_H
class IFX_Stream;
-class IXFA_Parser
-{
-public:
- static IXFA_Parser* Create(IXFA_ObjFactory *pFactory, FX_BOOL bDocumentParser = FALSE);
- virtual ~IXFA_Parser() {}
- virtual void Release() = 0;
- virtual int32_t StartParse(IFX_FileRead *pStream, XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) = 0;
- virtual int32_t DoParse(IFX_Pause *pPause = NULL) = 0;
- virtual int32_t ParseXMLData(const CFX_WideString &wsXML, IFDE_XMLNode* &pXMLNode, IFX_Pause *pPause = NULL) = 0;
- virtual void ConstructXFANode(CXFA_Node* pXFANode, IFDE_XMLNode* pXMLNode) = 0;
- virtual IXFA_ObjFactory* GetFactory() const = 0;
- virtual CXFA_Node* GetRootNode() const = 0;
- virtual IFDE_XMLDoc* GetXMLDoc() const = 0;
- virtual void CloseParser() = 0;
+class IXFA_Parser {
+ public:
+ static IXFA_Parser* Create(IXFA_ObjFactory* pFactory,
+ FX_BOOL bDocumentParser = FALSE);
+ virtual ~IXFA_Parser() {}
+ virtual void Release() = 0;
+ virtual int32_t StartParse(IFX_FileRead* pStream,
+ XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) = 0;
+ virtual int32_t DoParse(IFX_Pause* pPause = NULL) = 0;
+ virtual int32_t ParseXMLData(const CFX_WideString& wsXML,
+ IFDE_XMLNode*& pXMLNode,
+ IFX_Pause* pPause = NULL) = 0;
+ virtual void ConstructXFANode(CXFA_Node* pXFANode,
+ IFDE_XMLNode* pXMLNode) = 0;
+ virtual IXFA_ObjFactory* GetFactory() const = 0;
+ virtual CXFA_Node* GetRootNode() const = 0;
+ virtual IFDE_XMLDoc* GetXMLDoc() const = 0;
+ virtual void CloseParser() = 0;
};
-class IXFA_DocParser : public IXFA_Parser
-{
-public:
- static IXFA_DocParser* Create(IXFA_Notify *pNotify);
- virtual CXFA_Document* GetDocument() const = 0;
- virtual IXFA_Notify* GetNotify() const = 0;
+class IXFA_DocParser : public IXFA_Parser {
+ public:
+ static IXFA_DocParser* Create(IXFA_Notify* pNotify);
+ virtual CXFA_Document* GetDocument() const = 0;
+ virtual IXFA_Notify* GetNotify() const = 0;
};
-class IXFA_DataLoaderOptionsProvider
-{
-public:
- static IXFA_DataLoaderOptionsProvider* Create(CXFA_Node* pConfigurationDOM);
- virtual ~IXFA_DataLoaderOptionsProvider() {}
- virtual void Release() = 0;
+class IXFA_DataLoaderOptionsProvider {
+ public:
+ static IXFA_DataLoaderOptionsProvider* Create(CXFA_Node* pConfigurationDOM);
+ virtual ~IXFA_DataLoaderOptionsProvider() {}
+ virtual void Release() = 0;
};
#endif
diff --git a/xfa/src/fxfa/src/common/xfa_script.h b/xfa/src/fxfa/src/common/xfa_script.h index fd9cdc44ac..3bddc8bac9 100644 --- a/xfa/src/fxfa/src/common/xfa_script.h +++ b/xfa/src/fxfa/src/common/xfa_script.h @@ -6,103 +6,105 @@ #ifndef _FXFA_SCRIPT_H
#define _FXFA_SCRIPT_H
-#define XFA_RESOLVENODE_Children 0x0001
-#define XFA_RESOLVENODE_Attributes 0x0004
-#define XFA_RESOLVENODE_Properties 0x0008
-#define XFA_RESOLVENODE_Siblings 0x0020
-#define XFA_RESOLVENODE_Parent 0x0040
-#define XFA_RESOLVENODE_AnyChild 0x0080
-#define XFA_RESOLVENODE_ALL 0x0100
-#define XFA_RESOLVENODE_CreateNode 0x0400
-#define XFA_RESOLVENODE_Bind 0x0800
-#define XFA_RESOLVENODE_BindNew 0x1000
+#define XFA_RESOLVENODE_Children 0x0001
+#define XFA_RESOLVENODE_Attributes 0x0004
+#define XFA_RESOLVENODE_Properties 0x0008
+#define XFA_RESOLVENODE_Siblings 0x0020
+#define XFA_RESOLVENODE_Parent 0x0040
+#define XFA_RESOLVENODE_AnyChild 0x0080
+#define XFA_RESOLVENODE_ALL 0x0100
+#define XFA_RESOLVENODE_CreateNode 0x0400
+#define XFA_RESOLVENODE_Bind 0x0800
+#define XFA_RESOLVENODE_BindNew 0x1000
enum XFA_SCRIPTLANGTYPE {
- XFA_SCRIPTLANGTYPE_Formcalc = XFA_SCRIPTTYPE_Formcalc,
- XFA_SCRIPTLANGTYPE_Javascript = XFA_SCRIPTTYPE_Javascript,
- XFA_SCRIPTLANGTYPE_Unkown = XFA_SCRIPTTYPE_Unkown,
+ XFA_SCRIPTLANGTYPE_Formcalc = XFA_SCRIPTTYPE_Formcalc,
+ XFA_SCRIPTLANGTYPE_Javascript = XFA_SCRIPTTYPE_Javascript,
+ XFA_SCRIPTLANGTYPE_Unkown = XFA_SCRIPTTYPE_Unkown,
};
enum XFA_RESOVENODE_RSTYPE {
- XFA_RESOVENODE_RSTYPE_Nodes,
- XFA_RESOVENODE_RSTYPE_Attribute,
- XFA_RESOLVENODE_RSTYPE_CreateNodeOne,
- XFA_RESOLVENODE_RSTYPE_CreateNodeAll,
- XFA_RESOLVENODE_RSTYPE_CreateNodeMidAll,
- XFA_RESOVENODE_RSTYPE_ExistNodes,
+ XFA_RESOVENODE_RSTYPE_Nodes,
+ XFA_RESOVENODE_RSTYPE_Attribute,
+ XFA_RESOLVENODE_RSTYPE_CreateNodeOne,
+ XFA_RESOLVENODE_RSTYPE_CreateNodeAll,
+ XFA_RESOLVENODE_RSTYPE_CreateNodeMidAll,
+ XFA_RESOVENODE_RSTYPE_ExistNodes,
};
-class CXFA_HVALUEArray : public CFX_ArrayTemplate<FXJSE_HVALUE>
-{
-public:
- CXFA_HVALUEArray(FXJSE_HRUNTIME hRunTime) : m_hRunTime(hRunTime) {};
- ~CXFA_HVALUEArray()
- {
- for (int32_t i = 0; i < GetSize(); i++) {
- FXJSE_Value_Release(GetAt(i));
- }
+class CXFA_HVALUEArray : public CFX_ArrayTemplate<FXJSE_HVALUE> {
+ public:
+ CXFA_HVALUEArray(FXJSE_HRUNTIME hRunTime) : m_hRunTime(hRunTime){};
+ ~CXFA_HVALUEArray() {
+ for (int32_t i = 0; i < GetSize(); i++) {
+ FXJSE_Value_Release(GetAt(i));
}
- void GetAttributeObject(CXFA_ObjArray& objArray)
- {
- for (int32_t i = 0; i < GetSize(); i++) {
- CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(GetAt(i), NULL);
- objArray.Add(pObject);
- }
+ }
+ void GetAttributeObject(CXFA_ObjArray& objArray) {
+ for (int32_t i = 0; i < GetSize(); i++) {
+ CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(GetAt(i), NULL);
+ objArray.Add(pObject);
}
- FXJSE_HRUNTIME m_hRunTime;
+ }
+ FXJSE_HRUNTIME m_hRunTime;
};
typedef struct _XFA_RESOLVENODE_RS {
- _XFA_RESOLVENODE_RS() : dwFlags(XFA_RESOVENODE_RSTYPE_Nodes), pScriptAttribute(NULL) { }
- ~_XFA_RESOLVENODE_RS()
- {
- nodes.RemoveAll();
+ _XFA_RESOLVENODE_RS()
+ : dwFlags(XFA_RESOVENODE_RSTYPE_Nodes), pScriptAttribute(NULL) {}
+ ~_XFA_RESOLVENODE_RS() { nodes.RemoveAll(); }
+ int32_t GetAttributeResult(CXFA_HVALUEArray& hValueArray) const {
+ if (pScriptAttribute && pScriptAttribute->eValueType == XFA_SCRIPT_Object) {
+ FXJSE_HRUNTIME hRunTime = hValueArray.m_hRunTime;
+ for (int32_t i = 0; i < nodes.GetSize(); i++) {
+ FXJSE_HVALUE hValue = FXJSE_Value_Create(hRunTime);
+ (nodes[i]->*(pScriptAttribute->lpfnCallback))(
+ hValue, FALSE, (XFA_ATTRIBUTE)pScriptAttribute->eAttribute);
+ hValueArray.Add(hValue);
+ }
}
- int32_t GetAttributeResult(CXFA_HVALUEArray& hValueArray) const
- {
- if (pScriptAttribute && pScriptAttribute->eValueType == XFA_SCRIPT_Object) {
- FXJSE_HRUNTIME hRunTime = hValueArray.m_hRunTime;
- for (int32_t i = 0; i < nodes.GetSize(); i++) {
- FXJSE_HVALUE hValue = FXJSE_Value_Create(hRunTime);
- (nodes[i]->*(pScriptAttribute->lpfnCallback))(hValue, FALSE, (XFA_ATTRIBUTE)pScriptAttribute->eAttribute);
- hValueArray.Add(hValue);
- }
- }
- return hValueArray.GetSize();
- }
- CXFA_ObjArray nodes;
- XFA_RESOVENODE_RSTYPE dwFlags;
- XFA_LPCSCRIPTATTRIBUTEINFO pScriptAttribute;
-} XFA_RESOLVENODE_RS, * XFA_LPRESOLVENODE_RS;
+ return hValueArray.GetSize();
+ }
+ CXFA_ObjArray nodes;
+ XFA_RESOVENODE_RSTYPE dwFlags;
+ XFA_LPCSCRIPTATTRIBUTEINFO pScriptAttribute;
+} XFA_RESOLVENODE_RS, *XFA_LPRESOLVENODE_RS;
typedef struct _XFA_JSBUILTININFO {
- uint32_t uUnicodeHash;
- const FX_CHAR* pName;
-} XFA_JSBUILTININFO, * XFA_LPJSBUILTININFO;
-typedef XFA_JSBUILTININFO const * XFA_LPCJSBUILTININFO;
+ uint32_t uUnicodeHash;
+ const FX_CHAR* pName;
+} XFA_JSBUILTININFO, *XFA_LPJSBUILTININFO;
+typedef XFA_JSBUILTININFO const* XFA_LPCJSBUILTININFO;
XFA_LPCJSBUILTININFO XFA_GetJSBuiltinByHash(uint32_t uHashCode);
-class IXFA_ScriptContext
-{
-public:
- virtual ~IXFA_ScriptContext() {}
- virtual void Release() = 0;
- virtual void Initialize(FXJSE_HRUNTIME hRuntime) = 0;
+class IXFA_ScriptContext {
+ public:
+ virtual ~IXFA_ScriptContext() {}
+ virtual void Release() = 0;
+ virtual void Initialize(FXJSE_HRUNTIME hRuntime) = 0;
- virtual void SetEventParam(CXFA_EventParam* pEventParam) = 0;
- virtual CXFA_EventParam* GetEventParam() = 0;
- virtual FX_BOOL RunScript(XFA_SCRIPTLANGTYPE eScriptType, const CFX_WideStringC& wsScript, FXJSE_HVALUE hRetValue, CXFA_Object* pThisObject = NULL) = 0;
- virtual int32_t ResolveObjects(CXFA_Object* refNode, const CFX_WideStringC& wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, FX_DWORD dwStyles = XFA_RESOLVENODE_Children, CXFA_Node* bindNode = NULL) = 0;
- virtual FXJSE_HVALUE GetJSValueFromMap(CXFA_Object* pObject) = 0;
- virtual void CacheList(CXFA_NodeList* pList) = 0;
- virtual CXFA_Object* GetThisObject() const = 0;
- virtual FXJSE_HRUNTIME GetRuntime() const = 0;
- virtual int32_t GetIndexByName(CXFA_Node* refNode) = 0;
- virtual int32_t GetIndexByClassName(CXFA_Node* refNode) = 0;
- virtual void GetSomExpression(CXFA_Node* refNode, CFX_WideString &wsExpression) = 0;
+ virtual void SetEventParam(CXFA_EventParam* pEventParam) = 0;
+ virtual CXFA_EventParam* GetEventParam() = 0;
+ virtual FX_BOOL RunScript(XFA_SCRIPTLANGTYPE eScriptType,
+ const CFX_WideStringC& wsScript,
+ FXJSE_HVALUE hRetValue,
+ CXFA_Object* pThisObject = NULL) = 0;
+ virtual int32_t ResolveObjects(CXFA_Object* refNode,
+ const CFX_WideStringC& wsExpression,
+ XFA_RESOLVENODE_RS& resolveNodeRS,
+ FX_DWORD dwStyles = XFA_RESOLVENODE_Children,
+ CXFA_Node* bindNode = NULL) = 0;
+ virtual FXJSE_HVALUE GetJSValueFromMap(CXFA_Object* pObject) = 0;
+ virtual void CacheList(CXFA_NodeList* pList) = 0;
+ virtual CXFA_Object* GetThisObject() const = 0;
+ virtual FXJSE_HRUNTIME GetRuntime() const = 0;
+ virtual int32_t GetIndexByName(CXFA_Node* refNode) = 0;
+ virtual int32_t GetIndexByClassName(CXFA_Node* refNode) = 0;
+ virtual void GetSomExpression(CXFA_Node* refNode,
+ CFX_WideString& wsExpression) = 0;
- virtual void SetNodesOfRunScript(CXFA_NodeArray *pArray) = 0;
- virtual void AddNodesOfRunScript(const CXFA_NodeArray& nodes) = 0;
- virtual void AddNodesOfRunScript(CXFA_Node* pNode) = 0;
- virtual FXJSE_HCLASS GetJseNormalClass() = 0;
- virtual XFA_SCRIPTLANGTYPE GetType() = 0;
- virtual void AddJSBuiltinObject(XFA_LPCJSBUILTININFO pBuitinObject) = 0;
- virtual void SetRunAtType(XFA_ATTRIBUTEENUM eRunAt) = 0;
- virtual FX_BOOL IsRunAtClient() = 0;
+ virtual void SetNodesOfRunScript(CXFA_NodeArray* pArray) = 0;
+ virtual void AddNodesOfRunScript(const CXFA_NodeArray& nodes) = 0;
+ virtual void AddNodesOfRunScript(CXFA_Node* pNode) = 0;
+ virtual FXJSE_HCLASS GetJseNormalClass() = 0;
+ virtual XFA_SCRIPTLANGTYPE GetType() = 0;
+ virtual void AddJSBuiltinObject(XFA_LPCJSBUILTININFO pBuitinObject) = 0;
+ virtual void SetRunAtType(XFA_ATTRIBUTEENUM eRunAt) = 0;
+ virtual FX_BOOL IsRunAtClient() = 0;
};
IXFA_ScriptContext* XFA_ScriptContext_Create(CXFA_Document* pDocument);
#endif
diff --git a/xfa/src/fxfa/src/common/xfa_utils.h b/xfa/src/fxfa/src/common/xfa_utils.h index 11a1c0e2d8..bd3236967b 100644 --- a/xfa/src/fxfa/src/common/xfa_utils.h +++ b/xfa/src/fxfa/src/common/xfa_utils.h @@ -6,234 +6,210 @@ #ifndef _XFA_UTILS_H_
#define _XFA_UTILS_H_
-FX_BOOL XFA_FDEExtension_ResolveNamespaceQualifier(IFDE_XMLElement* pNode, const CFX_WideStringC& wsQualifier, CFX_WideString& wsNamespaceURI);
+FX_BOOL XFA_FDEExtension_ResolveNamespaceQualifier(
+ IFDE_XMLElement* pNode,
+ const CFX_WideStringC& wsQualifier,
+ CFX_WideString& wsNamespaceURI);
template <class NodeType, class TraverseStrategy>
-class CXFA_NodeIteratorTemplate
-{
-public:
- CXFA_NodeIteratorTemplate(NodeType* pRootNode = NULL)
- : m_pRoot(pRootNode)
- {
- if(pRootNode) {
- m_NodeStack.Push(pRootNode);
+class CXFA_NodeIteratorTemplate {
+ public:
+ CXFA_NodeIteratorTemplate(NodeType* pRootNode = NULL) : m_pRoot(pRootNode) {
+ if (pRootNode) {
+ m_NodeStack.Push(pRootNode);
+ }
+ }
+ FX_BOOL Init(NodeType* pRootNode) {
+ if (!pRootNode) {
+ return FALSE;
+ }
+ m_pRoot = pRootNode;
+ m_NodeStack.RemoveAll();
+ m_NodeStack.Push(pRootNode);
+ return TRUE;
+ }
+ void Clear() { m_NodeStack.RemoveAll(); }
+ void Reset() {
+ Clear();
+ if (m_pRoot) {
+ m_NodeStack.Push(m_pRoot);
+ }
+ }
+ FX_BOOL SetCurrent(NodeType* pCurNode) {
+ m_NodeStack.RemoveAll();
+ if (pCurNode) {
+ CFX_StackTemplate<NodeType*> revStack;
+ NodeType* pNode;
+ for (pNode = pCurNode; pNode && pNode != m_pRoot;
+ pNode = TraverseStrategy::GetParent(pNode)) {
+ revStack.Push(pNode);
+ }
+ if (!pNode) {
+ return FALSE;
+ }
+ revStack.Push(m_pRoot);
+ while (revStack.GetSize()) {
+ m_NodeStack.Push(*revStack.GetTopElement());
+ revStack.Pop();
+ }
+ }
+ return TRUE;
+ }
+ NodeType* GetCurrent() {
+ return m_NodeStack.GetSize() ? *m_NodeStack.GetTopElement() : NULL;
+ }
+ NodeType* GetRoot() { return m_pRoot; }
+ NodeType* MoveToPrev() {
+ NodeType* pCurrent = GetCurrent();
+ int32_t nStackLength = m_NodeStack.GetSize();
+ if (nStackLength == 1) {
+ return NULL;
+ } else if (nStackLength > 1) {
+ NodeType* pCurItem = *m_NodeStack.GetTopElement();
+ m_NodeStack.Pop();
+ NodeType* pParentItem = *m_NodeStack.GetTopElement();
+ NodeType* pParentFirstChildItem =
+ TraverseStrategy::GetFirstChild(pParentItem);
+ if (pCurItem == pParentFirstChildItem) {
+ return pParentItem;
+ }
+ NodeType *pPrevItem = pParentFirstChildItem, *pPrevItemNext = NULL;
+ for (; pPrevItem; pPrevItem = pPrevItemNext) {
+ pPrevItemNext = TraverseStrategy::GetNextSibling(pPrevItem);
+ if (!pPrevItemNext || pPrevItemNext == pCurItem) {
+ break;
}
- }
- FX_BOOL Init(NodeType* pRootNode)
- {
- if(!pRootNode) {
- return FALSE;
- }
- m_pRoot = pRootNode;
- m_NodeStack.RemoveAll();
- m_NodeStack.Push(pRootNode);
- return TRUE;
- }
- void Clear()
- {
- m_NodeStack.RemoveAll();
- }
- void Reset()
- {
- Clear();
- if (m_pRoot) {
- m_NodeStack.Push(m_pRoot);
- }
- }
- FX_BOOL SetCurrent(NodeType* pCurNode)
- {
- m_NodeStack.RemoveAll();
- if(pCurNode) {
- CFX_StackTemplate<NodeType*> revStack;
- NodeType* pNode;
- for(pNode = pCurNode; pNode && pNode != m_pRoot; pNode = TraverseStrategy::GetParent(pNode)) {
- revStack.Push(pNode);
- }
- if(!pNode) {
- return FALSE;
- }
- revStack.Push(m_pRoot);
- while(revStack.GetSize()) {
- m_NodeStack.Push(*revStack.GetTopElement());
- revStack.Pop();
- }
+ }
+ m_NodeStack.Push(pPrevItem);
+ } else {
+ m_NodeStack.RemoveAll();
+ if (m_pRoot) {
+ m_NodeStack.Push(m_pRoot);
+ }
+ }
+ if (m_NodeStack.GetSize() > 0) {
+ NodeType* pChildItem = *m_NodeStack.GetTopElement();
+ while ((pChildItem = TraverseStrategy::GetFirstChild(pChildItem)) !=
+ NULL) {
+ while (NodeType* pNextItem =
+ TraverseStrategy::GetNextSibling(pChildItem)) {
+ pChildItem = pNextItem;
}
- return TRUE;
- }
- NodeType* GetCurrent()
- {
- return m_NodeStack.GetSize() ? *m_NodeStack.GetTopElement() : NULL;
- }
- NodeType* GetRoot()
- {
- return m_pRoot;
- }
- NodeType* MoveToPrev()
- {
- NodeType *pCurrent = GetCurrent();
- int32_t nStackLength = m_NodeStack.GetSize();
- if(nStackLength == 1) {
- return NULL;
- } else if(nStackLength > 1) {
- NodeType *pCurItem = *m_NodeStack.GetTopElement();
- m_NodeStack.Pop();
- NodeType *pParentItem = *m_NodeStack.GetTopElement();
- NodeType *pParentFirstChildItem = TraverseStrategy::GetFirstChild(pParentItem);
- if(pCurItem == pParentFirstChildItem) {
- return pParentItem;
- }
- NodeType *pPrevItem = pParentFirstChildItem, *pPrevItemNext = NULL;
- for(; pPrevItem; pPrevItem = pPrevItemNext) {
- pPrevItemNext = TraverseStrategy::GetNextSibling(pPrevItem);
- if(!pPrevItemNext || pPrevItemNext == pCurItem) {
- break;
- }
- }
- m_NodeStack.Push(pPrevItem);
- } else {
- m_NodeStack.RemoveAll();
- if(m_pRoot) {
- m_NodeStack.Push(m_pRoot);
- }
+ m_NodeStack.Push(pChildItem);
+ }
+ return *m_NodeStack.GetTopElement();
+ }
+ return NULL;
+ }
+ NodeType* MoveToNext() {
+ NodeType** ppNode = NULL;
+ NodeType* pCurrent = GetCurrent();
+ while (m_NodeStack.GetSize() > 0) {
+ while ((ppNode = m_NodeStack.GetTopElement()) != NULL) {
+ if (pCurrent != *ppNode) {
+ return *ppNode;
}
- if(m_NodeStack.GetSize() > 0) {
- NodeType *pChildItem = *m_NodeStack.GetTopElement();
- while((pChildItem = TraverseStrategy::GetFirstChild(pChildItem)) != NULL) {
- while(NodeType *pNextItem = TraverseStrategy::GetNextSibling(pChildItem)) {
- pChildItem = pNextItem;
- }
- m_NodeStack.Push(pChildItem);
- }
- return *m_NodeStack.GetTopElement();
+ NodeType* pChild = TraverseStrategy::GetFirstChild(*ppNode);
+ if (pChild == NULL) {
+ break;
}
- return NULL;
- }
- NodeType* MoveToNext()
- {
- NodeType **ppNode = NULL;
- NodeType *pCurrent = GetCurrent();
- while (m_NodeStack.GetSize() > 0) {
- while ((ppNode = m_NodeStack.GetTopElement()) != NULL) {
- if (pCurrent != *ppNode) {
- return *ppNode;
- }
- NodeType *pChild = TraverseStrategy::GetFirstChild(*ppNode);
- if (pChild == NULL) {
- break;
- }
- m_NodeStack.Push(pChild);
- }
- while ((ppNode = m_NodeStack.GetTopElement()) != NULL) {
- NodeType *pNext = TraverseStrategy::GetNextSibling(*ppNode);
- m_NodeStack.Pop();
- if (m_NodeStack.GetSize() == 0) {
- break;
- }
- if (pNext) {
- m_NodeStack.Push(pNext);
- break;
- }
- }
+ m_NodeStack.Push(pChild);
+ }
+ while ((ppNode = m_NodeStack.GetTopElement()) != NULL) {
+ NodeType* pNext = TraverseStrategy::GetNextSibling(*ppNode);
+ m_NodeStack.Pop();
+ if (m_NodeStack.GetSize() == 0) {
+ break;
}
- return NULL;
- }
- NodeType* SkipChildrenAndMoveToNext()
- {
- NodeType **ppNode = NULL;
- while ((ppNode = m_NodeStack.GetTopElement()) != NULL) {
- NodeType *pNext = TraverseStrategy::GetNextSibling(*ppNode);
- m_NodeStack.Pop();
- if (m_NodeStack.GetSize() == 0) {
- break;
- }
- if (pNext) {
- m_NodeStack.Push(pNext);
- break;
- }
+ if (pNext) {
+ m_NodeStack.Push(pNext);
+ break;
}
- return GetCurrent();
- }
-protected:
- NodeType *m_pRoot;
- CFX_StackTemplate<NodeType*> m_NodeStack;
+ }
+ }
+ return NULL;
+ }
+ NodeType* SkipChildrenAndMoveToNext() {
+ NodeType** ppNode = NULL;
+ while ((ppNode = m_NodeStack.GetTopElement()) != NULL) {
+ NodeType* pNext = TraverseStrategy::GetNextSibling(*ppNode);
+ m_NodeStack.Pop();
+ if (m_NodeStack.GetSize() == 0) {
+ break;
+ }
+ if (pNext) {
+ m_NodeStack.Push(pNext);
+ break;
+ }
+ }
+ return GetCurrent();
+ }
+
+ protected:
+ NodeType* m_pRoot;
+ CFX_StackTemplate<NodeType*> m_NodeStack;
};
template <class KeyType>
-class CXFA_PtrSetTemplate : private CFX_MapPtrToPtr
-{
-public:
-
- CXFA_PtrSetTemplate() : CFX_MapPtrToPtr(10) {}
-
- int GetCount() const
- {
- return CFX_MapPtrToPtr::GetCount();
- }
+class CXFA_PtrSetTemplate : private CFX_MapPtrToPtr {
+ public:
+ CXFA_PtrSetTemplate() : CFX_MapPtrToPtr(10) {}
+ int GetCount() const { return CFX_MapPtrToPtr::GetCount(); }
- FX_BOOL IsEmpty() const
- {
- return CFX_MapPtrToPtr::IsEmpty();
- }
+ FX_BOOL IsEmpty() const { return CFX_MapPtrToPtr::IsEmpty(); }
- FX_BOOL Lookup(KeyType key) const
- {
- void* pValue = NULL;
- return CFX_MapPtrToPtr::Lookup((void*)key, pValue);
- }
+ FX_BOOL Lookup(KeyType key) const {
+ void* pValue = NULL;
+ return CFX_MapPtrToPtr::Lookup((void*)key, pValue);
+ }
- FX_BOOL operator[](KeyType key)
- {
- return Lookup(key);
- }
+ FX_BOOL operator[](KeyType key) { return Lookup(key); }
- void Add(KeyType key)
- {
- CFX_MapPtrToPtr::SetAt((void*)key, (void*)key);
- }
+ void Add(KeyType key) { CFX_MapPtrToPtr::SetAt((void*)key, (void*)key); }
- FX_BOOL RemoveKey(KeyType key)
- {
- return CFX_MapPtrToPtr::RemoveKey((void*)key);
- }
+ FX_BOOL RemoveKey(KeyType key) {
+ return CFX_MapPtrToPtr::RemoveKey((void*)key);
+ }
- void RemoveAll()
- {
- CFX_MapPtrToPtr::RemoveAll();
- }
+ void RemoveAll() { CFX_MapPtrToPtr::RemoveAll(); }
- FX_POSITION GetStartPosition() const
- {
- return CFX_MapPtrToPtr::GetStartPosition();
- }
+ FX_POSITION GetStartPosition() const {
+ return CFX_MapPtrToPtr::GetStartPosition();
+ }
- void GetNextAssoc(FX_POSITION& rNextPosition, KeyType& rKey) const
- {
- void* pKey = NULL;
- void* pValue = NULL;
- CFX_MapPtrToPtr::GetNextAssoc(rNextPosition, pKey, pValue);
- rKey = (KeyType)(uintptr_t)pKey;
- }
+ void GetNextAssoc(FX_POSITION& rNextPosition, KeyType& rKey) const {
+ void* pKey = NULL;
+ void* pValue = NULL;
+ CFX_MapPtrToPtr::GetNextAssoc(rNextPosition, pKey, pValue);
+ rKey = (KeyType)(uintptr_t)pKey;
+ }
};
class CXFA_Node;
class CXFA_WidgetData;
#include "fxfa_localevalue.h"
-CXFA_Node* XFA_CreateUIChild(CXFA_Node* pNode, XFA_ELEMENT& eWidgetType);
-CXFA_LocaleValue XFA_GetLocaleValue(CXFA_WidgetData* pWidgetData);
-CFX_WideString XFA_NumericLimit(const CFX_WideString &wsValue, int32_t iLead, int32_t iTread);
-FX_DOUBLE XFA_WideStringToDouble(const CFX_WideString &wsStringVal);
-FX_DOUBLE XFA_ByteStringToDouble(const CFX_ByteStringC& szStringVal);
-int32_t XFA_MapRotation(int32_t nRotation);
+CXFA_Node* XFA_CreateUIChild(CXFA_Node* pNode, XFA_ELEMENT& eWidgetType);
+CXFA_LocaleValue XFA_GetLocaleValue(CXFA_WidgetData* pWidgetData);
+CFX_WideString XFA_NumericLimit(const CFX_WideString& wsValue,
+ int32_t iLead,
+ int32_t iTread);
+FX_DOUBLE XFA_WideStringToDouble(const CFX_WideString& wsStringVal);
+FX_DOUBLE XFA_ByteStringToDouble(const CFX_ByteStringC& szStringVal);
+int32_t XFA_MapRotation(int32_t nRotation);
#ifndef XFA_PARSE_HAS_LINEIDENTIFIER
#define XFA_PARSE_HAS_LINEIDENTIFIER
#endif
-FX_BOOL XFA_RecognizeRichText(IFDE_XMLElement* pRichTextXMLNode);
-void XFA_GetPlainTextFromRichText(IFDE_XMLNode *pXMLNode, CFX_WideString &wsPlainText);
-FX_BOOL XFA_FieldIsMultiListBox(CXFA_Node* pFieldNode);
-IFX_Stream* XFA_CreateWideTextRead(const CFX_WideString &wsBuffer);
-FX_BOOL XFA_IsLayoutElement(XFA_ELEMENT eElement, FX_BOOL bLayoutContainer = FALSE);
-FX_BOOL XFA_IsTakingupSpace(XFA_ATTRIBUTEENUM ePresence);
-FX_BOOL XFA_IsFlowingLayout(XFA_ATTRIBUTEENUM eLayout);
-FX_BOOL XFA_IsHorizontalFlow(XFA_ATTRIBUTEENUM eLayout);
-void XFA_DataExporter_DealWithDataGroupNode(CXFA_Node *pDataNode);
-void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode, IFX_Stream* pStream,
- const FX_CHAR* pChecksum = NULL, FX_BOOL bSaveXML = FALSE);
+FX_BOOL XFA_RecognizeRichText(IFDE_XMLElement* pRichTextXMLNode);
+void XFA_GetPlainTextFromRichText(IFDE_XMLNode* pXMLNode,
+ CFX_WideString& wsPlainText);
+FX_BOOL XFA_FieldIsMultiListBox(CXFA_Node* pFieldNode);
+IFX_Stream* XFA_CreateWideTextRead(const CFX_WideString& wsBuffer);
+FX_BOOL XFA_IsLayoutElement(XFA_ELEMENT eElement,
+ FX_BOOL bLayoutContainer = FALSE);
+FX_BOOL XFA_IsTakingupSpace(XFA_ATTRIBUTEENUM ePresence);
+FX_BOOL XFA_IsFlowingLayout(XFA_ATTRIBUTEENUM eLayout);
+FX_BOOL XFA_IsHorizontalFlow(XFA_ATTRIBUTEENUM eLayout);
+void XFA_DataExporter_DealWithDataGroupNode(CXFA_Node* pDataNode);
+void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode,
+ IFX_Stream* pStream,
+ const FX_CHAR* pChecksum = NULL,
+ FX_BOOL bSaveXML = FALSE);
#endif
|