summaryrefslogtreecommitdiff
path: root/xfa/src/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fxfa')
-rw-r--r--xfa/src/fxfa/src/app/xfa_checksum.cpp10
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffConfigAcc.cpp6
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffConfigAcc.h4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffapp.cpp26
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffbarcode.cpp16
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffbarcode.h4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffcheckbutton.cpp16
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffcheckbutton.h6
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp58
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffchoicelist.h16
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdoc.cpp34
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdoc.h10
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdochandler.cpp8
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdochandler.h8
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdocview.cpp78
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdocview.h22
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffexclgroup.cpp2
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffexclgroup.h2
-rw-r--r--xfa/src/fxfa/src/app/xfa_fffield.cpp18
-rw-r--r--xfa/src/fxfa/src/app/xfa_fffield.h14
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffimage.cpp12
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffimage.h2
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffimageedit.cpp18
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffimageedit.h4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffnotify.cpp28
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffnotify.h6
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffpageview.cpp30
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffpageview.h8
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffpath.cpp12
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffpath.h8
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffpushbutton.cpp4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffpushbutton.h4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffsignature.cpp4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffsignature.h4
-rw-r--r--xfa/src/fxfa/src/app/xfa_fftext.cpp10
-rw-r--r--xfa/src/fxfa/src/app/xfa_fftext.h2
-rw-r--r--xfa/src/fxfa/src/app/xfa_fftextedit.cpp36
-rw-r--r--xfa/src/fxfa/src/app/xfa_fftextedit.h4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidget.cpp110
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidget.h20
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp88
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp8
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidgethandler.h6
-rw-r--r--xfa/src/fxfa/src/app/xfa_fontmgr.cpp34
-rw-r--r--xfa/src/fxfa/src/app/xfa_fontmgr.h2
-rw-r--r--xfa/src/fxfa/src/app/xfa_fwladapter.h2
-rw-r--r--xfa/src/fxfa/src/app/xfa_fwltheme.cpp4
-rw-r--r--xfa/src/fxfa/src/app/xfa_fwltheme.h2
-rw-r--r--xfa/src/fxfa/src/app/xfa_rendercontext.cpp6
-rw-r--r--xfa/src/fxfa/src/app/xfa_rendercontext.h4
-rw-r--r--xfa/src/fxfa/src/app/xfa_textlayout.cpp192
-rw-r--r--xfa/src/fxfa/src/app/xfa_textlayout.h64
-rw-r--r--xfa/src/fxfa/src/common/fxfa_localevalue.h4
-rw-r--r--xfa/src/fxfa/src/common/xfa_doclayout.h14
-rw-r--r--xfa/src/fxfa/src/common/xfa_document.h6
-rw-r--r--xfa/src/fxfa/src/common/xfa_fm2jsapi.h2
-rw-r--r--xfa/src/fxfa/src/common/xfa_object.h74
-rw-r--r--xfa/src/fxfa/src/common/xfa_parser.h6
-rw-r--r--xfa/src/fxfa/src/common/xfa_script.h18
-rw-r--r--xfa/src/fxfa/src/common/xfa_utils.h8
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_expression.cpp38
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_expression.h4
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp4
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp816
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.h42
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp24
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_fmparse.h2
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_lexer.cpp20
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_lexer.h2
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_program.cpp8
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_program.h6
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp30
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_simpleexpression.h4
-rw-r--r--xfa/src/fxfa/src/parser/xfa_basic_data.cpp16
-rw-r--r--xfa/src/fxfa/src/parser/xfa_basic_imp.cpp130
-rw-r--r--xfa/src/fxfa/src/parser/xfa_basic_imp.h24
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_datamerger_imp.cpp34
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_imp.cpp8
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_layout_imp.cpp10
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_layout_imp.h10
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_serialize.cpp20
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp10
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp86
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h2
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp62
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.h14
-rw-r--r--xfa/src/fxfa/src/parser/xfa_locale.cpp12
-rw-r--r--xfa/src/fxfa/src/parser/xfa_locale.h8
-rw-r--r--xfa/src/fxfa/src/parser/xfa_localemgr.cpp52
-rw-r--r--xfa/src/fxfa/src/parser/xfa_localevalue.cpp46
-rw-r--r--xfa/src/fxfa/src/parser/xfa_object_imp.cpp470
-rw-r--r--xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp516
-rw-r--r--xfa/src/fxfa/src/parser/xfa_parser_imp.cpp38
-rw-r--r--xfa/src/fxfa/src/parser/xfa_parser_imp.h14
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_eventpseudomodel.cpp2
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp62
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.h2
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_imp.cpp36
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_imp.h10
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp42
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.h2
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp40
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_nodehelper.h12
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp76
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.h34
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_signaturepseudomodel.cpp10
-rw-r--r--xfa/src/fxfa/src/parser/xfa_utils_imp.cpp18
107 files changed, 2078 insertions, 2078 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_checksum.cpp b/xfa/src/fxfa/src/app/xfa_checksum.cpp
index 0ed07bb579..9f4345f408 100644
--- a/xfa/src/fxfa/src/app/xfa_checksum.cpp
+++ b/xfa/src/fxfa/src/app/xfa_checksum.cpp
@@ -112,7 +112,7 @@ void CXFA_SAXReaderHandler::OnTargetData(FX_LPVOID pTag, FX_SAXNODE eType, FX_BS
}
void CXFA_SAXReaderHandler::UpdateChecksum(FX_BOOL bCheckSpace)
{
- FX_INT32 iLength = m_SAXContext.m_TextBuf.GetLength();
+ int32_t iLength = m_SAXContext.m_TextBuf.GetLength();
if (iLength < 1) {
return;
}
@@ -120,7 +120,7 @@ void CXFA_SAXReaderHandler::UpdateChecksum(FX_BOOL bCheckSpace)
FX_BOOL bUpdata = TRUE;
if (bCheckSpace) {
bUpdata = FALSE;
- for (FX_INT32 i = 0; i < iLength; i++) {
+ for (int32_t i = 0; i < iLength; i++) {
bUpdata = (pBuffer[i] > 0x20);
if (bUpdata) {
break;
@@ -148,7 +148,7 @@ CXFA_ChecksumContext::~CXFA_ChecksumContext()
FX_BOOL CXFA_ChecksumContext::StartChecksum()
{
FinishChecksum();
- m_pByteContext = FX_Alloc(FX_BYTE, 128);
+ m_pByteContext = FX_Alloc(uint8_t, 128);
FXSYS_assert(m_pByteContext != NULL);
CRYPT_SHA1Start(m_pByteContext);
m_bsChecksum.Empty();
@@ -180,10 +180,10 @@ void CXFA_ChecksumContext::FinishChecksum()
m_pSAXReader = NULL;
}
if (m_pByteContext) {
- FX_BYTE digest[20];
+ uint8_t digest[20];
FXSYS_memset(digest, 0, 20);
CRYPT_SHA1Finish(m_pByteContext, digest);
- FX_INT32 nLen = FX_Base64EncodeA(digest, 20, NULL);
+ int32_t nLen = FX_Base64EncodeA(digest, 20, NULL);
FX_LPSTR pBuffer = m_bsChecksum.GetBuffer(nLen);
FX_Base64EncodeA(digest, 20, pBuffer);
m_bsChecksum.ReleaseBuffer(nLen);
diff --git a/xfa/src/fxfa/src/app/xfa_ffConfigAcc.cpp b/xfa/src/fxfa/src/app/xfa_ffConfigAcc.cpp
index de46a33b32..ad68812aa9 100644
--- a/xfa/src/fxfa/src/app/xfa_ffConfigAcc.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffConfigAcc.cpp
@@ -15,20 +15,20 @@ CXFA_FFConfigAcc::CXFA_FFConfigAcc(CXFA_Node *pNode)
CXFA_FFConfigAcc::~CXFA_FFConfigAcc()
{
}
-FX_INT32 CXFA_FFConfigAcc::CountChildren()
+int32_t CXFA_FFConfigAcc::CountChildren()
{
GetPsMapNode();
if (m_pPsMapNode == NULL) {
return 0;
}
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
CXFA_Node* pNode = m_pPsMapNode->GetNodeItem(XFA_NODEITEM_FirstChild);
for (; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
iCount++;
}
return iCount;
}
-FX_BOOL CXFA_FFConfigAcc::GetFontInfo(FX_INT32 index, CFX_WideString &wsFontFamily, CFX_WideString &wsPsName, FX_BOOL bBold, FX_BOOL bItalic)
+FX_BOOL CXFA_FFConfigAcc::GetFontInfo(int32_t index, CFX_WideString &wsFontFamily, CFX_WideString &wsPsName, FX_BOOL bBold, FX_BOOL bItalic)
{
if (index < 0 || index >= CountChildren()) {
return FALSE;
diff --git a/xfa/src/fxfa/src/app/xfa_ffConfigAcc.h b/xfa/src/fxfa/src/app/xfa_ffConfigAcc.h
index 73237b9f01..5a21fd3a00 100644
--- a/xfa/src/fxfa/src/app/xfa_ffConfigAcc.h
+++ b/xfa/src/fxfa/src/app/xfa_ffConfigAcc.h
@@ -11,8 +11,8 @@ class CXFA_FFConfigAcc
public:
CXFA_FFConfigAcc(CXFA_Node *pNode);
~CXFA_FFConfigAcc();
- FX_INT32 CountChildren();
- FX_BOOL GetFontInfo(FX_INT32 index, CFX_WideString &wsFontFamily, CFX_WideString &wsPsName, FX_BOOL bBold, FX_BOOL bItalic);
+ int32_t CountChildren();
+ FX_BOOL GetFontInfo(int32_t index, CFX_WideString &wsFontFamily, CFX_WideString &wsPsName, FX_BOOL bBold, FX_BOOL bItalic);
private:
void GetPsMapNode();
CXFA_Node *m_pNode;
diff --git a/xfa/src/fxfa/src/app/xfa_ffapp.cpp b/xfa/src/fxfa/src/app/xfa_ffapp.cpp
index ea5136955b..2fc52722ef 100644
--- a/xfa/src/fxfa/src/app/xfa_ffapp.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffapp.cpp
@@ -28,10 +28,10 @@ FX_FILESIZE CXFA_FileRead::GetSize()
if (m_StreamSize.GetSize() > 0) {
return m_dwSize;
}
- FX_INT32 iCount = m_Streams.GetSize();
+ int32_t iCount = m_Streams.GetSize();
FX_DWORD iBufferSize = 4096;
- FX_LPBYTE pBuf = FX_Alloc(FX_BYTE, iBufferSize);
- for (FX_INT32 i = 0; i < iCount; i++) {
+ FX_LPBYTE pBuf = FX_Alloc(uint8_t, iBufferSize);
+ for (int32_t i = 0; i < iCount; i++) {
CPDF_StreamFilter* pStreamFilter = m_Streams[i]->GetStreamFilter(FALSE);
FX_DWORD dwCurSize = 0;
while (TRUE) {
@@ -51,8 +51,8 @@ FX_FILESIZE CXFA_FileRead::GetSize()
FX_BOOL CXFA_FileRead::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
{
FX_FILESIZE dwLen = 0;
- FX_INT32 iCount = m_Streams.GetSize();
- FX_INT32 i = 0;
+ int32_t iCount = m_Streams.GetSize();
+ int32_t i = 0;
for (; i < iCount; i++) {
dwLen += m_StreamSize[i];
if (dwLen > offset) {
@@ -65,7 +65,7 @@ FX_BOOL CXFA_FileRead::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
}
CPDF_StreamFilter* pStreamFilter = m_Streams[i]->GetStreamFilter(FALSE);
if ((offset -= dwLen) > 0) {
- FX_LPBYTE pBuf = FX_Alloc(FX_BYTE, offset);
+ FX_LPBYTE pBuf = FX_Alloc(uint8_t, offset);
FX_DWORD dwRead = pStreamFilter->ReadBlock(pBuf, offset);
FX_Free(pBuf);
}
@@ -76,7 +76,7 @@ FX_BOOL CXFA_FileRead::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
return TRUE;
}
FX_DWORD dwReadSize = dwHadRead;
- for (FX_INT32 iStart = i + 1; iStart < iCount; iStart++) {
+ for (int32_t iStart = i + 1; iStart < iCount; iStart++) {
CPDF_StreamFilter* pStreamFilter = m_Streams[iStart]->GetStreamFilter(FALSE);
FX_DWORD dwHadRead = pStreamFilter->ReadBlock(((FX_LPBYTE)buffer) + dwReadSize, size);
delete pStreamFilter;
@@ -90,8 +90,8 @@ FX_BOOL CXFA_FileRead::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
}
CXFA_FileRead2::CXFA_FileRead2(const CFX_ArrayTemplate<CPDF_Stream*> &streams)
{
- FX_INT32 iCount = streams.GetSize();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = streams.GetSize();
+ for (int32_t i = 0; i < iCount; i++) {
CPDF_StreamAcc &acc = m_Data.Add();
acc.LoadAllData(streams[i]);
}
@@ -99,8 +99,8 @@ CXFA_FileRead2::CXFA_FileRead2(const CFX_ArrayTemplate<CPDF_Stream*> &streams)
FX_FILESIZE CXFA_FileRead2::GetSize()
{
FX_DWORD dwSize = 0;
- FX_INT32 iCount = m_Data.GetSize();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = m_Data.GetSize();
+ for (int32_t i = 0; i < iCount; i++) {
CPDF_StreamAcc &acc = m_Data[i];
dwSize += acc.GetSize();
}
@@ -108,8 +108,8 @@ FX_FILESIZE CXFA_FileRead2::GetSize()
}
FX_BOOL CXFA_FileRead2::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
{
- FX_INT32 iCount = m_Data.GetSize();
- FX_INT32 index = 0;
+ int32_t iCount = m_Data.GetSize();
+ int32_t index = 0;
while (index < iCount) {
CPDF_StreamAcc &acc = m_Data[index];
FX_FILESIZE dwSize = acc.GetSize();
diff --git a/xfa/src/fxfa/src/app/xfa_ffbarcode.cpp b/xfa/src/fxfa/src/app/xfa_ffbarcode.cpp
index f87009daf3..39f11b5a32 100644
--- a/xfa/src/fxfa/src/app/xfa_ffbarcode.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffbarcode.cpp
@@ -40,7 +40,7 @@ FX_BOOL CXFA_FFBarcode::LoadWidget()
m_pNormalWidget->UnlockUpdate();
return CXFA_FFField::LoadWidget();
}
-void CXFA_FFBarcode::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , FX_INT32 iRotate )
+void CXFA_FFBarcode::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , int32_t iRotate )
{
if (!IsMatchVisibleStatus(dwStatus)) {
return;
@@ -69,7 +69,7 @@ void CXFA_FFBarcode::UpdateWidgetProperty()
XFA_LPCBARCODETYPEENUMINFO pBarcodeTypeInfo = XFA_GetBarcodeTypeByName(wsType);
pBarCodeWidget->SetType(pBarcodeTypeInfo->eBCType);
CXFA_WidgetAcc *pAcc = GetDataAcc();
- FX_INT32 intVal;
+ int32_t intVal;
FX_CHAR charVal;
FX_BOOL boolVal;
FX_FLOAT floatVal;
@@ -107,7 +107,7 @@ void CXFA_FFBarcode::UpdateWidgetProperty()
pBarCodeWidget->SetTruncated(boolVal);
}
if (pAcc->GetBarcodeAttribute_WideNarrowRatio(floatVal)) {
- pBarCodeWidget->SetWideNarrowRatio((FX_INT32)floatVal);
+ pBarCodeWidget->SetWideNarrowRatio((int32_t)floatVal);
}
if (pBarcodeTypeInfo->eName == XFA_BARCODETYPE_code3Of9
|| pBarcodeTypeInfo->eName == XFA_BARCODETYPE_ean8
@@ -199,17 +199,17 @@ extern const XFA_BARCODETYPEENUMINFO g_XFABarCodeTypeEnumData[] = {
{0xfaeaf37f, L"postUSStandard", XFA_BARCODETYPE_postUSStandard, BC_UNKNOWN},
{0xfb48155c, L"code3Of9", XFA_BARCODETYPE_code3Of9, BC_CODE39},
};
-extern const FX_INT32 g_iXFABarcodeTypeCount = sizeof(g_XFABarCodeTypeEnumData) / sizeof(XFA_BARCODETYPEENUMINFO);
+extern const int32_t g_iXFABarcodeTypeCount = sizeof(g_XFABarCodeTypeEnumData) / sizeof(XFA_BARCODETYPEENUMINFO);
static XFA_LPCBARCODETYPEENUMINFO XFA_GetBarcodeTypeByName(FX_WSTR wsName)
{
- FX_INT32 iLength = wsName.GetLength();
+ int32_t iLength = wsName.GetLength();
if (iLength == 0) {
return NULL;
}
- FX_UINT32 uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength, TRUE);
- FX_INT32 iStart = 0, iEnd = g_iXFABarcodeTypeCount - 1;
+ uint32_t uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength, TRUE);
+ int32_t iStart = 0, iEnd = g_iXFABarcodeTypeCount - 1;
do {
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iMid = (iStart + iEnd) / 2;
XFA_LPCBARCODETYPEENUMINFO pInfo = g_XFABarCodeTypeEnumData + iMid;
if (uHash == pInfo->uHash) {
return pInfo;
diff --git a/xfa/src/fxfa/src/app/xfa_ffbarcode.h b/xfa/src/fxfa/src/app/xfa_ffbarcode.h
index 35b4212efa..d6589c090a 100644
--- a/xfa/src/fxfa/src/app/xfa_ffbarcode.h
+++ b/xfa/src/fxfa/src/app/xfa_ffbarcode.h
@@ -13,7 +13,7 @@ public:
CXFA_FFBarcode(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);
virtual ~CXFA_FFBarcode();
virtual FX_BOOL LoadWidget();
- virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, FX_INT32 iRotate = 0);
+ virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, int32_t iRotate = 0);
virtual void UpdateWidgetProperty();
virtual FX_BOOL OnLButtonDown(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnRButtonDown(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
@@ -83,7 +83,7 @@ enum XFA_BARCODETYPEENUM {
XFA_BARCODETYPE_upsMaxicode
};
struct XFA_BARCODETYPEENUMINFO {
- FX_UINT32 uHash;
+ uint32_t uHash;
FX_LPCWSTR pName;
XFA_BARCODETYPEENUM eName;
BC_TYPE eBCType;
diff --git a/xfa/src/fxfa/src/app/xfa_ffcheckbutton.cpp b/xfa/src/fxfa/src/app/xfa_ffcheckbutton.cpp
index 6115d61bcd..3cb3628aca 100644
--- a/xfa/src/fxfa/src/app/xfa_ffcheckbutton.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffcheckbutton.cpp
@@ -54,7 +54,7 @@ void CXFA_FFCheckButton::UpdateWidgetProperty()
FX_FLOAT fSize = m_pDataAcc->GetCheckButtonSize();
pCheckBox->SetBoxSize(fSize);
FX_DWORD dwStyleEx = FWL_STYLEEXT_CKB_SignShapeCross;
- FX_INT32 iCheckMark = m_pDataAcc->GetCheckButtonMark();
+ int32_t iCheckMark = m_pDataAcc->GetCheckButtonMark();
switch(iCheckMark) {
case XFA_ATTRIBUTEENUM_Check:
dwStyleEx = FWL_STYLEEXT_CKB_SignShapeCheck;
@@ -74,7 +74,7 @@ void CXFA_FFCheckButton::UpdateWidgetProperty()
dwStyleEx = FWL_STYLEEXT_CKB_SignShapeStar;
break;
default: {
- FX_INT32 iShape = m_pDataAcc->GetCheckButtonShape();
+ int32_t iShape = m_pDataAcc->GetCheckButtonShape();
if (iShape == XFA_ATTRIBUTEENUM_Round) {
dwStyleEx = FWL_STYLEEXT_CKB_SignShapeCircle;
}
@@ -96,7 +96,7 @@ FX_BOOL CXFA_FFCheckButton::LayoutWidget()
if (mgWidget.IsExistInXML()) {
XFA_RectWidthoutMargin(rtWidget, mgWidget);
}
- FX_INT32 iCapPlacement = -1;
+ int32_t iCapPlacement = -1;
FX_FLOAT fCapReserve = 0;
CXFA_Caption caption = m_pDataAcc->GetCaption();
if (caption.IsExistInXML() && caption.GetPresence()) {
@@ -111,8 +111,8 @@ FX_BOOL CXFA_FFCheckButton::LayoutWidget()
}
}
}
- FX_INT32 iHorzAlign = XFA_ATTRIBUTEENUM_Left;
- FX_INT32 iVertAlign = XFA_ATTRIBUTEENUM_Top;
+ int32_t iHorzAlign = XFA_ATTRIBUTEENUM_Left;
+ int32_t iVertAlign = XFA_ATTRIBUTEENUM_Top;
if (CXFA_Para para = m_pDataAcc->GetPara()) {
iHorzAlign = para.GetHorizontalAlign();
iVertAlign = para.GetVerticalAlign();
@@ -194,7 +194,7 @@ void CXFA_FFCheckButton::CapLeftRightPlacement(CXFA_Margin mgCap)
m_rtCaption.width = -m_rtCaption.width;
}
}
-void CXFA_FFCheckButton::AddUIMargin(FX_INT32 iCapPlacement)
+void CXFA_FFCheckButton::AddUIMargin(int32_t iCapPlacement)
{
CFX_RectF rtUIMargin;
m_pDataAcc->GetUIMargin(rtUIMargin);
@@ -217,7 +217,7 @@ void CXFA_FFCheckButton::AddUIMargin(FX_INT32 iCapPlacement)
m_rtUI.height += 2 * (fTopAddBottom - m_rtUI.height);
}
}
-void CXFA_FFCheckButton::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , FX_INT32 iRotate )
+void CXFA_FFCheckButton::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , int32_t iRotate )
{
if (!IsMatchVisibleStatus(dwStatus)) {
return;
@@ -296,7 +296,7 @@ FX_BOOL CXFA_FFCheckButton::UpdateFWLData()
m_pNormalWidget->Update();
return TRUE;
}
-FX_INT32 CXFA_FFCheckButton::OnProcessMessage(CFWL_Message *pMessage)
+int32_t CXFA_FFCheckButton::OnProcessMessage(CFWL_Message *pMessage)
{
return m_pOldDelegate->OnProcessMessage(pMessage);
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffcheckbutton.h b/xfa/src/fxfa/src/app/xfa_ffcheckbutton.h
index 5c32a6d966..a3abfb6891 100644
--- a/xfa/src/fxfa/src/app/xfa_ffcheckbutton.h
+++ b/xfa/src/fxfa/src/app/xfa_ffcheckbutton.h
@@ -12,7 +12,7 @@ class CXFA_FFCheckButton : public CXFA_FFField
public:
CXFA_FFCheckButton(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);
virtual ~CXFA_FFCheckButton();
- virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, FX_INT32 iRotate = 0);
+ virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, int32_t iRotate = 0);
virtual FX_BOOL LoadWidget();
virtual FX_BOOL LayoutWidget();
@@ -20,7 +20,7 @@ public:
virtual void UpdateWidgetProperty();
virtual FX_BOOL OnLButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
void SetFWLCheckState(XFA_CHECKSTATE eCheckState);
- virtual FX_INT32 OnProcessMessage(CFWL_Message *pMessage);
+ virtual int32_t OnProcessMessage(CFWL_Message *pMessage);
virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent);
virtual FWL_ERR OnDrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);
@@ -28,7 +28,7 @@ protected:
virtual FX_BOOL CommitData();
virtual FX_BOOL IsDataChanged();
void CapLeftRightPlacement(CXFA_Margin mgCap);
- void AddUIMargin(FX_INT32 iCapPlacement);
+ void AddUIMargin(int32_t iCapPlacement);
XFA_CHECKSTATE FWLState2XFAState();
IFWL_WidgetDelegate* m_pOldDelegate;
CFX_RectF m_rtCheckBox;
diff --git a/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp b/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp
index 81b7ccb76f..47685a28a7 100644
--- a/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp
@@ -40,8 +40,8 @@ FX_BOOL CXFA_FFListBox::LoadWidget()
m_pNormalWidget->LockUpdate();
CFX_WideStringArray wsLabelArray;
m_pDataAcc->GetChoiceListItems(wsLabelArray, FALSE);
- FX_INT32 iItems = wsLabelArray.GetSize();
- for (FX_INT32 i = 0; i < iItems; i++) {
+ int32_t iItems = wsLabelArray.GetSize();
+ for (int32_t i = 0; i < iItems; i++) {
pListBox->AddString(wsLabelArray[i]);
}
FX_DWORD dwExtendedStyle = FWL_STYLEEXT_LTB_ShowScrollBarFocus;
@@ -52,8 +52,8 @@ FX_BOOL CXFA_FFListBox::LoadWidget()
m_pNormalWidget->ModifyStylesEx(dwExtendedStyle, 0xFFFFFFFF);
CFX_Int32Array iSelArray;
m_pDataAcc->GetSelectedItems(iSelArray);
- FX_INT32 iSelCount = iSelArray.GetSize();
- for (FX_INT32 j = 0; j < iSelCount; j++) {
+ int32_t iSelCount = iSelArray.GetSize();
+ for (int32_t j = 0; j < iSelCount; j++) {
FWL_HLISTITEM item = pListBox->GetItem(iSelArray[j]);
pListBox->SetSelItem(item, TRUE);
}
@@ -73,9 +73,9 @@ FX_BOOL CXFA_FFListBox::CommitData()
{
FXSYS_assert(m_pNormalWidget != NULL);
CFWL_ListBox* pListBox = (CFWL_ListBox*)m_pNormalWidget;
- FX_INT32 iSels = pListBox->CountSelItems();
+ int32_t iSels = pListBox->CountSelItems();
CFX_Int32Array iSelArray;
- for (FX_INT32 i = 0; i < iSels; i++) {
+ for (int32_t i = 0; i < iSels; i++) {
iSelArray.Add(pListBox->GetSelIndex(i));
}
m_pDataAcc->SetSelectdItems(iSelArray, TRUE);
@@ -85,11 +85,11 @@ FX_BOOL CXFA_FFListBox::IsDataChanged()
{
CFX_Int32Array iSelArray;
m_pDataAcc->GetSelectedItems(iSelArray);
- FX_INT32 iOldSels = iSelArray.GetSize();
+ int32_t iOldSels = iSelArray.GetSize();
CFWL_ListBox* pListBox = (CFWL_ListBox*)m_pNormalWidget;
- FX_INT32 iSels = pListBox->CountSelItems();
+ int32_t iSels = pListBox->CountSelItems();
if (iOldSels == iSels) {
- FX_INT32 iIndex = 0;
+ int32_t iIndex = 0;
for (; iIndex < iSels; iIndex++) {
FWL_HLISTITEM hlistItem = pListBox->GetItem(iSelArray[iIndex]);
if(!(pListBox->GetItemStates(hlistItem) && FWL_ITEMSTATE_LTB_Selected)) {
@@ -106,7 +106,7 @@ FX_DWORD CXFA_FFListBox::GetAlignment()
{
FX_DWORD dwExtendedStyle = 0;
if (CXFA_Para para = m_pDataAcc->GetPara()) {
- FX_INT32 iHorz = para.GetHorizontalAlign();
+ int32_t iHorz = para.GetHorizontalAlign();
switch(iHorz) {
case XFA_ATTRIBUTEENUM_Center:
dwExtendedStyle |= FWL_STYLEEXT_LTB_CenterAlign;
@@ -136,13 +136,13 @@ FX_BOOL CXFA_FFListBox::UpdateFWLData()
CFX_ArrayTemplate<FWL_HLISTITEM> selItemArray;
CFX_Int32Array iSelArray;
m_pDataAcc->GetSelectedItems(iSelArray);
- FX_INT32 iSelCount = iSelArray.GetSize();
- for (FX_INT32 j = 0; j < iSelCount; j++) {
+ int32_t iSelCount = iSelArray.GetSize();
+ for (int32_t j = 0; j < iSelCount; j++) {
FWL_HLISTITEM lpItemSel = pListBox->GetSelItem(iSelArray[j]);
selItemArray.Add(lpItemSel);
}
pListBox->SetSelItem(pListBox->GetSelItem(-1), FALSE);
- for(FX_INT32 i = 0; i < iSelCount; i++) {
+ for(int32_t i = 0; i < iSelCount; i++) {
((CFWL_ListBox*)m_pNormalWidget)->SetSelItem(selItemArray[i], TRUE);
}
m_pNormalWidget->Update();
@@ -155,27 +155,27 @@ void CXFA_FFListBox::OnSelectChanged(IFWL_Widget *pWidget, const CFX_Int32Array
eParam.m_pTarget = m_pDataAcc;
m_pDataAcc->GetValue(eParam.m_wsPrevText, XFA_VALUEPICTURE_Raw);
CFWL_ListBox* pListBox = (CFWL_ListBox*)m_pNormalWidget;
- FX_INT32 iSels = pListBox->CountSelItems();
+ int32_t iSels = pListBox->CountSelItems();
if (iSels > 0) {
pListBox->GetItemText(pListBox->GetSelItem(0), eParam.m_wsNewText);
}
m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam);
}
-void CXFA_FFListBox::SetItemState(FX_INT32 nIndex, FX_BOOL bSelected)
+void CXFA_FFListBox::SetItemState(int32_t nIndex, FX_BOOL bSelected)
{
FWL_HLISTITEM item = ((CFWL_ListBox*)m_pNormalWidget)->GetSelItem(nIndex);
((CFWL_ListBox*)m_pNormalWidget)->SetSelItem(item, bSelected);
m_pNormalWidget->Update();
AddInvalidateRect();
}
-void CXFA_FFListBox::InsertItem(FX_WSTR wsLabel, FX_INT32 nIndex )
+void CXFA_FFListBox::InsertItem(FX_WSTR wsLabel, int32_t nIndex )
{
CFX_WideString wsTemp(wsLabel);
((CFWL_ListBox*)m_pNormalWidget)->AddString(wsTemp);
m_pNormalWidget->Update();
AddInvalidateRect();
}
-void CXFA_FFListBox::DeleteItem(FX_INT32 nIndex)
+void CXFA_FFListBox::DeleteItem(int32_t nIndex)
{
if (nIndex < 0) {
((CFWL_ListBox*)m_pNormalWidget)->DeleteAll();
@@ -185,7 +185,7 @@ void CXFA_FFListBox::DeleteItem(FX_INT32 nIndex)
m_pNormalWidget->Update();
AddInvalidateRect();
}
-FX_INT32 CXFA_FFListBox::OnProcessMessage(CFWL_Message *pMessage)
+int32_t CXFA_FFListBox::OnProcessMessage(CFWL_Message *pMessage)
{
return m_pOldDelegate->OnProcessMessage(pMessage);
}
@@ -260,13 +260,13 @@ FX_BOOL CXFA_FFComboBox::LoadWidget()
m_pNormalWidget->LockUpdate();
CFX_WideStringArray wsLabelArray;
m_pDataAcc->GetChoiceListItems(wsLabelArray, FALSE);
- FX_INT32 iItems = wsLabelArray.GetSize();
- for (FX_INT32 i = 0; i < iItems; i++) {
+ int32_t iItems = wsLabelArray.GetSize();
+ for (int32_t i = 0; i < iItems; i++) {
pComboBox->AddString(wsLabelArray[i]);
}
CFX_Int32Array iSelArray;
m_pDataAcc->GetSelectedItems(iSelArray);
- FX_INT32 iSelCount = iSelArray.GetSize();
+ int32_t iSelCount = iSelArray.GetSize();
if (iSelCount > 0) {
pComboBox->SetCurSel(iSelArray[0]);
} else {
@@ -334,7 +334,7 @@ FX_BOOL CXFA_FFComboBox::IsDataChanged()
CFWL_ComboBox* pFWLcombobox = ((CFWL_ComboBox*)m_pNormalWidget);
CFX_WideString wsText;
pFWLcombobox->GetEditText(wsText);
- FX_INT32 iCursel = pFWLcombobox->GetCurSel();
+ int32_t iCursel = pFWLcombobox->GetCurSel();
if (iCursel >= 0) {
CFX_WideString wsSel;
pFWLcombobox->GetTextByIndex(iCursel, wsSel);
@@ -362,7 +362,7 @@ FX_DWORD CXFA_FFComboBox::GetAlignment()
{
FX_DWORD dwExtendedStyle = 0;
if (CXFA_Para para = m_pDataAcc->GetPara()) {
- FX_INT32 iHorz = para.GetHorizontalAlign();
+ int32_t iHorz = para.GetHorizontalAlign();
switch(iHorz) {
case XFA_ATTRIBUTEENUM_Center:
dwExtendedStyle |= FWL_STYLEEXT_CMB_EditHCenter | FWL_STYLEEXT_CMB_ListItemCenterAlign;
@@ -380,7 +380,7 @@ FX_DWORD CXFA_FFComboBox::GetAlignment()
dwExtendedStyle |= FWL_STYLEEXT_CMB_EditHNear | FWL_STYLEEXT_CMB_ListItemLeftAlign;
break;
}
- FX_INT32 iVert = para.GetVerticalAlign();
+ int32_t iVert = para.GetVerticalAlign();
switch(iVert) {
case XFA_ATTRIBUTEENUM_Middle:
dwExtendedStyle |= FWL_STYLEEXT_CMB_EditVCenter;
@@ -402,7 +402,7 @@ FX_BOOL CXFA_FFComboBox::UpdateFWLData()
}
CFX_Int32Array iSelArray;
m_pDataAcc->GetSelectedItems(iSelArray);
- FX_INT32 iSelCount = iSelArray.GetSize();
+ int32_t iSelCount = iSelArray.GetSize();
if (iSelCount > 0) {
((CFWL_ComboBox*)m_pNormalWidget)->SetCurSel(iSelArray[0]);
} else {
@@ -473,7 +473,7 @@ FX_BOOL CXFA_FFComboBox::DeSelect()
{
return ((CFWL_ComboBox*)m_pNormalWidget)->EditDeSelect();
}
-void CXFA_FFComboBox::SetItemState(FX_INT32 nIndex, FX_BOOL bSelected)
+void CXFA_FFComboBox::SetItemState(int32_t nIndex, FX_BOOL bSelected)
{
if (bSelected) {
((CFWL_ComboBox*)m_pNormalWidget)->SetCurSel(nIndex);
@@ -483,13 +483,13 @@ void CXFA_FFComboBox::SetItemState(FX_INT32 nIndex, FX_BOOL bSelected)
m_pNormalWidget->Update();
AddInvalidateRect();
}
-void CXFA_FFComboBox::InsertItem(FX_WSTR wsLabel, FX_INT32 nIndex )
+void CXFA_FFComboBox::InsertItem(FX_WSTR wsLabel, int32_t nIndex )
{
((CFWL_ComboBox*)m_pNormalWidget)->AddString(wsLabel);
m_pNormalWidget->Update();
AddInvalidateRect();
}
-void CXFA_FFComboBox::DeleteItem(FX_INT32 nIndex)
+void CXFA_FFComboBox::DeleteItem(int32_t nIndex)
{
if (nIndex < 0) {
((CFWL_ComboBox*)m_pNormalWidget)->RemoveAll();
@@ -533,7 +533,7 @@ void CXFA_FFComboBox::OnAddDoRecord(IFWL_Widget *pWidget)
{
GetDoc()->GetDocProvider()->AddDoRecord(this);
}
-FX_INT32 CXFA_FFComboBox::OnProcessMessage(CFWL_Message *pMessage)
+int32_t CXFA_FFComboBox::OnProcessMessage(CFWL_Message *pMessage)
{
return m_pOldDelegate->OnProcessMessage(pMessage);
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffchoicelist.h b/xfa/src/fxfa/src/app/xfa_ffchoicelist.h
index 72463ec513..c6ed12b668 100644
--- a/xfa/src/fxfa/src/app/xfa_ffchoicelist.h
+++ b/xfa/src/fxfa/src/app/xfa_ffchoicelist.h
@@ -20,10 +20,10 @@ protected:
FX_DWORD GetAlignment();
public:
void OnSelectChanged(IFWL_Widget *pWidget, const CFX_Int32Array &arrSels);
- void SetItemState(FX_INT32 nIndex, FX_BOOL bSelected);
- void InsertItem(FX_WSTR wsLabel, FX_INT32 nIndex = -1);
- void DeleteItem(FX_INT32 nIndex);
- virtual FX_INT32 OnProcessMessage(CFWL_Message *pMessage);
+ void SetItemState(int32_t nIndex, FX_BOOL bSelected);
+ void InsertItem(FX_WSTR wsLabel, int32_t nIndex = -1);
+ void DeleteItem(int32_t nIndex);
+ virtual int32_t OnProcessMessage(CFWL_Message *pMessage);
virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent);
virtual FWL_ERR OnDrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);
protected:
@@ -70,10 +70,10 @@ public:
void OnPreOpen(IFWL_Widget *pWidget);
void OnPostOpen(IFWL_Widget *pWidget);
void OnAddDoRecord(IFWL_Widget *pWidget);
- void SetItemState(FX_INT32 nIndex, FX_BOOL bSelected);
- void InsertItem(FX_WSTR wsLabel, FX_INT32 nIndex = -1);
- void DeleteItem(FX_INT32 nIndex);
- virtual FX_INT32 OnProcessMessage(CFWL_Message *pMessage);
+ void SetItemState(int32_t nIndex, FX_BOOL bSelected);
+ void InsertItem(FX_WSTR wsLabel, int32_t nIndex = -1);
+ void DeleteItem(int32_t nIndex);
+ virtual int32_t OnProcessMessage(CFWL_Message *pMessage);
virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent);
virtual FWL_ERR OnDrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);
protected:
diff --git a/xfa/src/fxfa/src/app/xfa_ffdoc.cpp b/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
index 4ca1007dab..10ed9d85bc 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
@@ -31,15 +31,15 @@ FX_DWORD CXFA_FFDoc::GetDocType()
{
return m_dwDocType;
}
-FX_INT32 CXFA_FFDoc::StartLoad()
+int32_t CXFA_FFDoc::StartLoad()
{
m_pNotify = FX_NEW CXFA_FFNotify(this);
IXFA_DocParser* pDocParser = IXFA_DocParser::Create(m_pNotify);
- FX_INT32 iStatus = pDocParser->StartParse(m_pStream);
+ int32_t iStatus = pDocParser->StartParse(m_pStream);
m_pDocument = pDocParser->GetDocument();
return iStatus;
}
-FX_BOOL XFA_GetPDFContentsFromPDFXML(IFDE_XMLNode *pPDFElement, FX_LPBYTE &pByteBuffer, FX_INT32& iBufferSize)
+FX_BOOL XFA_GetPDFContentsFromPDFXML(IFDE_XMLNode *pPDFElement, FX_LPBYTE &pByteBuffer, int32_t& iBufferSize)
{
IFDE_XMLElement* pDocumentElement = NULL;
for (IFDE_XMLNode *pXMLNode = pPDFElement->GetNodeItem(IFDE_XMLNode::FirstChild); pXMLNode; pXMLNode = pXMLNode->GetNodeItem(IFDE_XMLNode::NextSibling)) {
@@ -74,7 +74,7 @@ FX_BOOL XFA_GetPDFContentsFromPDFXML(IFDE_XMLNode *pPDFElement, FX_LPBYTE &pByte
CFX_WideString wsPDFContent;
pChunkElement->GetTextData(wsPDFContent);
iBufferSize = FX_Base64DecodeW(wsPDFContent, wsPDFContent.GetLength(), NULL);
- pByteBuffer = FX_Alloc(FX_BYTE, iBufferSize + 1);
+ pByteBuffer = FX_Alloc(uint8_t, iBufferSize + 1);
if (!pByteBuffer) {
return FALSE;
}
@@ -98,9 +98,9 @@ void XFA_XPDPacket_MergeRootNode(CXFA_Node *pOriginRoot, CXFA_Node* pNewRoot)
}
}
}
-FX_INT32 CXFA_FFDoc::DoLoad(IFX_Pause *pPause )
+int32_t CXFA_FFDoc::DoLoad(IFX_Pause *pPause )
{
- FX_INT32 iStatus = m_pDocument->GetParser()->DoParse(pPause);
+ int32_t iStatus = m_pDocument->GetParser()->DoParse(pPause);
if (iStatus == XFA_PARSESTATUS_Done && !m_pPDFDoc) {
CXFA_Node* pPDFNode = (CXFA_Node*)m_pDocument->GetXFANode(XFA_HASHCODE_Pdf);
if (!pPDFNode) {
@@ -110,7 +110,7 @@ FX_INT32 CXFA_FFDoc::DoLoad(IFX_Pause *pPause )
if (pPDFXML->GetType() != FDE_XMLNODE_Element) {
return XFA_PARSESTATUS_SyntaxErr;
}
- FX_INT32 iBufferSize = 0;
+ int32_t iBufferSize = 0;
FX_LPBYTE pByteBuffer = NULL;
IFX_FileRead* pXFAReader = NULL;
if (XFA_GetPDFContentsFromPDFXML(pPDFXML, pByteBuffer, iBufferSize)) {
@@ -183,10 +183,10 @@ void CXFA_FFDoc::StopLoad()
}
IXFA_DocView* CXFA_FFDoc::CreateDocView(FX_DWORD dwView )
{
- CXFA_FFDocView* pDocView = (CXFA_FFDocView*)m_mapTypeToDocView.GetValueAt((FX_LPVOID)(FX_UINTPTR)dwView);
+ CXFA_FFDocView* pDocView = (CXFA_FFDocView*)m_mapTypeToDocView.GetValueAt((FX_LPVOID)(uintptr_t)dwView);
if (!pDocView) {
pDocView = FX_NEW CXFA_FFDocView(this);
- m_mapTypeToDocView.SetAt((FX_LPVOID)(FX_UINTPTR)dwView, pDocView);
+ m_mapTypeToDocView.SetAt((FX_LPVOID)(uintptr_t)dwView, pDocView);
}
return pDocView;
}
@@ -237,7 +237,7 @@ FX_BOOL CXFA_FFDoc::OpenDoc(CPDF_Document* pPDFDoc)
if (pElementXFA == NULL) {
return FALSE;
}
- FX_INT32 iObjType = pElementXFA->GetType();
+ int32_t iObjType = pElementXFA->GetType();
CFX_ArrayTemplate<CPDF_Stream*> xfaStreams;
if (iObjType == PDFOBJ_ARRAY) {
CPDF_Array* pXFAArray = (CPDF_Array*)pElementXFA;
@@ -327,14 +327,14 @@ CPDF_Document* CXFA_FFDoc::GetPDFDoc()
return m_pPDFDoc;
}
#define _FXLIB_NEW_VERSION_
-CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(FX_WSTR wsName, FX_INT32 &iImageXDpi, FX_INT32 &iImageYDpi)
+CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(FX_WSTR wsName, int32_t &iImageXDpi, int32_t &iImageYDpi)
{
if (!m_pPDFDoc) {
return NULL;
}
FX_DWORD dwHash = FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength(), FALSE);
FX_IMAGEDIB_AND_DPI *imageDIBDpi = NULL;
- if (m_mapNamedImages.Lookup((void*)(FX_UINTPTR)dwHash, (void*&)imageDIBDpi)) {
+ if (m_mapNamedImages.Lookup((void*)(uintptr_t)dwHash, (void*&)imageDIBDpi)) {
iImageXDpi = imageDIBDpi->iImageXDpi;
iImageYDpi = imageDIBDpi->iImageYDpi;
return (CFX_DIBitmap*)imageDIBDpi->pDibSource;
@@ -356,8 +356,8 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(FX_WSTR wsName, FX_INT32 &iImageXDpi,
CFX_ByteString bsName = PDF_EncodeText(wsName.GetPtr(), wsName.GetLength());
CPDF_Object* pObject = nametree.LookupValue(bsName);
if (!pObject) {
- FX_INT32 iCount = nametree.GetCount();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = nametree.GetCount();
+ for (int32_t i = 0; i < iCount; i++) {
CFX_ByteString bsTemp;
CPDF_Object* pTempObject = nametree.LookupValue(i, bsTemp);
if (bsTemp == bsName) {
@@ -369,8 +369,8 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(FX_WSTR wsName, FX_INT32 &iImageXDpi,
#else
CPDF_Object* pObject = nametree.LookupValue(wsName);
if (!pObject) {
- FX_INT32 iCount = nametree.GetCount();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = nametree.GetCount();
+ for (int32_t i = 0; i < iCount; i++) {
CFX_WideString wsTemp;
CPDF_Object* pTempObject = nametree.LookupValue(i, wsTemp);
if (wsTemp == wsName) {
@@ -396,7 +396,7 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(FX_WSTR wsName, FX_INT32 &iImageXDpi,
imageDIBDpi->iImageYDpi = iImageYDpi;
pImageFileRead->Release();
}
- m_mapNamedImages.SetAt((void*)(FX_UINTPTR)dwHash, imageDIBDpi);
+ m_mapNamedImages.SetAt((void*)(uintptr_t)dwHash, imageDIBDpi);
return (CFX_DIBitmap*)imageDIBDpi->pDibSource;
}
IFDE_XMLElement* CXFA_FFDoc::GetPackageData(FX_WSTR wsPackage)
diff --git a/xfa/src/fxfa/src/app/xfa_ffdoc.h b/xfa/src/fxfa/src/app/xfa_ffdoc.h
index 964573f201..a8c5b80370 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdoc.h
+++ b/xfa/src/fxfa/src/app/xfa_ffdoc.h
@@ -16,8 +16,8 @@ class IXFA_Locale;
typedef struct _FX_IMAGEDIB_AND_DPI {
CFX_DIBSource* pDibSource;
- FX_INT32 iImageXDpi;
- FX_INT32 iImageYDpi;
+ int32_t iImageXDpi;
+ int32_t iImageYDpi;
} FX_IMAGEDIB_AND_DPI;
class CXFA_FFDoc : public IXFA_Doc
@@ -30,8 +30,8 @@ public:
return m_pDocProvider;
}
FX_DWORD GetDocType();
- FX_INT32 StartLoad();
- FX_INT32 DoLoad(IFX_Pause *pPause = NULL);
+ int32_t StartLoad();
+ int32_t DoLoad(IFX_Pause *pPause = NULL);
void StopLoad();
IXFA_DocView* CreateDocView(FX_DWORD dwView = 0);
FX_BOOL OpenDoc(IFX_FileRead* pStream, FX_BOOL bTakeOverFile);
@@ -49,7 +49,7 @@ public:
CXFA_FFDocView* GetDocView(IXFA_DocLayout* pLayout);
CXFA_FFDocView* GetDocView();
CPDF_Document* GetPDFDoc();
- CFX_DIBitmap* GetPDFNamedImage(FX_WSTR wsName, FX_INT32 &iImageXDpi, FX_INT32 &iImageYDpi);
+ CFX_DIBitmap* GetPDFNamedImage(FX_WSTR wsName, int32_t &iImageXDpi, int32_t &iImageYDpi);
IFDE_XMLElement* GetPackageData(FX_WSTR wsPackage);
FX_BOOL SavePackage(FX_WSTR wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext = NULL);
FX_BOOL ImportData(IFX_FileRead* pStream, FX_BOOL bXDP = TRUE);
diff --git a/xfa/src/fxfa/src/app/xfa_ffdochandler.cpp b/xfa/src/fxfa/src/app/xfa_ffdochandler.cpp
index 9d76ca19e2..ccc734ecad 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdochandler.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffdochandler.cpp
@@ -26,11 +26,11 @@ FX_DWORD CXFA_FFDocHandler::GetDocType(IXFA_Doc* hDoc)
{
return static_cast<CXFA_FFDoc*>(hDoc)->GetDocType();
}
-FX_INT32 CXFA_FFDocHandler::StartLoad(IXFA_Doc* hDoc)
+int32_t CXFA_FFDocHandler::StartLoad(IXFA_Doc* hDoc)
{
return static_cast<CXFA_FFDoc*>(hDoc)->StartLoad();
}
-FX_INT32 CXFA_FFDocHandler::DoLoad(IXFA_Doc* hDoc, IFX_Pause *pPause )
+int32_t CXFA_FFDocHandler::DoLoad(IXFA_Doc* hDoc, IFX_Pause *pPause )
{
return static_cast<CXFA_FFDoc*>(hDoc)->DoLoad(pPause);
}
@@ -43,11 +43,11 @@ IXFA_DocView* CXFA_FFDocHandler::CreateDocView(IXFA_Doc* hDoc, FX_DWORD dwView )
{
return static_cast<CXFA_FFDoc*>(hDoc)->CreateDocView(dwView);
}
-FX_INT32 CXFA_FFDocHandler::CountPackages(IXFA_Doc* hDoc)
+int32_t CXFA_FFDocHandler::CountPackages(IXFA_Doc* hDoc)
{
return 0;
}
-void CXFA_FFDocHandler::GetPackageName(IXFA_Doc* hDoc, FX_INT32 iPackage, CFX_WideStringC &wsPackage)
+void CXFA_FFDocHandler::GetPackageName(IXFA_Doc* hDoc, int32_t iPackage, CFX_WideStringC &wsPackage)
{
}
IFDE_XMLElement* CXFA_FFDocHandler::GetPackageData(IXFA_Doc* hDoc, FX_WSTR wsPackage)
diff --git a/xfa/src/fxfa/src/app/xfa_ffdochandler.h b/xfa/src/fxfa/src/app/xfa_ffdochandler.h
index 95abc6ad33..a421610d29 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdochandler.h
+++ b/xfa/src/fxfa/src/app/xfa_ffdochandler.h
@@ -15,13 +15,13 @@ public:
virtual void ReleaseDoc(IXFA_Doc* hDoc);
virtual IXFA_DocProvider* GetDocProvider(IXFA_Doc* hDoc);
virtual FX_DWORD GetDocType(IXFA_Doc* hDoc);
- virtual FX_INT32 StartLoad(IXFA_Doc* hDoc);
- virtual FX_INT32 DoLoad(IXFA_Doc* hDoc, IFX_Pause *pPause = NULL);
+ virtual int32_t StartLoad(IXFA_Doc* hDoc);
+ virtual int32_t DoLoad(IXFA_Doc* hDoc, IFX_Pause *pPause = NULL);
virtual void StopLoad(IXFA_Doc* hDoc);
virtual IXFA_DocView* CreateDocView(IXFA_Doc* hDoc, FX_DWORD dwView = 0);
- virtual FX_INT32 CountPackages(IXFA_Doc* hDoc);
- virtual void GetPackageName(IXFA_Doc* hDoc, FX_INT32 iPackage, CFX_WideStringC &wsPackage);
+ virtual int32_t CountPackages(IXFA_Doc* hDoc);
+ virtual void GetPackageName(IXFA_Doc* hDoc, int32_t iPackage, CFX_WideStringC &wsPackage);
virtual IFDE_XMLElement* GetPackageData(IXFA_Doc* hDoc, FX_WSTR wsPackage);
virtual FX_BOOL SavePackage(IXFA_Doc* hDoc, FX_WSTR wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext = NULL);
virtual FX_BOOL CloseDoc(IXFA_Doc* hDoc);
diff --git a/xfa/src/fxfa/src/app/xfa_ffdocview.cpp b/xfa/src/fxfa/src/app/xfa_ffdocview.cpp
index 7f80c416b2..dcf6c28816 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdocview.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffdocview.cpp
@@ -86,13 +86,13 @@ void CXFA_FFDocView::InitLayout(CXFA_Node* pNode)
ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Initialize);
ExecEventActivityByDeepFirst(pNode, XFA_EVENT_IndexChange);
}
-FX_INT32 CXFA_FFDocView::StartLayout(FX_INT32 iStartPage )
+int32_t CXFA_FFDocView::StartLayout(int32_t iStartPage )
{
m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Start;
m_pDoc->GetXFADoc()->DoProtoMerge();
m_pDoc->GetXFADoc()->DoDataMerge();
m_pXFADocLayout = GetXFALayout();
- FX_INT32 iStatus = m_pXFADocLayout->StartLayout();
+ int32_t iStatus = m_pXFADocLayout->StartLayout();
if (iStatus < 0) {
return iStatus;
}
@@ -107,9 +107,9 @@ FX_INT32 CXFA_FFDocView::StartLayout(FX_INT32 iStartPage )
m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Start;
return iStatus;
}
-FX_INT32 CXFA_FFDocView::DoLayout(IFX_Pause *pPause )
+int32_t CXFA_FFDocView::DoLayout(IFX_Pause *pPause )
{
- FX_INT32 iStatus = 100;
+ int32_t iStatus = 100;
iStatus = m_pXFADocLayout->DoLayout(pPause);
if (iStatus != 100) {
return iStatus;
@@ -150,20 +150,20 @@ void CXFA_FFDocView::StopLayout()
}
m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_End;
}
-FX_INT32 CXFA_FFDocView::GetLayoutStatus()
+int32_t CXFA_FFDocView::GetLayoutStatus()
{
return m_iStatus;
}
void CXFA_FFDocView::ShowNullTestMsg()
{
- FX_INT32 iCount = m_arrNullTestMsg.GetSize();
+ int32_t iCount = m_arrNullTestMsg.GetSize();
CXFA_FFApp* pApp = m_pDoc->GetApp();
IXFA_AppProvider* pAppProvider = pApp->GetAppProvider();
if (pAppProvider && iCount) {
- FX_INT32 iRemain = iCount > 7 ? iCount - 7 : 0;
+ int32_t iRemain = iCount > 7 ? iCount - 7 : 0;
iCount -= iRemain;
CFX_WideString wsMsg;
- for (FX_INT32 i = 0; i < iCount; i++) {
+ for (int32_t i = 0; i < iCount; i++) {
wsMsg += m_arrNullTestMsg[i] + FX_WSTRC(L"\n");
}
if (iRemain > 0) {
@@ -187,8 +187,8 @@ void CXFA_FFDocView::UpdateDocView()
return;
}
LockUpdate();
- FX_INT32 iNewAdds = m_NewAddedNodes.GetSize();
- for (FX_INT32 i = 0; i < iNewAdds; i++) {
+ int32_t iNewAdds = m_NewAddedNodes.GetSize();
+ for (int32_t i = 0; i < iNewAdds; i++) {
CXFA_Node* pNode = (CXFA_Node*)m_NewAddedNodes[i];
InitCalculate(pNode);
InitValidate(pNode);
@@ -208,14 +208,14 @@ void CXFA_FFDocView::UpdateDocView()
this->RunInvalidate();
UnlockUpdate();
}
-FX_INT32 CXFA_FFDocView::CountPageViews()
+int32_t CXFA_FFDocView::CountPageViews()
{
if (!m_pXFADocLayout) {
return 0;
}
return m_pXFADocLayout->CountPages();
}
-IXFA_PageView* CXFA_FFDocView::GetPageView(FX_INT32 nIndex)
+IXFA_PageView* CXFA_FFDocView::GetPageView(int32_t nIndex)
{
if (!m_pXFADocLayout) {
return NULL;
@@ -280,7 +280,7 @@ void CXFA_FFDocView::ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc )
m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc);
}
}
-FX_INT32 CXFA_FFDocView::ProcessWidgetEvent(CXFA_EventParam* pParam, CXFA_WidgetAcc* pWidgetAcc )
+int32_t CXFA_FFDocView::ProcessWidgetEvent(CXFA_EventParam* pParam, CXFA_WidgetAcc* pWidgetAcc )
{
if (pParam == NULL) {
return XFA_EVENTERROR_Error;
@@ -431,7 +431,7 @@ void CXFA_FFDocView::DeleteLayoutItem(CXFA_FFWidget* pWidget)
m_pOldFocusWidget = NULL;
}
}
-static FX_INT32 XFA_ProcessEvent(CXFA_FFDocView* pDocView, CXFA_WidgetAcc* pWidgetAcc, CXFA_EventParam* pParam)
+static int32_t XFA_ProcessEvent(CXFA_FFDocView* pDocView, CXFA_WidgetAcc* pWidgetAcc, CXFA_EventParam* pParam)
{
if (!pParam || pParam->m_eType == XFA_EVENT_Unknown) {
return XFA_EVENTERROR_NotExist;
@@ -461,12 +461,12 @@ static FX_INT32 XFA_ProcessEvent(CXFA_FFDocView* pDocView, CXFA_WidgetAcc* pWidg
default:
break;
}
- FX_INT32 iRet = pWidgetAcc->ProcessEvent(gs_EventActivity[pParam->m_eType], pParam);
+ int32_t iRet = pWidgetAcc->ProcessEvent(gs_EventActivity[pParam->m_eType], pParam);
return iRet;
}
-FX_INT32 CXFA_FFDocView::ExecEventActivityByDeepFirst(CXFA_Node* pFormNode, XFA_EVENTTYPE eEventType, FX_BOOL bIsFormReady, FX_BOOL bRecursive, CXFA_Node* pExclude)
+int32_t CXFA_FFDocView::ExecEventActivityByDeepFirst(CXFA_Node* pFormNode, XFA_EVENTTYPE eEventType, FX_BOOL bIsFormReady, FX_BOOL bRecursive, CXFA_Node* pExclude)
{
- FX_INT32 iRet = XFA_EVENTERROR_NotExist;
+ int32_t iRet = XFA_EVENTERROR_NotExist;
if (pFormNode == pExclude) {
return iRet;
}
@@ -528,7 +528,7 @@ CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(FX_WSTR wsName, CXFA_WidgetAc
wsExpression = L"$form." + wsName;
}
XFA_RESOLVENODE_RS resoveNodeRS;
- FX_INT32 iRet = pScriptContext->ResolveObjects(refNode, wsExpression, resoveNodeRS, dwStyle);
+ int32_t iRet = pScriptContext->ResolveObjects(refNode, wsExpression, resoveNodeRS, dwStyle);
if (iRet < 1) {
return NULL;
}
@@ -540,7 +540,7 @@ CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(FX_WSTR wsName, CXFA_WidgetAc
}
return NULL;
}
-void CXFA_FFDocView::OnPageEvent(IXFA_LayoutPage *pSender, XFA_PAGEEVENT eEvent, FX_INT32 iPageIndex)
+void CXFA_FFDocView::OnPageEvent(IXFA_LayoutPage *pSender, XFA_PAGEEVENT eEvent, int32_t iPageIndex)
{
FX_BOOL bNofify = m_iStatus >= XFA_DOCVIEW_LAYOUTSTATUS_End;
if (eEvent == XFA_PAGEEVENT_PageRemoved) {
@@ -620,8 +620,8 @@ FX_BOOL CXFA_FFDocView::RunLayout()
}
void CXFA_FFDocView::RunSubformIndexChange()
{
- FX_INT32 iSubforms = m_IndexChangedSubforms.GetSize();
- for (FX_INT32 i = 0; i < iSubforms; i++) {
+ int32_t iSubforms = m_IndexChangedSubforms.GetSize();
+ for (int32_t i = 0; i < iSubforms; i++) {
CXFA_Node* pSubformNode = (CXFA_Node*)m_IndexChangedSubforms[i];
CXFA_WidgetAcc* pWidgetAcc = (CXFA_WidgetAcc*)pSubformNode->GetWidgetData();
if (!pWidgetAcc) {
@@ -667,7 +667,7 @@ FX_BOOL CXFA_FFDocView::IsStaticNotify()
}
void CXFA_FFDocView::AddCalculateWidgetAcc(CXFA_WidgetAcc* pWidgetAcc)
{
- FX_INT32 iAccs = m_CalculateAccs.GetSize();
+ int32_t iAccs = m_CalculateAccs.GetSize();
CXFA_WidgetAcc* pCurrentAcc = (iAccs < 1) ? (CXFA_WidgetAcc*)NULL : (CXFA_WidgetAcc*)m_CalculateAccs[iAccs - 1];
if (pCurrentAcc != pWidgetAcc) {
m_CalculateAccs.Add(pWidgetAcc);
@@ -676,27 +676,27 @@ void CXFA_FFDocView::AddCalculateWidgetAcc(CXFA_WidgetAcc* pWidgetAcc)
void CXFA_FFDocView::AddCalculateNodeNotify(CXFA_Node* pNodeChange)
{
CXFA_CalcData* pGlobalData = (CXFA_CalcData*)pNodeChange->GetUserData(XFA_CalcData);
- FX_INT32 iCount = pGlobalData ? pGlobalData->m_Globals.GetSize() : 0;
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = pGlobalData ? pGlobalData->m_Globals.GetSize() : 0;
+ for (int32_t i = 0; i < iCount; i++) {
CXFA_WidgetAcc* pResultAcc = (CXFA_WidgetAcc*)pGlobalData->m_Globals[i];
if (pResultAcc->GetNode()->HasFlag(XFA_NODEFLAG_HasRemoved)) {
continue;
}
- FX_INT32 iAccs = m_CalculateAccs.GetSize();
+ int32_t iAccs = m_CalculateAccs.GetSize();
CXFA_WidgetAcc* pCurrentAcc = (iAccs < 1) ? (CXFA_WidgetAcc*)NULL : (CXFA_WidgetAcc*)m_CalculateAccs[iAccs - 1];
if (pCurrentAcc != pResultAcc) {
m_CalculateAccs.Add(pResultAcc);
}
}
}
-void CXFA_FFDocView::RunCalculateRecursive(FX_INT32& iIndex)
+void CXFA_FFDocView::RunCalculateRecursive(int32_t& iIndex)
{
while (iIndex < m_CalculateAccs.GetSize()) {
CXFA_WidgetAcc* pCurAcc = (CXFA_WidgetAcc*)m_CalculateAccs[iIndex];
AddCalculateNodeNotify(pCurAcc->GetNode());
- FX_INT32 iRefCount = (FX_INT32)(FX_UINTPTR)pCurAcc->GetNode()->GetUserData(XFA_CalcRefCount);
+ int32_t iRefCount = (int32_t)(uintptr_t)pCurAcc->GetNode()->GetUserData(XFA_CalcRefCount);
iRefCount++;
- pCurAcc->GetNode()->SetUserData(XFA_CalcRefCount, (FX_LPVOID)(FX_UINTPTR)iRefCount);
+ pCurAcc->GetNode()->SetUserData(XFA_CalcRefCount, (FX_LPVOID)(uintptr_t)iRefCount);
if (iRefCount > 11) {
break;
}
@@ -707,19 +707,19 @@ void CXFA_FFDocView::RunCalculateRecursive(FX_INT32& iIndex)
RunCalculateRecursive(iIndex);
}
}
-FX_INT32 CXFA_FFDocView::RunCalculateWidgets()
+int32_t CXFA_FFDocView::RunCalculateWidgets()
{
if (!m_pDoc->GetDocProvider()->IsCalculationsEnabled(m_pDoc)) {
return XFA_EVENTERROR_Disabled;
}
- FX_INT32 iCounts = m_CalculateAccs.GetSize();
- FX_INT32 iIndex = 0;
+ int32_t iCounts = m_CalculateAccs.GetSize();
+ int32_t iIndex = 0;
if (iCounts > 0) {
RunCalculateRecursive(iIndex);
}
- for (FX_INT32 i = 0; i < m_CalculateAccs.GetSize(); i++) {
+ for (int32_t i = 0; i < m_CalculateAccs.GetSize(); i++) {
CXFA_WidgetAcc* pCurAcc = (CXFA_WidgetAcc*)m_CalculateAccs[i];
- pCurAcc->GetNode()->SetUserData(XFA_CalcRefCount, (FX_LPVOID)(FX_UINTPTR)0);
+ pCurAcc->GetNode()->SetUserData(XFA_CalcRefCount, (FX_LPVOID)(uintptr_t)0);
}
m_CalculateAccs.RemoveAll();
return XFA_EVENTERROR_Sucess;
@@ -749,8 +749,8 @@ FX_BOOL CXFA_FFDocView::RunValidate()
if (!m_pDoc->GetDocProvider()->IsValidationsEnabled(m_pDoc)) {
return FALSE;
}
- FX_INT32 iCounts = m_ValidateAccs.GetSize();
- for (FX_INT32 i = 0; i < iCounts; i++) {
+ int32_t iCounts = m_ValidateAccs.GetSize();
+ for (int32_t i = 0; i < iCounts; i++) {
CXFA_WidgetAcc* pAcc = (CXFA_WidgetAcc*)m_ValidateAccs[i];
if (pAcc->GetNode()->HasFlag(XFA_NODEFLAG_HasRemoved)) {
continue;
@@ -772,8 +772,8 @@ FX_BOOL CXFA_FFDocView::RunEventLayoutReady()
}
void CXFA_FFDocView::RunBindItems()
{
- FX_INT32 iCount = m_bindItems.GetSize();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = m_bindItems.GetSize();
+ for (int32_t i = 0; i < iCount; i++) {
if (((CXFA_Node*)m_bindItems[i])->HasFlag(XFA_NODEFLAG_HasRemoved)) {
continue;
}
@@ -789,7 +789,7 @@ void CXFA_FFDocView::RunBindItems()
FX_DWORD dwStyle = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_ALL;
XFA_RESOLVENODE_RS rs;
pScriptContext->ResolveObjects(pWidgetNode, wsRef, rs, dwStyle);
- FX_INT32 iCount = rs.nodes.GetSize();
+ int32_t iCount = rs.nodes.GetSize();
pAcc->DeleteItem(-1);
if (rs.dwFlags != XFA_RESOVENODE_RSTYPE_Nodes || iCount < 1) {
continue;
@@ -803,7 +803,7 @@ void CXFA_FFDocView::RunBindItems()
CFX_WideString wsValue, wsLabel;
FX_DWORD uValueHash = FX_HashCode_String_GetW(CFX_WideString(wsValueRef), wsValueRef.GetLength());
FX_DWORD uLableHash = FX_HashCode_String_GetW(CFX_WideString(wsLabelRef), wsLabelRef.GetLength());
- for (FX_INT32 i = 0; i < iCount; i++) {
+ for (int32_t i = 0; i < iCount; i++) {
CXFA_Object* refObj = rs.nodes[i];
if(!refObj->IsNode()) {
continue;
diff --git a/xfa/src/fxfa/src/app/xfa_ffdocview.h b/xfa/src/fxfa/src/app/xfa_ffdocview.h
index e3f2d643e2..e7493e653d 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdocview.h
+++ b/xfa/src/fxfa/src/app/xfa_ffdocview.h
@@ -38,17 +38,17 @@ public:
~CXFA_FFDocView();
virtual IXFA_Doc* GetDoc() { return m_pDoc; }
- virtual FX_INT32 StartLayout(FX_INT32 iStartPage = 0);
- virtual FX_INT32 DoLayout(IFX_Pause *pPause = NULL);
+ virtual int32_t StartLayout(int32_t iStartPage = 0);
+ virtual int32_t DoLayout(IFX_Pause *pPause = NULL);
virtual void StopLayout();
- virtual FX_INT32 GetLayoutStatus();
+ virtual int32_t GetLayoutStatus();
virtual void UpdateDocView();
- virtual FX_INT32 CountPageViews();
- virtual IXFA_PageView* GetPageView(FX_INT32 nIndex);
+ virtual int32_t CountPageViews();
+ virtual IXFA_PageView* GetPageView(int32_t nIndex);
virtual IXFA_Widget* GetWidgetByName(FX_WSTR wsName);
virtual CXFA_WidgetAcc* GetWidgetAccByName(FX_WSTR wsName);
virtual void ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc = NULL);
- virtual FX_INT32 ProcessWidgetEvent(CXFA_EventParam* pParam, CXFA_WidgetAcc* pWidgetAcc = NULL);
+ virtual int32_t ProcessWidgetEvent(CXFA_EventParam* pParam, CXFA_WidgetAcc* pWidgetAcc = NULL);
virtual IXFA_WidgetHandler* GetWidgetHandler();
virtual IXFA_WidgetIterator* CreateWidgetIterator();
virtual IXFA_WidgetAccIterator* CreateWidgetAccIterator(XFA_WIDGETORDER eOrder = XFA_WIDGETORDER_PreOrder);
@@ -58,7 +58,7 @@ public:
CXFA_FFWidget* GetWidgetByName(FX_WSTR wsName, CXFA_FFWidget* pRefWidget = NULL);
CXFA_WidgetAcc* GetWidgetAccByName(FX_WSTR wsName, CXFA_WidgetAcc* pRefWidgetAcc = NULL);
IXFA_DocLayout* GetXFALayout() const;
- void OnPageEvent(IXFA_LayoutPage *pSender, XFA_PAGEEVENT eEvent, FX_INT32 iPageIndex);
+ void OnPageEvent(IXFA_LayoutPage *pSender, XFA_PAGEEVENT eEvent, int32_t iPageIndex);
void LockUpdate();
void UnlockUpdate();
FX_BOOL IsUpdateLocked();
@@ -77,7 +77,7 @@ public:
void AddValidateWidget(CXFA_WidgetAcc* pWidget);
void AddCalculateNodeNotify(CXFA_Node* pNodeChange);
void AddCalculateWidgetAcc(CXFA_WidgetAcc* pWidgetAcc);
- FX_INT32 RunCalculateWidgets();
+ int32_t RunCalculateWidgets();
FX_BOOL IsStaticNotify();
FX_BOOL RunLayout();
void RunSubformIndexChange();
@@ -86,7 +86,7 @@ public:
CXFA_WidgetAcc* GetFocusWidgetAcc();
void SetFocusWidgetAcc(CXFA_WidgetAcc* pWidgetAcc);
void DeleteLayoutItem(CXFA_FFWidget* pWidget);
- FX_INT32 ExecEventActivityByDeepFirst(CXFA_Node* pFormNode, XFA_EVENTTYPE eEventType, FX_BOOL bIsFormReady = FALSE, FX_BOOL bRecursive = TRUE, CXFA_Node* pExclude = NULL);
+ int32_t ExecEventActivityByDeepFirst(CXFA_Node* pFormNode, XFA_EVENTTYPE eEventType, FX_BOOL bIsFormReady = FALSE, FX_BOOL bRecursive = TRUE, CXFA_Node* pExclude = NULL);
FX_BOOL m_bLayoutEvent;
CFX_WideStringArray m_arrNullTestMsg;
CXFA_FFWidget* m_pListFocusWidget;
@@ -96,7 +96,7 @@ protected:
void RunBindItems();
FX_BOOL InitCalculate(CXFA_Node* pNode);
void InitLayout(CXFA_Node* pNode);
- void RunCalculateRecursive(FX_INT32& iIndex);
+ void RunCalculateRecursive(int32_t& iIndex);
void ShowNullTestMsg();
FX_BOOL ResetSingleWidgetAccData(CXFA_WidgetAcc* pWidgetAcc);
CXFA_Node* GetRootSubform();
@@ -114,7 +114,7 @@ protected:
CFX_PtrArray m_NewAddedNodes;
CFX_PtrArray m_IndexChangedSubforms;
XFA_DOCVIEW_LAYOUTSTATUS m_iStatus;
- FX_INT32 m_iLock;
+ int32_t m_iLock;
friend class CXFA_FFNotify;
};
class CXFA_FFDocWidgetIterator : public IXFA_WidgetIterator
diff --git a/xfa/src/fxfa/src/app/xfa_ffexclgroup.cpp b/xfa/src/fxfa/src/app/xfa_ffexclgroup.cpp
index 75d5f7e5c4..6256724a29 100644
--- a/xfa/src/fxfa/src/app/xfa_ffexclgroup.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffexclgroup.cpp
@@ -18,7 +18,7 @@ CXFA_FFExclGroup::CXFA_FFExclGroup(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* p
CXFA_FFExclGroup::~CXFA_FFExclGroup()
{
}
-void CXFA_FFExclGroup::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , FX_INT32 iRotate )
+void CXFA_FFExclGroup::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , int32_t iRotate )
{
if (!IsMatchVisibleStatus(dwStatus)) {
return;
diff --git a/xfa/src/fxfa/src/app/xfa_ffexclgroup.h b/xfa/src/fxfa/src/app/xfa_ffexclgroup.h
index bc8acd6789..c8d8ef51cc 100644
--- a/xfa/src/fxfa/src/app/xfa_ffexclgroup.h
+++ b/xfa/src/fxfa/src/app/xfa_ffexclgroup.h
@@ -12,7 +12,7 @@ public:
CXFA_FFExclGroup(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);
virtual ~CXFA_FFExclGroup();
- virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, FX_INT32 iRotate = 0);
+ virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, int32_t iRotate = 0);
protected:
};
#endif
diff --git a/xfa/src/fxfa/src/app/xfa_fffield.cpp b/xfa/src/fxfa/src/app/xfa_fffield.cpp
index 34b73b55b0..87d3adad80 100644
--- a/xfa/src/fxfa/src/app/xfa_fffield.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fffield.cpp
@@ -53,7 +53,7 @@ FX_BOOL CXFA_FFField::GetBBox(CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDraw
mt.TransformRect(rtBox);
return TRUE;
}
-void CXFA_FFField::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , FX_INT32 iRotate )
+void CXFA_FFField::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , int32_t iRotate )
{
if (!IsMatchVisibleStatus(dwStatus)) {
return;
@@ -276,7 +276,7 @@ void CXFA_FFField::CapPlacement()
}
m_rtUI.Normalize();
}
-void CXFA_FFField::CapTopBottomPlacement(CXFA_Caption caption, const CFX_RectF &rtWidget, FX_INT32 iCapPlacement)
+void CXFA_FFField::CapTopBottomPlacement(CXFA_Caption caption, const CFX_RectF &rtWidget, int32_t iCapPlacement)
{
CFX_RectF rtUIMargin;
m_pDataAcc->GetUIMargin(rtUIMargin);
@@ -302,7 +302,7 @@ void CXFA_FFField::CapTopBottomPlacement(CXFA_Caption caption, const CFX_RectF &
}
}
}
-void CXFA_FFField::CapLeftRightPlacement(CXFA_Caption caption, const CFX_RectF &rtWidget, FX_INT32 iCapPlacement)
+void CXFA_FFField::CapLeftRightPlacement(CXFA_Caption caption, const CFX_RectF &rtWidget, int32_t iCapPlacement)
{
CFX_RectF rtUIMargin;
m_pDataAcc->GetUIMargin(rtUIMargin);
@@ -466,7 +466,7 @@ FX_BOOL CXFA_FFField::OnMouseMove(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
TranslateFWLMessage(&ms);
return TRUE;
}
-FX_BOOL CXFA_FFField::OnMouseWheel(FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy)
+FX_BOOL CXFA_FFField::OnMouseWheel(FX_DWORD dwFlags, int16_t zDelta, FX_FLOAT fx, FX_FLOAT fy)
{
return FALSE;
if (!m_pNormalWidget) {
@@ -714,13 +714,13 @@ FX_BOOL CXFA_FFField::ProcessCommittedData()
m_pDocView->AddValidateWidget(m_pDataAcc);
return TRUE;
}
-FX_INT32 CXFA_FFField::CalculateOverride()
+int32_t CXFA_FFField::CalculateOverride()
{
CXFA_WidgetAcc* pAcc = m_pDataAcc->GetExclGroup();
if (!pAcc) {
return CalculateWidgetAcc(m_pDataAcc);
}
- FX_INT32 iOverride = 0;
+ int32_t iOverride = 0;
if (CalculateWidgetAcc(pAcc) == 0) {
return 0;
}
@@ -741,7 +741,7 @@ FX_INT32 CXFA_FFField::CalculateOverride()
}
return 1;
}
-FX_INT32 CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc)
+int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc)
{
CXFA_Calculate calc = pAcc->GetCalculate();
if (!calc) {
@@ -749,7 +749,7 @@ FX_INT32 CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc)
}
XFA_VERSION version = pAcc->GetDoc()->GetXFADoc()->GetCurVersionMode();
if (calc) {
- FX_INT32 iOverride = calc.GetOverride();
+ int32_t iOverride = calc.GetOverride();
switch (iOverride) {
case XFA_ATTRIBUTEENUM_Error: {
if (version <= XFA_VERSION_204) {
@@ -823,7 +823,7 @@ void CXFA_FFField::TranslateFWLMessage(CFWL_Message* pMessage)
{
GetApp()->GetWidgetMgrDelegate()->OnProcessMessageToForm(pMessage);
}
-FX_INT32 CXFA_FFField::OnProcessMessage(CFWL_Message *pMessage)
+int32_t CXFA_FFField::OnProcessMessage(CFWL_Message *pMessage)
{
return FWL_ERR_Succeeded;
}
diff --git a/xfa/src/fxfa/src/app/xfa_fffield.h b/xfa/src/fxfa/src/app/xfa_fffield.h
index c2f7e680e2..16dd3d65a7 100644
--- a/xfa/src/fxfa/src/app/xfa_fffield.h
+++ b/xfa/src/fxfa/src/app/xfa_fffield.h
@@ -16,7 +16,7 @@ public:
virtual ~CXFA_FFField();
virtual FX_BOOL GetBBox(CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus = FALSE);
- virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, FX_INT32 iRotate = 0);
+ virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, int32_t iRotate = 0);
virtual FX_BOOL IsLoaded();
virtual FX_BOOL LoadWidget();
virtual void UnloadWidget();
@@ -29,7 +29,7 @@ public:
virtual FX_BOOL OnLButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnLButtonDblClk(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnMouseMove(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnMouseWheel(FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy);
+ virtual FX_BOOL OnMouseWheel(FX_DWORD dwFlags, int16_t zDelta, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnRButtonDown(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnRButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnRButtonDblClk(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
@@ -53,8 +53,8 @@ protected:
void LayoutCaption();
void RenderCaption(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL);
- FX_INT32 CalculateOverride();
- FX_INT32 CalculateWidgetAcc(CXFA_WidgetAcc* pAcc);
+ int32_t CalculateOverride();
+ int32_t CalculateWidgetAcc(CXFA_WidgetAcc* pAcc);
FX_BOOL ProcessCommittedData();
virtual FX_BOOL CommitData();
virtual FX_BOOL IsDataChanged();
@@ -62,11 +62,11 @@ protected:
void DrawFocus(CFX_Graphics* pGS, CFX_Matrix* pMatrix);
void TranslateFWLMessage(CFWL_Message* pMessage);
void CapPlacement();
- void CapTopBottomPlacement(CXFA_Caption caption, const CFX_RectF &rtWidget, FX_INT32 iCapPlacement);
- void CapLeftRightPlacement(CXFA_Caption caption, const CFX_RectF &rtWidget, FX_INT32 iCapPlacement);
+ void CapTopBottomPlacement(CXFA_Caption caption, const CFX_RectF &rtWidget, int32_t iCapPlacement);
+ void CapLeftRightPlacement(CXFA_Caption caption, const CFX_RectF &rtWidget, int32_t iCapPlacement);
void SetEditScrollOffset();
public:
- virtual FX_INT32 OnProcessMessage(CFWL_Message *pMessage);
+ virtual int32_t OnProcessMessage(CFWL_Message *pMessage);
virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent);
virtual FWL_ERR OnDrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);
protected:
diff --git a/xfa/src/fxfa/src/app/xfa_ffimage.cpp b/xfa/src/fxfa/src/app/xfa_ffimage.cpp
index a12b1ff9dc..78eef33978 100644
--- a/xfa/src/fxfa/src/app/xfa_ffimage.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffimage.cpp
@@ -36,7 +36,7 @@ void CXFA_FFImage::UnloadWidget()
{
GetDataAcc()->SetImageImage(NULL);
}
-void CXFA_FFImage::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , FX_INT32 iRotate )
+void CXFA_FFImage::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , int32_t iRotate )
{
if (!IsMatchVisibleStatus(dwStatus)) {
return;
@@ -53,17 +53,17 @@ void CXFA_FFImage::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWOR
if (CXFA_Margin mgWidget = m_pDataAcc->GetMargin()) {
XFA_RectWidthoutMargin(rtImage, mgWidget);
}
- FX_INT32 iHorzAlign = XFA_ATTRIBUTEENUM_Left;
- FX_INT32 iVertAlign = XFA_ATTRIBUTEENUM_Top;
+ int32_t iHorzAlign = XFA_ATTRIBUTEENUM_Left;
+ int32_t iVertAlign = XFA_ATTRIBUTEENUM_Top;
if (CXFA_Para para = m_pDataAcc->GetPara()) {
iHorzAlign = para.GetHorizontalAlign();
iVertAlign = para.GetVerticalAlign();
}
CXFA_Value value = m_pDataAcc->GetFormValue();
CXFA_Image imageObj = value.GetImage();
- FX_INT32 iAspect = imageObj.GetAspect();
- FX_INT32 iImageXDpi = 0;
- FX_INT32 iImageYDpi = 0;
+ int32_t iAspect = imageObj.GetAspect();
+ int32_t iImageXDpi = 0;
+ int32_t iImageYDpi = 0;
m_pDataAcc->GetImageDpi(iImageXDpi, iImageYDpi);
XFA_DrawImage(pGS, rtImage, &mtRotate, pDIBitmap, iAspect, iImageXDpi, iImageYDpi, iHorzAlign, iVertAlign);
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffimage.h b/xfa/src/fxfa/src/app/xfa_ffimage.h
index f6b985c304..dd785725ad 100644
--- a/xfa/src/fxfa/src/app/xfa_ffimage.h
+++ b/xfa/src/fxfa/src/app/xfa_ffimage.h
@@ -11,7 +11,7 @@ class CXFA_FFImage : public CXFA_FFDraw
public:
CXFA_FFImage(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);
virtual ~CXFA_FFImage();
- virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, FX_INT32 iRotate = 0);
+ virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, int32_t iRotate = 0);
virtual FX_BOOL IsLoaded();
virtual FX_BOOL LoadWidget();
virtual void UnloadWidget();
diff --git a/xfa/src/fxfa/src/app/xfa_ffimageedit.cpp b/xfa/src/fxfa/src/app/xfa_ffimageedit.cpp
index 2075d90d21..0174ee71c5 100644
--- a/xfa/src/fxfa/src/app/xfa_ffimageedit.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffimageedit.cpp
@@ -45,7 +45,7 @@ void CXFA_FFImageEdit::UnloadWidget()
m_pDataAcc->SetImageEditImage(NULL);
CXFA_FFField::UnloadWidget();
}
-void CXFA_FFImageEdit::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , FX_INT32 iRotate )
+void CXFA_FFImageEdit::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , int32_t iRotate )
{
if (!IsMatchVisibleStatus(dwStatus)) {
return;
@@ -62,20 +62,20 @@ void CXFA_FFImageEdit::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_
if (CFX_DIBitmap* pDIBitmap = m_pDataAcc->GetImageEditImage()) {
CFX_RectF rtImage;
m_pNormalWidget->GetWidgetRect(rtImage);
- FX_INT32 iHorzAlign = XFA_ATTRIBUTEENUM_Left;
- FX_INT32 iVertAlign = XFA_ATTRIBUTEENUM_Top;
+ int32_t iHorzAlign = XFA_ATTRIBUTEENUM_Left;
+ int32_t iVertAlign = XFA_ATTRIBUTEENUM_Top;
if (CXFA_Para para = m_pDataAcc->GetPara()) {
iHorzAlign = para.GetHorizontalAlign();
iVertAlign = para.GetVerticalAlign();
}
- FX_INT32 iAspect = XFA_ATTRIBUTEENUM_Fit;
+ int32_t iAspect = XFA_ATTRIBUTEENUM_Fit;
if (CXFA_Value value = m_pDataAcc->GetFormValue()) {
if (CXFA_Image imageObj = value.GetImage()) {
iAspect = imageObj.GetAspect();
}
}
- FX_INT32 iImageXDpi = 0;
- FX_INT32 iImageYDpi = 0;
+ int32_t iImageXDpi = 0;
+ int32_t iImageYDpi = 0;
m_pDataAcc->GetImageEditDpi(iImageXDpi, iImageYDpi);
XFA_DrawImage(pGS, rtImage, &mtRotate, pDIBitmap, iAspect, iImageXDpi, iImageYDpi, iHorzAlign, iVertAlign);
}
@@ -106,7 +106,7 @@ FX_BOOL CXFA_FFImageEdit::OnLButtonDown(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT
pAppProvider->LoadString(XFA_IDS_ImageFilter, wsFilter);
CFX_WideStringArray wsPathArray;
pAppProvider->ShowFileDialog(wsTitle, wsFilter, wsPathArray);
- FX_INT32 iSize = wsPathArray.GetSize();
+ int32_t iSize = wsPathArray.GetSize();
if (iSize < 1) {
return TRUE;
}
@@ -129,7 +129,7 @@ FX_BOOL CXFA_FFImageEdit::OnLButtonDown(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT
CFX_WideString wsImage;
IFX_FileRead* pFileRead = FX_CreateFileRead(wsFilePath);
if (pFileRead != NULL) {
- FX_INT32 nDataSize = pFileRead->GetSize();
+ int32_t nDataSize = pFileRead->GetSize();
if (nDataSize > 0) {
CFX_ByteString bsBuf;
FX_LPSTR pImageBuffer = bsBuf.GetBuffer(nDataSize);
@@ -173,7 +173,7 @@ FX_BOOL CXFA_FFImageEdit::UpdateFWLData()
m_pDataAcc->LoadImageEditImage();
return TRUE;
}
-FX_INT32 CXFA_FFImageEdit::OnProcessMessage(CFWL_Message *pMessage)
+int32_t CXFA_FFImageEdit::OnProcessMessage(CFWL_Message *pMessage)
{
return m_pOldDelegate->OnProcessMessage(pMessage);
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffimageedit.h b/xfa/src/fxfa/src/app/xfa_ffimageedit.h
index 7ba8333103..9ca9928af8 100644
--- a/xfa/src/fxfa/src/app/xfa_ffimageedit.h
+++ b/xfa/src/fxfa/src/app/xfa_ffimageedit.h
@@ -12,11 +12,11 @@ public:
CXFA_FFImageEdit(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);
virtual ~CXFA_FFImageEdit();
- virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, FX_INT32 iRotate = 0);
+ virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, int32_t iRotate = 0);
virtual FX_BOOL LoadWidget();
virtual void UnloadWidget();
virtual FX_BOOL OnLButtonDown(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_INT32 OnProcessMessage(CFWL_Message *pMessage);
+ virtual int32_t OnProcessMessage(CFWL_Message *pMessage);
virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent);
virtual FWL_ERR OnDrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);
protected:
diff --git a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp
index 81119e6e47..d42e7e611c 100644
--- a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp
@@ -50,7 +50,7 @@ void CXFA_FFNotify::OnPageEvent(IXFA_LayoutPage *pSender, XFA_PAGEEVENT eEvent,
if (!pDocView) {
return;
}
- pDocView->OnPageEvent(pSender, eEvent, (FX_INT32)(FX_UINTPTR)pParam);
+ pDocView->OnPageEvent(pSender, eEvent, (int32_t)(uintptr_t)pParam);
}
void CXFA_FFNotify::OnNodeEvent(CXFA_Node *pSender, XFA_NODEEVENT eEvent, FX_LPVOID pParam , FX_LPVOID pParam2 , FX_LPVOID pParam3, FX_LPVOID pParam4)
{
@@ -91,9 +91,9 @@ void CXFA_FFNotify::OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent
while (pWidget) {
if (pWidget->IsLoaded()) {
if (pWidgetAcc->IsListBox()) {
- ((CXFA_FFListBox*)pWidget)->InsertItem((FX_WSTR)(FX_LPCWSTR)pParam, (FX_INT32)(FX_UINTPTR)pAdditional2);
+ ((CXFA_FFListBox*)pWidget)->InsertItem((FX_WSTR)(FX_LPCWSTR)pParam, (int32_t)(uintptr_t)pAdditional2);
} else {
- ((CXFA_FFComboBox*)pWidget)->InsertItem((FX_WSTR)(FX_LPCWSTR)pParam, (FX_INT32)(FX_UINTPTR)pAdditional2);
+ ((CXFA_FFComboBox*)pWidget)->InsertItem((FX_WSTR)(FX_LPCWSTR)pParam, (int32_t)(uintptr_t)pAdditional2);
}
}
if (bStaticNotify) {
@@ -118,9 +118,9 @@ void CXFA_FFNotify::OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent
while (pWidget) {
if (pWidget->IsLoaded()) {
if (pWidgetAcc->IsListBox()) {
- ((CXFA_FFListBox*)pWidget)->DeleteItem((FX_INT32)(FX_UINTPTR)pParam);
+ ((CXFA_FFListBox*)pWidget)->DeleteItem((int32_t)(uintptr_t)pParam);
} else {
- ((CXFA_FFComboBox*)pWidget)->DeleteItem((FX_INT32)(FX_UINTPTR)pParam);
+ ((CXFA_FFComboBox*)pWidget)->DeleteItem((int32_t)(uintptr_t)pParam);
}
}
if (bStaticNotify) {
@@ -248,7 +248,7 @@ void CXFA_FFNotify::StartFieldDrawLayout(CXFA_Node *pItem, FX_FLOAT &fCalcWidth,
}
pAcc->StartWidgetLayout(fCalcWidth, fCalcHeight);
}
-FX_BOOL CXFA_FFNotify::FindSplitPos(CXFA_Node *pItem, FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeightPos)
+FX_BOOL CXFA_FFNotify::FindSplitPos(CXFA_Node *pItem, int32_t iBlockIndex, FX_FLOAT &fCalcHeightPos)
{
CXFA_WidgetAcc *pAcc = (CXFA_WidgetAcc*)pItem->GetWidgetData();
if (!pAcc) {
@@ -270,14 +270,14 @@ FX_BOOL CXFA_FFNotify::RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem)
CXFA_EventParam EventParam;
EventParam.m_eType = XFA_EVENT_Unknown;
FXJSE_HVALUE pRetValue = NULL;
- FX_INT32 iRet = pWidgetAcc->ExecuteScript(CXFA_Script(pScript), &EventParam, &pRetValue);
+ int32_t iRet = pWidgetAcc->ExecuteScript(CXFA_Script(pScript), &EventParam, &pRetValue);
if (iRet == XFA_EVENTERROR_Sucess && pRetValue) {
bRet = FXJSE_Value_ToBoolean(pRetValue);
FXJSE_Value_Release(pRetValue);
}
return bRet;
}
-FX_INT32 CXFA_FFNotify::ExecEventByDeepFirst(CXFA_Node* pFormNode, XFA_EVENTTYPE eEventType, FX_BOOL bIsFormReady, FX_BOOL bRecursive, CXFA_WidgetAcc* pExclude)
+int32_t CXFA_FFNotify::ExecEventByDeepFirst(CXFA_Node* pFormNode, XFA_EVENTTYPE eEventType, FX_BOOL bIsFormReady, FX_BOOL bRecursive, CXFA_WidgetAcc* pExclude)
{
CXFA_FFDocView* pDocView = m_pDoc->GetDocView();
if (!pDocView) {
@@ -347,7 +347,7 @@ void CXFA_FFNotify::ResetData(CXFA_WidgetData* pWidgetData)
}
pDocView->ResetWidgetData((CXFA_WidgetAcc*)pWidgetData);
}
-FX_INT32 CXFA_FFNotify::GetLayoutStatus()
+int32_t CXFA_FFNotify::GetLayoutStatus()
{
CXFA_FFDocView* pDocView = m_pDoc->GetDocView();
return pDocView ? pDocView->GetLayoutStatus() : 0;
@@ -422,7 +422,7 @@ void CXFA_FFNotify::OnValueChanging(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPV
FX_DWORD dwPacket = pSender->GetPacketID();
if (dwPacket & XFA_XDPPACKET_Datasets) {
} else if (pSender->IsFormContainer()) {
- XFA_ATTRIBUTE eAttr = (XFA_ATTRIBUTE)(FX_UINTPTR)pParam;
+ XFA_ATTRIBUTE eAttr = (XFA_ATTRIBUTE)(uintptr_t)pParam;
if (eAttr == XFA_ATTRIBUTE_Presence) {
CXFA_WidgetAcc* pWidgetAcc = (CXFA_WidgetAcc*)pSender->GetWidgetData();
if (!pWidgetAcc) {
@@ -444,7 +444,7 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVO
return;
}
FX_DWORD dwPacket = pSender->GetPacketID();
- XFA_ATTRIBUTE eAttr = (XFA_ATTRIBUTE)(FX_UINTPTR)pParam;
+ XFA_ATTRIBUTE eAttr = (XFA_ATTRIBUTE)(uintptr_t)pParam;
if (dwPacket & XFA_XDPPACKET_Form) {
CXFA_Node* pParentNode = (CXFA_Node*)pParam3;
CXFA_Node* pWidgetNode = (CXFA_Node*)pParam4;
@@ -544,9 +544,9 @@ void CXFA_FFNotify::OnChildRemoved(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVO
void CXFA_FFNotify::OnLayoutItemAdd(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, FX_LPVOID pParam, FX_LPVOID pParam2)
{
CXFA_FFWidget* pWidget = (CXFA_FFWidget*)(CXFA_ContentLayoutItemImpl*)pSender;
- FX_INT32 iPageIdx = (FX_INT32)(FX_UINTPTR)pParam;
+ int32_t iPageIdx = (int32_t)(uintptr_t)pParam;
IXFA_PageView* pNewPageView = pDocView->GetPageView(iPageIdx);
- FX_DWORD dwStatus = (FX_DWORD)(FX_UINTPTR)pParam2;
+ FX_DWORD dwStatus = (FX_DWORD)(uintptr_t)pParam2;
FX_DWORD dwFilter = XFA_WIDGETSTATUS_Visible | XFA_WIDGETSTATUS_Viewable | XFA_WIDGETSTATUS_Printable;
pWidget->ModifyStatus(dwStatus, dwFilter);
if (pDocView->GetLayoutStatus() >= XFA_DOCVIEW_LAYOUTSTATUS_End) {
@@ -592,7 +592,7 @@ void CXFA_FFNotify::OnLayoutItemStatustChanged(CXFA_FFDocView* pDocView, IXFA_Do
if (!pWidget) {
return;
}
- FX_DWORD dwStatus = (FX_DWORD)(FX_UINTPTR)pParam;
+ FX_DWORD dwStatus = (FX_DWORD)(uintptr_t)pParam;
if (dwStatus == 0) {
CXFA_LayoutItem* pPreItem = pSender->GetPrev();
if (pPreItem) {
diff --git a/xfa/src/fxfa/src/app/xfa_ffnotify.h b/xfa/src/fxfa/src/app/xfa_ffnotify.h
index 383b0770cb..d289a1074a 100644
--- a/xfa/src/fxfa/src/app/xfa_ffnotify.h
+++ b/xfa/src/fxfa/src/app/xfa_ffnotify.h
@@ -20,9 +20,9 @@ public:
virtual void OnLayoutEvent(IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, XFA_LAYOUTEVENT eEvent, FX_LPVOID pParam = NULL, FX_LPVOID pParam2 = NULL);
virtual void StartFieldDrawLayout(CXFA_Node *pItem, FX_FLOAT &fCalcWidth, FX_FLOAT &fCalcHeight);
- virtual FX_BOOL FindSplitPos(CXFA_Node *pItem, FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeightPos);
+ virtual FX_BOOL FindSplitPos(CXFA_Node *pItem, int32_t iBlockIndex, FX_FLOAT &fCalcHeightPos);
virtual FX_BOOL RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem);
- virtual FX_INT32 ExecEventByDeepFirst(CXFA_Node* pFormNode, XFA_EVENTTYPE eEventType, FX_BOOL bIsFormReady = FALSE, FX_BOOL bRecursive = TRUE, CXFA_WidgetAcc * pExclude = NULL);
+ virtual int32_t ExecEventByDeepFirst(CXFA_Node* pFormNode, XFA_EVENTTYPE eEventType, FX_BOOL bIsFormReady = FALSE, FX_BOOL bRecursive = TRUE, CXFA_WidgetAcc * pExclude = NULL);
virtual void AddCalcValidate(CXFA_Node* pNode);
virtual IXFA_Doc* GetHDOC();
virtual IXFA_DocProvider* GetDocProvider();
@@ -32,7 +32,7 @@ public:
virtual void OpenDropDownList(IXFA_Widget* hWidget);
virtual CFX_WideString GetCurrentDateTime();
virtual void ResetData(CXFA_WidgetData* pWidgetData = NULL);
- virtual FX_INT32 GetLayoutStatus();
+ virtual int32_t GetLayoutStatus();
virtual void RunNodeInitialize(CXFA_Node* pNode);
virtual void RunSubformIndexChange(CXFA_Node* pSubformNode);
virtual CXFA_Node* GetFocusWidgetNode();
diff --git a/xfa/src/fxfa/src/app/xfa_ffpageview.cpp b/xfa/src/fxfa/src/app/xfa_ffpageview.cpp
index ef340859ea..11384b141e 100644
--- a/xfa/src/fxfa/src/app/xfa_ffpageview.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffpageview.cpp
@@ -30,7 +30,7 @@ IXFA_DocView* CXFA_FFPageView::GetDocView()
{
return m_pDocView;
}
-FX_INT32 CXFA_FFPageView::GetPageViewIndex()
+int32_t CXFA_FFPageView::GetPageViewIndex()
{
return GetLayoutPage()->GetPageIndex();
}
@@ -40,7 +40,7 @@ void CXFA_FFPageView::GetPageViewRect(CFX_RectF &rtPage)
GetLayoutPage()->GetPageSize(sz);
rtPage.Set(0, 0, sz);
}
-void CXFA_FFPageView::GetDisplayMatrix(CFX_Matrix &mt, const CFX_Rect &rtDisp, FX_INT32 iRotate)
+void CXFA_FFPageView::GetDisplayMatrix(CFX_Matrix &mt, const CFX_Rect &rtDisp, int32_t iRotate)
{
CFX_SizeF sz;
GetLayoutPage()->GetPageSize(sz);
@@ -48,7 +48,7 @@ void CXFA_FFPageView::GetDisplayMatrix(CFX_Matrix &mt, const CFX_Rect &rtDisp, F
fdePage.Set(0, 0, sz.x, sz.y);
FDE_GetPageMatrix(mt, fdePage, rtDisp, iRotate, 0);
}
-FX_INT32 CXFA_FFPageView::LoadPageView(IFX_Pause *pPause )
+int32_t CXFA_FFPageView::LoadPageView(IFX_Pause *pPause )
{
if (m_bLoaded) {
return 100;
@@ -77,7 +77,7 @@ IXFA_Widget* CXFA_FFPageView::GetWidgetByPos(FX_FLOAT fx, FX_FLOAT fy)
continue;
}
CXFA_WidgetAcc* pAcc = pWidget->GetDataAcc();
- FX_INT32 type = pAcc->GetClassID();
+ int32_t type = pAcc->GetClassID();
if (type != XFA_ELEMENT_Field && type != XFA_ELEMENT_Draw) {
continue;
}
@@ -216,7 +216,7 @@ void CXFA_FFTabOrderPageWidgetIterator::Reset()
IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::MoveToFirst()
{
if (m_TabOrderWidgetArray.GetSize() > 0) {
- for (FX_INT32 i = 0; i < m_TabOrderWidgetArray.GetSize(); i++) {
+ for (int32_t i = 0; i < m_TabOrderWidgetArray.GetSize(); i++) {
if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, m_bIgnorerelevant)) {
m_iCurWidget = i;
return m_TabOrderWidgetArray[m_iCurWidget];
@@ -228,7 +228,7 @@ IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::MoveToFirst()
IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::MoveToLast()
{
if (m_TabOrderWidgetArray.GetSize() > 0) {
- for (FX_INT32 i = m_TabOrderWidgetArray.GetSize() - 1; i >= 0; i--) {
+ for (int32_t i = m_TabOrderWidgetArray.GetSize() - 1; i >= 0; i--) {
if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, m_bIgnorerelevant)) {
m_iCurWidget = i;
return m_TabOrderWidgetArray[m_iCurWidget];
@@ -239,7 +239,7 @@ IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::MoveToLast()
}
IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::MoveToNext()
{
- for (FX_INT32 i = m_iCurWidget + 1; i < m_TabOrderWidgetArray.GetSize(); i++) {
+ for (int32_t i = m_iCurWidget + 1; i < m_TabOrderWidgetArray.GetSize(); i++) {
if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, m_bIgnorerelevant)) {
m_iCurWidget = i;
return m_TabOrderWidgetArray[m_iCurWidget];
@@ -250,7 +250,7 @@ IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::MoveToNext()
}
IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::MoveToPrevious()
{
- for (FX_INT32 i = m_iCurWidget - 1; i >= 0; i--) {
+ for (int32_t i = m_iCurWidget - 1; i >= 0; i--) {
if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, m_bIgnorerelevant)) {
m_iCurWidget = i;
return m_TabOrderWidgetArray[m_iCurWidget];
@@ -268,7 +268,7 @@ IXFA_Widget* CXFA_FFTabOrderPageWidgetIterator::GetCurrentWidget()
}
FX_BOOL CXFA_FFTabOrderPageWidgetIterator::SetCurrentWidget(IXFA_Widget* hWidget)
{
- FX_INT32 iWidgetIndex = m_TabOrderWidgetArray.Find(static_cast<CXFA_FFWidget*>(hWidget));
+ int32_t iWidgetIndex = m_TabOrderWidgetArray.Find(static_cast<CXFA_FFWidget*>(hWidget));
if (iWidgetIndex >= 0) {
m_iCurWidget = iWidgetIndex;
return TRUE;
@@ -299,7 +299,7 @@ void CXFA_FFTabOrderPageWidgetIterator::CreateTabOrderWidgetArray()
m_TabOrderWidgetArray.RemoveAll();
CXFA_WidgetArray SpaceOrderWidgetArray;
CreateSpaceOrderWidgetArray(SpaceOrderWidgetArray);
- FX_INT32 nWidgetCount = SpaceOrderWidgetArray.GetSize();
+ int32_t nWidgetCount = SpaceOrderWidgetArray.GetSize();
if (nWidgetCount < 1) {
return;
}
@@ -309,7 +309,7 @@ void CXFA_FFTabOrderPageWidgetIterator::CreateTabOrderWidgetArray()
m_TabOrderWidgetArray.Add(hWidget);
CXFA_WidgetAcc* pWidgetAcc = hWidget->GetDataAcc();
if (pWidgetAcc->GetUIType() == XFA_ELEMENT_ExclGroup) {
- FX_INT32 iWidgetIndex = SpaceOrderWidgetArray.Find(hWidget) + 1;
+ int32_t iWidgetIndex = SpaceOrderWidgetArray.Find(hWidget) + 1;
while (TRUE) {
CXFA_FFWidget* pRadio = SpaceOrderWidgetArray[(iWidgetIndex) % nWidgetCount];
if (pRadio->GetDataAcc()->GetExclGroup() != pWidgetAcc) {
@@ -326,11 +326,11 @@ void CXFA_FFTabOrderPageWidgetIterator::CreateTabOrderWidgetArray()
continue;
}
}
- FX_INT32 iWidgetIndex = SpaceOrderWidgetArray.Find(hWidget);
+ int32_t iWidgetIndex = SpaceOrderWidgetArray.Find(hWidget);
hWidget = SpaceOrderWidgetArray[(iWidgetIndex + 1) % nWidgetCount];
}
}
-static FX_INT32 XFA_TabOrderWidgetComparator(const void* phWidget1, const void* phWidget2)
+static int32_t XFA_TabOrderWidgetComparator(const void* phWidget1, const void* phWidget2)
{
CXFA_FFWidget* pWidget1 = (*(CXFA_TabParam**)phWidget1)->m_pWidget;
CXFA_FFWidget* pWidget2 = (*(CXFA_TabParam**)phWidget2)->m_pWidget;
@@ -381,11 +381,11 @@ void CXFA_FFTabOrderPageWidgetIterator::OrderContainer(CXFA_LayoutItemIterator*
pSearchItem = sIterator->MoveToNext();
}
}
- FX_INT32 iChildren = tabParams.GetSize();
+ int32_t iChildren = tabParams.GetSize();
if (iChildren > 1) {
FXSYS_qsort(tabParams.GetData(), iChildren, sizeof(FX_LPVOID), XFA_TabOrderWidgetComparator);
}
- for (FX_INT32 iStart = 0; iStart < iChildren; iStart++) {
+ for (int32_t iStart = 0; iStart < iChildren; iStart++) {
CXFA_TabParam* pParam = (CXFA_TabParam*)tabParams[iStart];
pContainer->m_Children.Add(pParam->m_pWidget);
if (pParam->m_Children.GetSize() > 0) {
diff --git a/xfa/src/fxfa/src/app/xfa_ffpageview.h b/xfa/src/fxfa/src/app/xfa_ffpageview.h
index dd0a481ffb..b80248bf0a 100644
--- a/xfa/src/fxfa/src/app/xfa_ffpageview.h
+++ b/xfa/src/fxfa/src/app/xfa_ffpageview.h
@@ -14,10 +14,10 @@ public:
CXFA_FFPageView(CXFA_FFDocView* pDocView, CXFA_Node* pPageArea);
~CXFA_FFPageView();
virtual IXFA_DocView* GetDocView();
- virtual FX_INT32 GetPageViewIndex();
+ virtual int32_t GetPageViewIndex();
virtual void GetPageViewRect(CFX_RectF &rtPage);
- virtual void GetDisplayMatrix(CFX_Matrix &mt, const CFX_Rect &rtDisp, FX_INT32 iRotate);
- virtual FX_INT32 LoadPageView(IFX_Pause *pPause = NULL);
+ virtual void GetDisplayMatrix(CFX_Matrix &mt, const CFX_Rect &rtDisp, int32_t iRotate);
+ virtual int32_t LoadPageView(IFX_Pause *pPause = NULL);
virtual void UnloadPageView();
FX_BOOL IsPageViewLoaded();
@@ -87,7 +87,7 @@ protected:
CXFA_WidgetArray m_TabOrderWidgetArray;
CXFA_FFPageView* m_pPageView;
FX_DWORD m_dwFilter;
- FX_INT32 m_iCurWidget;
+ int32_t m_iCurWidget;
FX_BOOL m_bIgnorerelevant;
CXFA_FFWidget* GetTraverseWidget(CXFA_FFWidget* pWidget);
CXFA_FFWidget* FindWidgetByName(FX_WSTR wsWidgetName, CXFA_FFWidget* pRefWidget);
diff --git a/xfa/src/fxfa/src/app/xfa_ffpath.cpp b/xfa/src/fxfa/src/app/xfa_ffpath.cpp
index 2f8b71a50a..1cf993b737 100644
--- a/xfa/src/fxfa/src/app/xfa_ffpath.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffpath.cpp
@@ -19,7 +19,7 @@ CXFA_FFLine::CXFA_FFLine(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc)
CXFA_FFLine::~CXFA_FFLine()
{
}
-void CXFA_FFLine::GetRectFromHand(CFX_RectF &rect, FX_INT32 iHand, FX_FLOAT fLineWidth)
+void CXFA_FFLine::GetRectFromHand(CFX_RectF &rect, int32_t iHand, FX_FLOAT fLineWidth)
{
FX_FLOAT fHalfWidth = fLineWidth / 2.0f;
if (rect.height < 1.0f) {
@@ -50,7 +50,7 @@ void CXFA_FFLine::GetRectFromHand(CFX_RectF &rect, FX_INT32 iHand, FX_FLOAT fLin
}
}
}
-void CXFA_FFLine::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , FX_INT32 iRotate )
+void CXFA_FFLine::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , int32_t iRotate )
{
if (!IsMatchVisibleStatus(dwStatus)) {
return;
@@ -61,10 +61,10 @@ void CXFA_FFLine::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD
}
CXFA_Line lineObj = value.GetLine();
FX_ARGB lineColor = 0xFF000000;
- FX_INT32 iStrokeType = 0;
+ int32_t iStrokeType = 0;
FX_FLOAT fLineWidth = 1.0f;
FX_BOOL bSlope = lineObj.GetSlop();
- FX_INT32 iCap = 0;
+ int32_t iCap = 0;
CXFA_Edge edge = lineObj.GetEdge();
if (edge.IsExistInXML()) {
if (edge.GetPresence() != XFA_ATTRIBUTEENUM_Visible) {
@@ -109,7 +109,7 @@ CXFA_FFArc::CXFA_FFArc(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc)
CXFA_FFArc::~CXFA_FFArc()
{
}
-void CXFA_FFArc::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , FX_INT32 iRotate )
+void CXFA_FFArc::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , int32_t iRotate )
{
if (!IsMatchVisibleStatus(dwStatus)) {
return;
@@ -138,7 +138,7 @@ CXFA_FFRectangle::CXFA_FFRectangle(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* p
CXFA_FFRectangle::~CXFA_FFRectangle()
{
}
-void CXFA_FFRectangle::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , FX_INT32 iRotate )
+void CXFA_FFRectangle::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , int32_t iRotate )
{
if (!IsMatchVisibleStatus(dwStatus)) {
return;
diff --git a/xfa/src/fxfa/src/app/xfa_ffpath.h b/xfa/src/fxfa/src/app/xfa_ffpath.h
index 08828f3b84..aed4a67a0b 100644
--- a/xfa/src/fxfa/src/app/xfa_ffpath.h
+++ b/xfa/src/fxfa/src/app/xfa_ffpath.h
@@ -11,22 +11,22 @@ class CXFA_FFLine : public CXFA_FFDraw
public:
CXFA_FFLine(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);
virtual ~CXFA_FFLine();
- virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, FX_INT32 iRotate = 0);
+ virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, int32_t iRotate = 0);
private:
- void GetRectFromHand(CFX_RectF &rect, FX_INT32 iHand, FX_FLOAT fLineWidth);
+ void GetRectFromHand(CFX_RectF &rect, int32_t iHand, FX_FLOAT fLineWidth);
};
class CXFA_FFArc : public CXFA_FFDraw
{
public:
CXFA_FFArc(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);
virtual ~CXFA_FFArc();
- virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, FX_INT32 iRotate = 0);
+ virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, int32_t iRotate = 0);
};
class CXFA_FFRectangle : public CXFA_FFDraw
{
public:
CXFA_FFRectangle(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);
virtual ~CXFA_FFRectangle();
- virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, FX_INT32 iRotate = 0);
+ virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, int32_t iRotate = 0);
};
#endif
diff --git a/xfa/src/fxfa/src/app/xfa_ffpushbutton.cpp b/xfa/src/fxfa/src/app/xfa_ffpushbutton.cpp
index 125cb4f5b7..4ea2ac48ec 100644
--- a/xfa/src/fxfa/src/app/xfa_ffpushbutton.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffpushbutton.cpp
@@ -26,7 +26,7 @@ CXFA_FFPushButton::~CXFA_FFPushButton()
{
CXFA_FFPushButton::UnloadWidget();
}
-void CXFA_FFPushButton::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , FX_INT32 iRotate )
+void CXFA_FFPushButton::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , int32_t iRotate )
{
if (!IsMatchVisibleStatus(dwStatus)) {
return;
@@ -208,7 +208,7 @@ void CXFA_FFPushButton::RenderHighlightCaption(CFX_Graphics* pGS, CFX_Matrix* pM
}
}
}
-FX_INT32 CXFA_FFPushButton::OnProcessMessage(CFWL_Message *pMessage)
+int32_t CXFA_FFPushButton::OnProcessMessage(CFWL_Message *pMessage)
{
return m_pOldDelegate->OnProcessMessage(pMessage);
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffpushbutton.h b/xfa/src/fxfa/src/app/xfa_ffpushbutton.h
index 07503292f5..e82b8904b8 100644
--- a/xfa/src/fxfa/src/app/xfa_ffpushbutton.h
+++ b/xfa/src/fxfa/src/app/xfa_ffpushbutton.h
@@ -15,12 +15,12 @@ class CXFA_FFPushButton : public CXFA_FFField
public:
CXFA_FFPushButton(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);
virtual ~CXFA_FFPushButton();
- virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, FX_INT32 iRotate = 0);
+ virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, int32_t iRotate = 0);
virtual FX_BOOL LoadWidget();
virtual void UnloadWidget();
virtual FX_BOOL LayoutWidget();
virtual void UpdateWidgetProperty();
- virtual FX_INT32 OnProcessMessage(CFWL_Message *pMessage);
+ virtual int32_t OnProcessMessage(CFWL_Message *pMessage);
virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent);
virtual FWL_ERR OnDrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);
protected:
diff --git a/xfa/src/fxfa/src/app/xfa_ffsignature.cpp b/xfa/src/fxfa/src/app/xfa_ffsignature.cpp
index a7f48c7033..ed4beca66e 100644
--- a/xfa/src/fxfa/src/app/xfa_ffsignature.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffsignature.cpp
@@ -22,7 +22,7 @@ FX_BOOL CXFA_FFSignature::LoadWidget()
{
return CXFA_FFField::LoadWidget();
}
-void CXFA_FFSignature::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , FX_INT32 iRotate )
+void CXFA_FFSignature::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , int32_t iRotate )
{
if (!IsMatchVisibleStatus(dwStatus)) {
return;
@@ -66,7 +66,7 @@ FX_BOOL CXFA_FFSignature::OnMouseMove(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy
{
return FALSE;
}
-FX_BOOL CXFA_FFSignature::OnMouseWheel(FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy)
+FX_BOOL CXFA_FFSignature::OnMouseWheel(FX_DWORD dwFlags, int16_t zDelta, FX_FLOAT fx, FX_FLOAT fy)
{
return FALSE;
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffsignature.h b/xfa/src/fxfa/src/app/xfa_ffsignature.h
index f7848d8b32..f82856b607 100644
--- a/xfa/src/fxfa/src/app/xfa_ffsignature.h
+++ b/xfa/src/fxfa/src/app/xfa_ffsignature.h
@@ -12,7 +12,7 @@ public:
CXFA_FFSignature(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);
virtual ~CXFA_FFSignature();
- virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, FX_INT32 iRotate = 0);
+ virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, int32_t iRotate = 0);
virtual FX_BOOL LoadWidget();
virtual FX_BOOL OnMouseEnter();
virtual FX_BOOL OnMouseExit();
@@ -20,7 +20,7 @@ public:
virtual FX_BOOL OnLButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnLButtonDblClk(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnMouseMove(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnMouseWheel(FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy);
+ virtual FX_BOOL OnMouseWheel(FX_DWORD dwFlags, int16_t zDelta, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnRButtonDown(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnRButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnRButtonDblClk(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
diff --git a/xfa/src/fxfa/src/app/xfa_fftext.cpp b/xfa/src/fxfa/src/app/xfa_fftext.cpp
index 1d121a330a..2d153c2968 100644
--- a/xfa/src/fxfa/src/app/xfa_fftext.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fftext.cpp
@@ -20,7 +20,7 @@ CXFA_FFText::CXFA_FFText(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc)
CXFA_FFText::~CXFA_FFText()
{
}
-void CXFA_FFText::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , FX_INT32 iRotate )
+void CXFA_FFText::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , int32_t iRotate )
{
if (!IsMatchVisibleStatus(dwStatus)) {
return;
@@ -166,11 +166,11 @@ FX_LPCWSTR CXFA_FFText::GetLinkURLAtPoint(FX_FLOAT fx, FX_FLOAT fy)
FX_FLOAT x(fx), y(fy);
FWLToClient(x, y);
const CXFA_PieceLineArray* pPieceLines = pTextLayout->GetPieceLines();
- FX_INT32 iCount = pPieceLines->GetSize();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = pPieceLines->GetSize();
+ for (int32_t i = 0; i < iCount; i++) {
CXFA_PieceLine *pPieceLine = pPieceLines->GetAt(i);
- FX_INT32 iPieces = pPieceLine->m_textPieces.GetSize();
- for (FX_INT32 j = 0; j < iPieces; j++) {
+ int32_t iPieces = pPieceLine->m_textPieces.GetSize();
+ for (int32_t j = 0; j < iPieces; j++) {
XFA_LPTEXTPIECE pPiece = pPieceLine->m_textPieces.GetAt(j);
if (pPiece->pLinkData && pPiece->rtPiece.Contains(x, y)) {
return pPiece->pLinkData->GetLinkURL();
diff --git a/xfa/src/fxfa/src/app/xfa_fftext.h b/xfa/src/fxfa/src/app/xfa_fftext.h
index d686a97f4c..0210b55610 100644
--- a/xfa/src/fxfa/src/app/xfa_fftext.h
+++ b/xfa/src/fxfa/src/app/xfa_fftext.h
@@ -16,7 +16,7 @@ public:
virtual FX_BOOL OnLButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnMouseMove(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_DWORD OnHitTest(FX_FLOAT fx, FX_FLOAT fy);
- virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, FX_INT32 iRotate = 0);
+ virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, int32_t iRotate = 0);
virtual FX_BOOL IsLoaded();
virtual FX_BOOL LayoutWidget();
private:
diff --git a/xfa/src/fxfa/src/app/xfa_fftextedit.cpp b/xfa/src/fxfa/src/app/xfa_fftextedit.cpp
index 5d50c52e84..afdfd1fee8 100644
--- a/xfa/src/fxfa/src/app/xfa_fftextedit.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fftextedit.cpp
@@ -69,11 +69,11 @@ void CXFA_FFTextEdit::UpdateWidgetProperty()
dwExtendedStyle |= FWL_STYLEEXT_EDT_MultiLine;
}
XFA_ELEMENT eType = XFA_ELEMENT_UNKNOWN;
- FX_INT32 iMaxChars = m_pDataAcc->GetMaxChars(eType);
+ int32_t iMaxChars = m_pDataAcc->GetMaxChars(eType);
if (eType == XFA_ELEMENT_ExData) {
iMaxChars = 0;
}
- FX_INT32 iNumCells = m_pDataAcc->GetNumberOfCells();
+ int32_t iNumCells = m_pDataAcc->GetNumberOfCells();
if (iNumCells == 0) {
dwExtendedStyle |= FWL_STYLEEXT_EDT_CombText;
pWidget->SetLimit(iMaxChars > 0 ? iMaxChars : 1);
@@ -208,7 +208,7 @@ FX_DWORD CXFA_FFTextEdit::GetAlignment()
{
FX_DWORD dwExtendedStyle = 0;
if (CXFA_Para para = m_pDataAcc->GetPara()) {
- FX_INT32 iHorz = para.GetHorizontalAlign();
+ int32_t iHorz = para.GetHorizontalAlign();
switch(iHorz) {
case XFA_ATTRIBUTEENUM_Center:
dwExtendedStyle |= FWL_STYLEEXT_EDT_HCenter;
@@ -227,7 +227,7 @@ FX_DWORD CXFA_FFTextEdit::GetAlignment()
dwExtendedStyle |= FWL_STYLEEXT_EDT_HNear;
break;
}
- FX_INT32 iVert = para.GetVerticalAlign();
+ int32_t iVert = para.GetVerticalAlign();
switch(iVert) {
case XFA_ATTRIBUTEENUM_Middle:
dwExtendedStyle |= FWL_STYLEEXT_EDT_VCenter;
@@ -254,7 +254,7 @@ FX_BOOL CXFA_FFTextEdit::UpdateFWLData()
FX_BOOL bUpdate = FALSE;
if (m_pDataAcc->GetUIType() == XFA_ELEMENT_TextEdit && m_pDataAcc->GetNumberOfCells() < 0) {
XFA_ELEMENT elementType = XFA_ELEMENT_UNKNOWN;
- FX_INT32 iMaxChars = m_pDataAcc->GetMaxChars(elementType);
+ int32_t iMaxChars = m_pDataAcc->GetMaxChars(elementType);
if (elementType == XFA_ELEMENT_ExData) {
iMaxChars = eType == XFA_VALUEPICTURE_Edit ? iMaxChars : 0;
}
@@ -294,7 +294,7 @@ FX_BOOL CXFA_FFTextEdit::Redo()
}
FX_BOOL CXFA_FFTextEdit::CanCopy()
{
- FX_INT32 nCount = ((CFWL_Edit*)m_pNormalWidget)->CountSelRanges();
+ int32_t nCount = ((CFWL_Edit*)m_pNormalWidget)->CountSelRanges();
return nCount > 0;
}
FX_BOOL CXFA_FFTextEdit::CanCut()
@@ -302,7 +302,7 @@ FX_BOOL CXFA_FFTextEdit::CanCut()
if (m_pNormalWidget->GetStylesEx() & FWL_STYLEEXT_EDT_ReadOnly) {
return FALSE;
}
- FX_INT32 nCount = ((CFWL_Edit*)m_pNormalWidget)->CountSelRanges();
+ int32_t nCount = ((CFWL_Edit*)m_pNormalWidget)->CountSelRanges();
return nCount > 0;
}
FX_BOOL CXFA_FFTextEdit::CanPaste()
@@ -327,7 +327,7 @@ FX_BOOL CXFA_FFTextEdit::Paste(const CFX_WideString &wsPaste)
}
FX_BOOL CXFA_FFTextEdit::SelectAll()
{
- FX_INT32 nCount = ((CFWL_Edit*)m_pNormalWidget)->GetTextLength();
+ int32_t nCount = ((CFWL_Edit*)m_pNormalWidget)->GetTextLength();
return ((CFWL_Edit*)m_pNormalWidget)->AddSelRange(0, nCount);
}
FX_BOOL CXFA_FFTextEdit::Delete()
@@ -366,13 +366,13 @@ void CXFA_FFTextEdit::OnTextChanged(IFWL_Widget *pWidget, const CFX_WideString &
if (m_pDataAcc->GetUIType() == XFA_ELEMENT_DateTimeEdit) {
CFWL_DateTimePicker* pDateTime = (CFWL_DateTimePicker*)pEdit;
pDateTime->GetEditText(eParam.m_wsNewText);
- FX_INT32 iSels = pDateTime->CountSelRanges();
+ int32_t iSels = pDateTime->CountSelRanges();
if (iSels ) {
eParam.m_iSelEnd = pDateTime->GetSelRange(0, eParam.m_iSelStart);
}
} else {
pEdit->GetText(eParam.m_wsNewText);
- FX_INT32 iSels = pEdit->CountSelRanges();
+ int32_t iSels = pEdit->CountSelRanges();
if (iSels ) {
eParam.m_iSelEnd = pEdit->GetSelRange(0, eParam.m_iSelStart);
}
@@ -404,7 +404,7 @@ FX_BOOL CXFA_FFTextEdit::GetSuggestWords(FX_BSTR sWord, CFX_ByteStringArray &sSu
}
return GetDoc()->GetDocProvider()->GetSuggestWords(GetDoc(), sWord, sSuggest);
}
-FX_INT32 CXFA_FFTextEdit::OnProcessMessage(CFWL_Message *pMessage)
+int32_t CXFA_FFTextEdit::OnProcessMessage(CFWL_Message *pMessage)
{
return m_pOldDelegate->OnProcessMessage(pMessage);
}
@@ -485,7 +485,7 @@ void CXFA_FFNumericEdit::UpdateWidgetProperty()
if (m_pDataAcc->GetHorizontalScrollPolicy() != XFA_ATTRIBUTEENUM_Off) {
dwExtendedStyle |= FWL_STYLEEXT_EDT_AutoHScroll;
}
- FX_INT32 iNumCells = m_pDataAcc->GetNumberOfCells();
+ int32_t iNumCells = m_pDataAcc->GetNumberOfCells();
if (iNumCells > 0) {
dwExtendedStyle |= FWL_STYLEEXT_EDT_CombText;
pWidget->SetLimit(iNumCells);
@@ -515,9 +515,9 @@ FX_BOOL CXFA_FFNumericEdit::OnValidate(IFWL_Widget *pWidget, CFX_WideString &wsT
if (!wsPattern.IsEmpty()) {
return TRUE;
}
- FX_INT32 iLeads = 0;
+ int32_t iLeads = 0;
m_pDataAcc->GetLeadDigits(iLeads);
- FX_INT32 iFracs = 0;
+ int32_t iFracs = 0;
m_pDataAcc->GetFracDigits(iFracs);
CFX_WideString wsFormat;
CXFA_LocaleValue widgetValue = XFA_GetLocaleValue(m_pDataAcc);
@@ -661,7 +661,7 @@ void CXFA_FFDateTimeEdit::UpdateWidgetProperty()
dwExtendedStyle |= GetAlignment();
m_pNormalWidget->ModifyStylesEx(dwExtendedStyle, 0xFFFFFFFF);
FX_DWORD dwEditStyles = FWL_STYLEEXT_EDT_LastLineHeight;
- FX_INT32 iNumCells = m_pDataAcc->GetNumberOfCells();
+ int32_t iNumCells = m_pDataAcc->GetNumberOfCells();
if (iNumCells > 0) {
dwEditStyles |= FWL_STYLEEXT_EDT_CombText;
pWidget->SetEditLimit(iNumCells);
@@ -678,7 +678,7 @@ FX_DWORD CXFA_FFDateTimeEdit::GetAlignment()
{
FX_DWORD dwExtendedStyle = 0;
if (CXFA_Para para = m_pDataAcc->GetPara()) {
- FX_INT32 iHorz = para.GetHorizontalAlign();
+ int32_t iHorz = para.GetHorizontalAlign();
switch(iHorz) {
case XFA_ATTRIBUTEENUM_Center:
dwExtendedStyle |= FWL_STYLEEXT_DTP_EditHCenter;
@@ -697,7 +697,7 @@ FX_DWORD CXFA_FFDateTimeEdit::GetAlignment()
dwExtendedStyle |= FWL_STYLEEXT_DTP_EditHNear;
break;
}
- FX_INT32 iVert = para.GetVerticalAlign();
+ int32_t iVert = para.GetVerticalAlign();
switch(iVert) {
case XFA_ATTRIBUTEENUM_Middle:
dwExtendedStyle |= FWL_STYLEEXT_DTP_EditVCenter;
@@ -816,7 +816,7 @@ FX_BOOL CXFA_FFDateTimeEdit::DeSelect()
{
return ((CFWL_DateTimePicker*)m_pNormalWidget)->DeSelect();
}
-void CXFA_FFDateTimeEdit::OnSelectChanged(IFWL_Widget *pWidget, FX_INT32 iYear, FX_INT32 iMonth, FX_INT32 iDay)
+void CXFA_FFDateTimeEdit::OnSelectChanged(IFWL_Widget *pWidget, int32_t iYear, int32_t iMonth, int32_t iDay)
{
CFX_WideString wsPicture;
m_pDataAcc->GetPictureContent(wsPicture, XFA_VALUEPICTURE_Edit);
diff --git a/xfa/src/fxfa/src/app/xfa_fftextedit.h b/xfa/src/fxfa/src/app/xfa_fftextedit.h
index ecfe3bda83..ece1a4b9e3 100644
--- a/xfa/src/fxfa/src/app/xfa_fftextedit.h
+++ b/xfa/src/fxfa/src/app/xfa_fftextedit.h
@@ -47,7 +47,7 @@ public:
void OnAddDoRecord(IFWL_Widget *pWidget);
FX_BOOL CheckWord(FX_BSTR sWord);
FX_BOOL GetSuggestWords(FX_BSTR sWord, CFX_ByteStringArray &sSuggest);
- virtual FX_INT32 OnProcessMessage(CFWL_Message *pMessage);
+ virtual int32_t OnProcessMessage(CFWL_Message *pMessage);
virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent);
virtual FWL_ERR OnDrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);
};
@@ -111,7 +111,7 @@ protected:
virtual FX_BOOL UpdateFWLData();
virtual FX_BOOL IsDataChanged();
public:
- void OnSelectChanged(IFWL_Widget *pWidget, FX_INT32 iYear, FX_INT32 iMonth, FX_INT32 iDay);
+ void OnSelectChanged(IFWL_Widget *pWidget, int32_t iYear, int32_t iMonth, int32_t iDay);
virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent);
};
#endif
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
index 0967da1284..f747bdd2f9 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
@@ -102,7 +102,7 @@ FX_BOOL CXFA_FFWidget::GetToolTip(CFX_WideString &wsToolTip)
}
return GetCaptionText(wsToolTip);
}
-void CXFA_FFWidget::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , FX_INT32 iRotate )
+void CXFA_FFWidget::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , int32_t iRotate )
{
if (!IsMatchVisibleStatus(dwStatus)) {
return;
@@ -206,7 +206,7 @@ FX_BOOL CXFA_FFWidget::OnMouseMove(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
{
return FALSE;
}
-FX_BOOL CXFA_FFWidget::OnMouseWheel(FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy)
+FX_BOOL CXFA_FFWidget::OnMouseWheel(FX_DWORD dwFlags, int16_t zDelta, FX_FLOAT fx, FX_FLOAT fy)
{
return FALSE;
}
@@ -279,7 +279,7 @@ void CXFA_FFWidget::Rotate2Normal(FX_FLOAT &fx, FX_FLOAT &fy)
mtReverse.SetReverse(mt);
mtReverse.TransformPoint(fx, fy);
}
-static void XFA_GetMatrix(CFX_Matrix &m, FX_INT32 iRotate, FX_INT32 at, const CFX_RectF& rt)
+static void XFA_GetMatrix(CFX_Matrix &m, int32_t iRotate, int32_t at, const CFX_RectF& rt)
{
if (!iRotate) {
return;
@@ -329,7 +329,7 @@ static void XFA_GetMatrix(CFX_Matrix &m, FX_INT32 iRotate, FX_INT32 at, const CF
void CXFA_FFWidget::GetRotateMatrix(CFX_Matrix &mt)
{
mt.Set(1, 0, 0, 1, 0, 0);
- FX_INT32 iRotate = m_pDataAcc->GetRotate();
+ int32_t iRotate = m_pDataAcc->GetRotate();
if (!iRotate) {
return;
}
@@ -440,7 +440,7 @@ void CXFA_FFWidget::SetButtonDown(FX_BOOL bSet)
{
bSet ? m_dwStatus |= XFA_WIDGETSTATUS_ButtonDown : m_dwStatus &= ~XFA_WIDGETSTATUS_ButtonDown;
}
-FX_INT32 XFA_StrokeTypeSetLineDash(CFX_Graphics* pGraphics, FX_INT32 iStrokeType, FX_INT32 iCapType)
+int32_t XFA_StrokeTypeSetLineDash(CFX_Graphics* pGraphics, int32_t iStrokeType, int32_t iCapType)
{
switch(iStrokeType) {
case XFA_ATTRIBUTEENUM_DashDot: {
@@ -484,7 +484,7 @@ FX_INT32 XFA_StrokeTypeSetLineDash(CFX_Graphics* pGraphics, FX_INT32 iStrokeType
pGraphics->SetLineDash(FX_DASHSTYLE_Solid);
return FX_DASHSTYLE_Solid;
}
-CFX_GraphStateData::LineCap XFA_LineCapToFXGE(FX_INT32 iLineCap)
+CFX_GraphStateData::LineCap XFA_LineCapToFXGE(int32_t iLineCap)
{
switch(iLineCap) {
case XFA_ATTRIBUTEENUM_Round:
@@ -515,7 +515,7 @@ protected:
FX_DWORD m_Flags;
CFX_ImageTransformer* m_pTransformer;
FX_LPVOID m_DeviceHandle;
- FX_INT32 m_BlendType;
+ int32_t m_BlendType;
FX_BOOL m_Result;
FX_BOOL m_bPrint;
FX_BOOL StartDIBSource();
@@ -686,7 +686,7 @@ void CXFA_ImageRenderer::CompositeDIBitmap(CFX_DIBitmap* pDIBitmap, int left, in
} else {
FX_DWORD fill_argb = (mask_argb);
if (bitmap_alpha < 255) {
- ((FX_BYTE*)&fill_argb)[3] = ((FX_BYTE*)&fill_argb)[3] * bitmap_alpha / 255;
+ ((uint8_t*)&fill_argb)[3] = ((uint8_t*)&fill_argb)[3] * bitmap_alpha / 255;
}
if (m_pDevice->SetBitMask(pDIBitmap, left, top, fill_argb)) {
return;
@@ -752,7 +752,7 @@ void CXFA_ImageRenderer::CompositeDIBitmap(CFX_DIBitmap* pDIBitmap, int left, in
return;
}
}
-void XFA_DrawImage(CFX_Graphics* pGS, const CFX_RectF &rtImage, CFX_Matrix* pMatrix, CFX_DIBitmap* pDIBitmap, FX_INT32 iAspect, FX_INT32 iImageXDpi, FX_INT32 iImageYDpi, FX_INT32 iHorzAlign, FX_INT32 iVertAlign)
+void XFA_DrawImage(CFX_Graphics* pGS, const CFX_RectF &rtImage, CFX_Matrix* pMatrix, CFX_DIBitmap* pDIBitmap, int32_t iAspect, int32_t iImageXDpi, int32_t iImageYDpi, int32_t iHorzAlign, int32_t iVertAlign)
{
if (rtImage.IsEmpty()) {
return;
@@ -817,7 +817,7 @@ void XFA_DrawImage(CFX_Graphics* pGS, const CFX_RectF &rtImage, CFX_Matrix* pMat
}
pRenderDevice->RestoreState();
}
-const static FX_BYTE g_inv_base64[128] = {
+const static uint8_t g_inv_base64[128] = {
255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255,
@@ -835,10 +835,10 @@ const static FX_BYTE g_inv_base64[128] = {
41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 255, 255, 255, 255, 255,
};
-static FX_LPBYTE XFA_RemoveBase64Whitespace(FX_LPCBYTE pStr, FX_INT32 iLen)
+static FX_LPBYTE XFA_RemoveBase64Whitespace(FX_LPCBYTE pStr, int32_t iLen)
{
FX_LPBYTE pCP;
- FX_INT32 i = 0, j = 0;
+ int32_t i = 0, j = 0;
if (iLen == 0) {
iLen = FXSYS_strlen((FX_CHAR*)pStr);
}
@@ -853,7 +853,7 @@ static FX_LPBYTE XFA_RemoveBase64Whitespace(FX_LPCBYTE pStr, FX_INT32 iLen)
pCP[j] = '\0';
return pCP;
}
-static FX_INT32 XFA_Base64Decode(FX_LPCSTR pStr, FX_LPBYTE pOutBuffer)
+static int32_t XFA_Base64Decode(FX_LPCSTR pStr, FX_LPBYTE pOutBuffer)
{
if (pStr == NULL) {
return 0;
@@ -862,8 +862,8 @@ static FX_INT32 XFA_Base64Decode(FX_LPCSTR pStr, FX_LPBYTE pOutBuffer)
if (pBuffer == NULL) {
return 0;
}
- FX_INT32 iLen = FXSYS_strlen((FX_CHAR*)pBuffer);
- FX_INT32 i = 0, j = 0;
+ int32_t iLen = FXSYS_strlen((FX_CHAR*)pBuffer);
+ int32_t i = 0, j = 0;
FX_DWORD dwLimb = 0;
for (; i + 3 < iLen; i += 4) {
if (pBuffer[i] == '=' || pBuffer[i + 1] == '='
@@ -874,14 +874,14 @@ static FX_INT32 XFA_Base64Decode(FX_LPCSTR pStr, FX_LPBYTE pOutBuffer)
if (pBuffer[i + 2] == '=') {
dwLimb = ((FX_DWORD)g_inv_base64[pBuffer[i]] << 6)
| ((FX_DWORD)g_inv_base64[pBuffer[i + 1]]);
- pOutBuffer[j] = (FX_BYTE)(dwLimb >> 4) & 0xFF;
+ pOutBuffer[j] = (uint8_t)(dwLimb >> 4) & 0xFF;
j++;
} else {
dwLimb = ((FX_DWORD)g_inv_base64[pBuffer[i]] << 12) |
((FX_DWORD)g_inv_base64[pBuffer[i + 1]] << 6) |
((FX_DWORD)g_inv_base64[pBuffer[i + 2]]);
- pOutBuffer[j] = (FX_BYTE)(dwLimb >> 10) & 0xFF;
- pOutBuffer[j + 1] = (FX_BYTE)(dwLimb >> 2) & 0xFF;
+ pOutBuffer[j] = (uint8_t)(dwLimb >> 10) & 0xFF;
+ pOutBuffer[j + 1] = (uint8_t)(dwLimb >> 2) & 0xFF;
j += 2;
}
} else {
@@ -889,9 +889,9 @@ static FX_INT32 XFA_Base64Decode(FX_LPCSTR pStr, FX_LPBYTE pOutBuffer)
((FX_DWORD)g_inv_base64[pBuffer[i + 1]] << 12) |
((FX_DWORD)g_inv_base64[pBuffer[i + 2]] << 6) |
((FX_DWORD)g_inv_base64[pBuffer[i + 3]]);
- pOutBuffer[j] = (FX_BYTE)(dwLimb >> 16) & 0xff;
- pOutBuffer[j + 1] = (FX_BYTE)(dwLimb >> 8) & 0xff;
- pOutBuffer[j + 2] = (FX_BYTE)(dwLimb) & 0xff;
+ pOutBuffer[j] = (uint8_t)(dwLimb >> 16) & 0xff;
+ pOutBuffer[j + 1] = (uint8_t)(dwLimb >> 8) & 0xff;
+ pOutBuffer[j + 2] = (uint8_t)(dwLimb) & 0xff;
j += 3;
}
}
@@ -899,7 +899,7 @@ static FX_INT32 XFA_Base64Decode(FX_LPCSTR pStr, FX_LPBYTE pOutBuffer)
return j;
}
static FX_CHAR g_base64_chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-FX_LPSTR XFA_Base64Encode(FX_LPCBYTE buf, FX_INT32 buf_len)
+FX_LPSTR XFA_Base64Encode(FX_LPCBYTE buf, int32_t buf_len)
{
FX_LPSTR out = NULL;
int i, j;
@@ -959,7 +959,7 @@ FXCODEC_IMAGE_TYPE XFA_GetImageType(FX_WSTR wsType)
}
return FXCODEC_IMAGE_UNKNOWN;
}
-CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc *pDoc, CXFA_Image *pImage, FX_BOOL &bNameImage, FX_INT32 &iImageXDpi, FX_INT32 &iImageYDpi)
+CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc *pDoc, CXFA_Image *pImage, FX_BOOL &bNameImage, int32_t &iImageXDpi, int32_t &iImageYDpi)
{
CFX_WideString wsHref;
pImage->GetHref(wsHref);
@@ -978,9 +978,9 @@ CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc *pDoc, CXFA_Image *pImage, FX_BOOL &b
XFA_ATTRIBUTEENUM iEncoding = (XFA_ATTRIBUTEENUM)pImage->GetTransferEncoding();
if (iEncoding == XFA_ATTRIBUTEENUM_Base64) {
CFX_ByteString bsData = wsImage.UTF8Encode();
- FX_INT32 iLength = bsData.GetLength();
+ int32_t iLength = bsData.GetLength();
pImageBuffer = FDE_Alloc(iLength);
- FX_INT32 iRead = XFA_Base64Decode((FX_LPCSTR)bsData, pImageBuffer);
+ int32_t iRead = XFA_Base64Decode((FX_LPCSTR)bsData, pImageBuffer);
if (iRead > 0) {
pImageFileRead = FX_CreateMemoryStream(pImageBuffer, iRead);
}
@@ -1013,7 +1013,7 @@ CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc *pDoc, CXFA_Image *pImage, FX_BOOL &b
pImageFileRead->Release();
return pBitmap;
}
-static FXDIB_Format XFA_GetDIBFormat(FXCODEC_IMAGE_TYPE type, FX_INT32 iComponents, FX_INT32 iBitsPerComponent)
+static FXDIB_Format XFA_GetDIBFormat(FXCODEC_IMAGE_TYPE type, int32_t iComponents, int32_t iBitsPerComponent)
{
FXDIB_Format dibFormat = FXDIB_Argb;
switch (type) {
@@ -1021,7 +1021,7 @@ static FXDIB_Format XFA_GetDIBFormat(FXCODEC_IMAGE_TYPE type, FX_INT32 iComponen
case FXCODEC_IMAGE_JPG:
case FXCODEC_IMAGE_TIF: {
dibFormat = FXDIB_Rgb32;
- FX_INT32 bpp = iComponents * iBitsPerComponent;
+ int32_t bpp = iComponents * iBitsPerComponent;
if (bpp <= 24) {
dibFormat = FXDIB_Rgb;
}
@@ -1033,7 +1033,7 @@ static FXDIB_Format XFA_GetDIBFormat(FXCODEC_IMAGE_TYPE type, FX_INT32 iComponen
}
return dibFormat;
}
-CFX_DIBitmap* XFA_LoadImageFromBuffer(IFX_FileRead* pImageFileRead, FXCODEC_IMAGE_TYPE type, FX_INT32 &iImageXDpi, FX_INT32 &iImageYDpi)
+CFX_DIBitmap* XFA_LoadImageFromBuffer(IFX_FileRead* pImageFileRead, FXCODEC_IMAGE_TYPE type, int32_t &iImageXDpi, int32_t &iImageYDpi)
{
CFX_GEModule* pGeModule = CFX_GEModule::Get();
if (!pGeModule) {
@@ -1049,12 +1049,12 @@ CFX_DIBitmap* XFA_LoadImageFromBuffer(IFX_FileRead* pImageFileRead, FXCODEC_IMAG
FXCODEC_STATUS status = pProgressiveDecoder->LoadImageInfo(pImageFileRead, type, &dibAttr);
switch (dibAttr.m_wDPIUnit) {
case FXCODEC_RESUNIT_CENTIMETER:
- dibAttr.m_nXDPI = (FX_INT32)(dibAttr.m_nXDPI * 2.54f);
- dibAttr.m_nYDPI = (FX_INT32)(dibAttr.m_nYDPI * 2.54f);
+ dibAttr.m_nXDPI = (int32_t)(dibAttr.m_nXDPI * 2.54f);
+ dibAttr.m_nYDPI = (int32_t)(dibAttr.m_nYDPI * 2.54f);
break;
case FXCODEC_RESUNIT_METER:
- dibAttr.m_nXDPI = (FX_INT32)(dibAttr.m_nXDPI / (FX_FLOAT)100 * 2.54f);
- dibAttr.m_nYDPI = (FX_INT32)(dibAttr.m_nYDPI / (FX_FLOAT)100 * 2.54f);
+ dibAttr.m_nXDPI = (int32_t)(dibAttr.m_nXDPI / (FX_FLOAT)100 * 2.54f);
+ dibAttr.m_nYDPI = (int32_t)(dibAttr.m_nYDPI / (FX_FLOAT)100 * 2.54f);
break;;
default:
break;
@@ -1063,13 +1063,13 @@ CFX_DIBitmap* XFA_LoadImageFromBuffer(IFX_FileRead* pImageFileRead, FXCODEC_IMAG
iImageYDpi = dibAttr.m_nYDPI > 1 ? dibAttr.m_nYDPI : (96);
if (pProgressiveDecoder->GetWidth() > 0 && pProgressiveDecoder->GetHeight() > 0) {
type = pProgressiveDecoder->GetType();
- FX_INT32 iComponents = pProgressiveDecoder->GetNumComponents();
- FX_INT32 iBpc = pProgressiveDecoder->GetBPC();
+ int32_t iComponents = pProgressiveDecoder->GetNumComponents();
+ int32_t iBpc = pProgressiveDecoder->GetBPC();
FXDIB_Format dibFormat = XFA_GetDIBFormat(type, iComponents, iBpc);
pBitmap = FX_NEW CFX_DIBitmap();
pBitmap->Create(pProgressiveDecoder->GetWidth(), pProgressiveDecoder->GetHeight(), dibFormat);
pBitmap->Clear(0xffffffff);
- FX_INT32 nFrames;
+ int32_t nFrames;
if ((pProgressiveDecoder->GetFrames(nFrames) == FXCODEC_STATUS_DECODE_READY) && (nFrames > 0)) {
pProgressiveDecoder->StartDecode(pBitmap, 0, 0, pBitmap->GetWidth(), pBitmap->GetHeight());
pProgressiveDecoder->ContinueDecode();
@@ -1126,14 +1126,14 @@ static void XFA_BOX_GetPath_Arc(CXFA_Box box, CFX_RectF rtDraw, CFX_Path &fillPa
sweepAngle = -sweepAngle * FX_PI / 180.0f;
fillPath.AddArc(rtDraw.left, rtDraw.top, rtDraw.width, rtDraw.height, startAngle, sweepAngle);
}
-static void XFA_BOX_GetPath(CXFA_Box box, const CXFA_StrokeArray &strokes, CFX_RectF rtWidget, CFX_Path &path, FX_INT32 nIndex, FX_BOOL bStart, FX_BOOL bCorner)
+static void XFA_BOX_GetPath(CXFA_Box box, const CXFA_StrokeArray &strokes, CFX_RectF rtWidget, CFX_Path &path, int32_t nIndex, FX_BOOL bStart, FX_BOOL bCorner)
{
FXSYS_assert(nIndex >= 0 && nIndex < 8);
FX_BOOL bInverted, bRound;
FX_FLOAT fRadius1, fRadius2, sx, sy, vx, vy, nx, ny, offsetY, offsetX, offsetEX, offsetEY;
CFX_PointF cpStart, cp, cp1, cp2;
CFX_RectF rtRadius;
- FX_INT32 n = (nIndex & 1) ? nIndex - 1 : nIndex;
+ int32_t n = (nIndex & 1) ? nIndex - 1 : nIndex;
CXFA_Corner corner1 = (CXFA_Node*)strokes[n];
CXFA_Corner corner2 = (CXFA_Node*)strokes[(n + 2) % 8];
fRadius1 = bCorner ? corner1.GetRadius() : 0;
@@ -1283,7 +1283,7 @@ static void XFA_BOX_GetFillPath(CXFA_Box box, const CXFA_StrokeArray &strokes, C
fThickness = 0;
}
FX_FLOAT fHalf = fThickness / 2;
- FX_INT32 iHand = box.GetHand();
+ int32_t iHand = box.GetHand();
if (iHand == XFA_ATTRIBUTEENUM_Left) {
rtWidget.Inflate(fHalf, fHalf);
} else if (iHand == XFA_ATTRIBUTEENUM_Right) {
@@ -1293,7 +1293,7 @@ static void XFA_BOX_GetFillPath(CXFA_Box box, const CXFA_StrokeArray &strokes, C
return;
}
FX_BOOL bSameStyles = TRUE;
- FX_INT32 i;
+ int32_t i;
CXFA_Stroke stroke1 = strokes[0];
for (i = 1; i < 8; i ++) {
CXFA_Stroke stroke2 = strokes[i];
@@ -1331,7 +1331,7 @@ static void XFA_BOX_GetFillPath(CXFA_Box box, const CXFA_StrokeArray &strokes, C
FX_FLOAT fRadius1, fRadius2, sx, sy, vx, vy, nx, ny;
CFX_PointF cp, cp1, cp2;
CFX_RectF rtRadius;
- for (FX_INT32 i = 0; i < 8; i += 2) {
+ for (int32_t i = 0; i < 8; i += 2) {
CXFA_Corner corner1 = (CXFA_Node*)strokes[i];
CXFA_Corner corner2 = (CXFA_Node*)strokes[(i + 2) % 8];
fRadius1 = corner1.GetRadius();
@@ -1420,7 +1420,7 @@ static void XFA_BOX_Fill_Radial(CXFA_Box box, CFX_Graphics* pGS, CFX_Path &fillP
CXFA_Fill fill = box.GetFill();
FX_ARGB crStart, crEnd;
crStart = fill.GetColor();
- FX_INT32 iType = fill.GetRadial(crEnd);
+ int32_t iType = fill.GetRadial(crEnd);
CFX_Shading shading;
if (iType != XFA_ATTRIBUTEENUM_ToEdge) {
FX_ARGB temp = crEnd;
@@ -1437,8 +1437,8 @@ static void XFA_BOX_Fill_Pattern(CXFA_Box box, CFX_Graphics* pGS, CFX_Path &fill
CXFA_Fill fill = box.GetFill();
FX_ARGB crStart, crEnd;
crStart = fill.GetColor();
- FX_INT32 iType = fill.GetPattern(crEnd);
- FX_INT32 iHatch = FX_HATCHSTYLE_Cross;
+ int32_t iType = fill.GetPattern(crEnd);
+ int32_t iHatch = FX_HATCHSTYLE_Cross;
switch(iType) {
case XFA_ATTRIBUTEENUM_CrossDiagonal:
iHatch = FX_HATCHSTYLE_DiagonalCross;
@@ -1469,7 +1469,7 @@ static void XFA_BOX_Fill_Linear(CXFA_Box box, CFX_Graphics* pGS, CFX_Path &fillP
CXFA_Fill fill = box.GetFill();
FX_ARGB crStart, crEnd;
crStart = fill.GetColor();
- FX_INT32 iType = fill.GetLinear(crEnd);
+ int32_t iType = fill.GetLinear(crEnd);
CFX_PointF ptStart, ptEnd;
switch(iType) {
case XFA_ATTRIBUTEENUM_ToRight:
@@ -1508,7 +1508,7 @@ static void XFA_BOX_Fill(CXFA_Box box, const CXFA_StrokeArray &strokes, CFX_Grap
fillPath.Create();
XFA_BOX_GetFillPath(box, strokes, rtWidget, fillPath, (dwFlags & XFA_DRAWBOX_ForceRound) != 0);
fillPath.Close();
- FX_INT32 eType = fill.GetFillType();
+ int32_t eType = fill.GetFillType();
switch(eType) {
case XFA_ELEMENT_Radial:
XFA_BOX_Fill_Radial(box, pGS, fillPath, rtWidget, pMatrix);
@@ -1522,11 +1522,11 @@ static void XFA_BOX_Fill(CXFA_Box box, const CXFA_StrokeArray &strokes, CFX_Grap
default: {
FX_ARGB cr;
if (eType == XFA_ELEMENT_Stipple) {
- FX_INT32 iRate = fill.GetStipple(cr);
+ int32_t iRate = fill.GetStipple(cr);
if (iRate == 0) {
iRate = 100;
}
- FX_INT32 a = 0;
+ int32_t a = 0;
FX_COLORREF rgb;
ArgbDecode(cr, a, rgb);
cr = ArgbEncode(iRate * a / 100, rgb);
@@ -1570,7 +1570,7 @@ static void XFA_BOX_StrokeArc(CXFA_Box box, CFX_Graphics* pGS, CFX_RectF rtWidge
}
FX_BOOL bVisible = FALSE;
FX_FLOAT fThickness = 0;
- FX_INT32 i3DType = box.Get3DStyle(bVisible, fThickness);
+ int32_t i3DType = box.Get3DStyle(bVisible, fThickness);
if (i3DType) {
if (bVisible && fThickness >= 0.001f) {
dwFlags |= XFA_DRAWBOX_Lowered3D;
@@ -1580,7 +1580,7 @@ static void XFA_BOX_StrokeArc(CXFA_Box box, CFX_Graphics* pGS, CFX_RectF rtWidge
if (fHalf < 0) {
fHalf = 0;
}
- FX_INT32 iHand = box.GetHand();
+ int32_t iHand = box.GetHand();
if (iHand == XFA_ATTRIBUTEENUM_Left) {
rtWidget.Inflate(fHalf, fHalf);
} else if (iHand == XFA_ATTRIBUTEENUM_Right) {
@@ -1713,7 +1713,7 @@ static void XFA_BOX_Stroke_Rect(CXFA_Box box, const CXFA_StrokeArray &strokes, C
{
FX_BOOL bVisible = FALSE;
FX_FLOAT fThickness = 0;
- FX_INT32 i3DType = box.Get3DStyle(bVisible, fThickness);
+ int32_t i3DType = box.Get3DStyle(bVisible, fThickness);
if (i3DType) {
if (!bVisible || fThickness < 0.001f) {
return;
@@ -1736,7 +1736,7 @@ static void XFA_BOX_Stroke_Rect(CXFA_Box box, const CXFA_StrokeArray &strokes, C
}
FX_BOOL bClose = FALSE;
FX_BOOL bSameStyles = TRUE;
- FX_INT32 i;
+ int32_t i;
CXFA_Stroke stroke1 = strokes[0];
for (i = 1; i < 8; i ++) {
CXFA_Stroke stroke2 = strokes[i];
@@ -1804,7 +1804,7 @@ static void XFA_BOX_Stroke(CXFA_Box box, const CXFA_StrokeArray &strokes, CFX_Gr
return;
}
FX_BOOL bVisible = FALSE;
- for (FX_INT32 j = 0; j < 4; j ++) {
+ for (int32_t j = 0; j < 4; j ++) {
bVisible |= strokes[j * 2 + 1].IsVisible();
if (bVisible) {
break;
@@ -1813,14 +1813,14 @@ static void XFA_BOX_Stroke(CXFA_Box box, const CXFA_StrokeArray &strokes, CFX_Gr
if (!bVisible) {
return;
}
- for (FX_INT32 i = 1; i < 8; i += 2) {
+ for (int32_t i = 1; i < 8; i += 2) {
CXFA_Edge edge = (CXFA_Node*)strokes[i];
FX_FLOAT fThickness = edge.GetThickness();
if (fThickness < 0) {
fThickness = 0;
}
FX_FLOAT fHalf = fThickness / 2;
- FX_INT32 iHand = box.GetHand();
+ int32_t iHand = box.GetHand();
switch (i) {
case 1:
if (iHand == XFA_ATTRIBUTEENUM_Left) {
@@ -1863,7 +1863,7 @@ void XFA_DrawBox(CXFA_Box box, CFX_Graphics* pGS, const CFX_RectF &rtWidget, CFX
if (!box || box.GetPresence() != XFA_ATTRIBUTEENUM_Visible) {
return;
}
- FX_INT32 iType = box.GetClassID();
+ int32_t iType = box.GetClassID();
if (iType != XFA_ELEMENT_Arc && iType != XFA_ELEMENT_Border && iType != XFA_ELEMENT_Rectangle) {
return;
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidget.h b/xfa/src/fxfa/src/app/xfa_ffwidget.h
index 8f19e71a0e..80f4be4d30 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidget.h
+++ b/xfa/src/fxfa/src/app/xfa_ffwidget.h
@@ -36,7 +36,7 @@ public:
m_Globals.RemoveAll();
}
CFX_PtrArray m_Globals;
- FX_INT32 m_iRefCount;
+ int32_t m_iRefCount;
};
class CXFA_FFWidget : public IXFA_Widget, public CFX_PrivateData, public CXFA_ContentLayoutItemImpl
{
@@ -52,7 +52,7 @@ public:
virtual FX_BOOL GetBBox(CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus = FALSE);
CXFA_WidgetAcc* GetDataAcc();
FX_BOOL GetToolTip(CFX_WideString &wsToolTip);
- virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, FX_INT32 iRotate = 0);
+ virtual void RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_DWORD dwStatus = 0, int32_t iRotate = 0);
virtual FX_BOOL IsLoaded();
virtual FX_BOOL LoadWidget();
@@ -66,7 +66,7 @@ public:
virtual FX_BOOL OnLButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnLButtonDblClk(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnMouseMove(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnMouseWheel(FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy);
+ virtual FX_BOOL OnMouseWheel(FX_DWORD dwFlags, int16_t zDelta, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnRButtonDown(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnRButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnRButtonDblClk(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
@@ -188,15 +188,15 @@ protected:
CXFA_WidgetAcc* m_pDataAcc;
CFX_RectF m_rtWidget;
};
-FX_INT32 XFA_StrokeTypeSetLineDash(CFX_Graphics* pGraphics, FX_INT32 iStrokeType, FX_INT32 iCapType);
-CFX_GraphStateData::LineCap XFA_LineCapToFXGE(FX_INT32 iLineCap);
-void XFA_DrawImage(CFX_Graphics* pGS, const CFX_RectF &rtImage, CFX_Matrix* pMatrix, CFX_DIBitmap* pDIBitmap, FX_INT32 iAspect, FX_INT32 iImageXDpi, FX_INT32 iImageYDpi, FX_INT32 iHorzAlign = XFA_ATTRIBUTEENUM_Left, FX_INT32 iVertAlign = XFA_ATTRIBUTEENUM_Top);
-CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc *pDoc, CXFA_Image *pImage, FX_BOOL &bNameImage, FX_INT32 &iImageXDpi, FX_INT32 &iImageYDpi);
-CFX_DIBitmap* XFA_LoadImageFromBuffer(IFX_FileRead* pImageFileRead, FXCODEC_IMAGE_TYPE type, FX_INT32 &iImageXDpi, FX_INT32 &iImageYDpi);
+int32_t XFA_StrokeTypeSetLineDash(CFX_Graphics* pGraphics, int32_t iStrokeType, int32_t iCapType);
+CFX_GraphStateData::LineCap XFA_LineCapToFXGE(int32_t iLineCap);
+void XFA_DrawImage(CFX_Graphics* pGS, const CFX_RectF &rtImage, CFX_Matrix* pMatrix, CFX_DIBitmap* pDIBitmap, int32_t iAspect, int32_t iImageXDpi, int32_t iImageYDpi, int32_t iHorzAlign = XFA_ATTRIBUTEENUM_Left, int32_t iVertAlign = XFA_ATTRIBUTEENUM_Top);
+CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc *pDoc, CXFA_Image *pImage, FX_BOOL &bNameImage, int32_t &iImageXDpi, int32_t &iImageYDpi);
+CFX_DIBitmap* XFA_LoadImageFromBuffer(IFX_FileRead* pImageFileRead, FXCODEC_IMAGE_TYPE type, int32_t &iImageXDpi, int32_t &iImageYDpi);
FXCODEC_IMAGE_TYPE XFA_GetImageType(FX_WSTR wsType);
-FX_LPSTR XFA_Base64Encode(FX_LPCBYTE buf, FX_INT32 buf_len);
+FX_LPSTR XFA_Base64Encode(FX_LPCBYTE buf, int32_t buf_len);
void XFA_RectWidthoutMargin(CFX_RectF &rt, const CXFA_Margin &mg, FX_BOOL bUI = FALSE);
-FX_FLOAT XFA_GetEdgeThickness(const CXFA_StrokeArray &strokes, FX_BOOL b3DStyle, FX_INT32 nIndex);
+FX_FLOAT XFA_GetEdgeThickness(const CXFA_StrokeArray &strokes, FX_BOOL b3DStyle, int32_t nIndex);
CXFA_FFWidget* XFA_GetWidgetFromLayoutItem(CXFA_LayoutItem* pLayoutItem);
FX_BOOL XFA_IsCreateWidget(XFA_ELEMENT iType);
#define XFA_DRAWBOX_ForceRound 1
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp b/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp
index a154d76392..3f105d98d6 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp
@@ -109,8 +109,8 @@ public:
CFX_DIBitmap* m_pDIBitmap;
FX_BOOL m_bNamedImage;
- FX_INT32 m_iImageXDpi;
- FX_INT32 m_iImageYDpi;
+ int32_t m_iImageXDpi;
+ int32_t m_iImageYDpi;
};
class CXFA_FieldLayoutData : public CXFA_WidgetLayoutData
{
@@ -198,8 +198,8 @@ public:
}
CFX_DIBitmap* m_pDIBitmap;
FX_BOOL m_bNamedImage;
- FX_INT32 m_iImageXDpi;
- FX_INT32 m_iImageYDpi;
+ int32_t m_iImageXDpi;
+ int32_t m_iImageYDpi;
};
CXFA_WidgetAcc::CXFA_WidgetAcc(CXFA_FFDocView* pDocView, CXFA_Node* pNode)
: CXFA_WidgetData(pNode)
@@ -214,7 +214,7 @@ CXFA_WidgetAcc::~CXFA_WidgetAcc()
m_pLayoutData = NULL;
}
}
-FX_BOOL CXFA_WidgetAcc::GetName(CFX_WideString &wsName, FX_INT32 iNameType )
+FX_BOOL CXFA_WidgetAcc::GetName(CFX_WideString &wsName, int32_t iNameType )
{
if (iNameType == 0) {
m_pNode->TryCData(XFA_ATTRIBUTE_Name, wsName);
@@ -346,17 +346,17 @@ IXFA_AppProvider* CXFA_WidgetAcc::GetAppProvider()
{
return GetApp()->GetAppProvider();
}
-FX_INT32 CXFA_WidgetAcc::ProcessEvent(FX_INT32 iActivity, CXFA_EventParam* pEventParam)
+int32_t CXFA_WidgetAcc::ProcessEvent(int32_t iActivity, CXFA_EventParam* pEventParam)
{
if (this->GetClassID() == XFA_ELEMENT_Draw) {
return XFA_EVENTERROR_NotExist;
}
- FX_INT32 iRet = XFA_EVENTERROR_NotExist;
+ int32_t iRet = XFA_EVENTERROR_NotExist;
CXFA_NodeArray eventArray;
- FX_INT32 iCounts = GetEventByActivity(iActivity, eventArray, pEventParam->m_bIsFormReady);
- for (FX_INT32 i = 0; i < iCounts; i++) {
+ int32_t iCounts = GetEventByActivity(iActivity, eventArray, pEventParam->m_bIsFormReady);
+ for (int32_t i = 0; i < iCounts; i++) {
CXFA_Event event(eventArray[i]);
- FX_INT32 result = ProcessEvent(event, pEventParam);
+ int32_t result = ProcessEvent(event, pEventParam);
if (i == 0) {
iRet = result;
} else if (result == XFA_EVENTERROR_Sucess) {
@@ -365,7 +365,7 @@ FX_INT32 CXFA_WidgetAcc::ProcessEvent(FX_INT32 iActivity, CXFA_EventParam* pEven
}
return iRet;
}
-FX_INT32 CXFA_WidgetAcc::ProcessEvent(CXFA_Event& event, CXFA_EventParam* pEventParam)
+int32_t CXFA_WidgetAcc::ProcessEvent(CXFA_Event& event, CXFA_EventParam* pEventParam)
{
if (!event) {
return XFA_EVENTERROR_NotExist;
@@ -389,7 +389,7 @@ FX_INT32 CXFA_WidgetAcc::ProcessEvent(CXFA_Event& event, CXFA_EventParam* pEvent
}
return XFA_EVENTERROR_NotExist;
}
-FX_INT32 CXFA_WidgetAcc::ProcessCalculate()
+int32_t CXFA_WidgetAcc::ProcessCalculate()
{
if (this->GetClassID() == XFA_ELEMENT_Draw) {
return XFA_EVENTERROR_NotExist;
@@ -404,7 +404,7 @@ FX_INT32 CXFA_WidgetAcc::ProcessCalculate()
CXFA_EventParam EventParam;
EventParam.m_eType = XFA_EVENT_Calculate;
CXFA_Script script = calc.GetScript();
- FX_INT32 iRet = ExecuteScript(script, &EventParam);
+ int32_t iRet = ExecuteScript(script, &EventParam);
if (iRet == XFA_EVENTERROR_Sucess) {
if (GetRawValue() != EventParam.m_wsResult) {
FX_BOOL bNotify = GetDoc()->GetDocType() == XFA_DOCTYPE_Static;
@@ -418,7 +418,7 @@ FX_INT32 CXFA_WidgetAcc::ProcessCalculate()
}
return iRet;
}
-void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_Validate validate, FX_INT32 iRet, FXJSE_HVALUE pRetValue, FX_BOOL bVersionFlag)
+void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_Validate validate, int32_t iRet, FXJSE_HVALUE pRetValue, FX_BOOL bVersionFlag)
{
if (iRet == XFA_EVENTERROR_Sucess && pRetValue) {
if (FXJSE_Value_IsBoolean(pRetValue) && !FXJSE_Value_ToBoolean(pRetValue)) {
@@ -430,7 +430,7 @@ void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_Validate validate, FX_INT32
pAppProvider->LoadString(XFA_IDS_AppName, wsTitle);
CFX_WideString wsScriptMsg;
validate.GetScriptMessageText(wsScriptMsg);
- FX_INT32 eScriptTest = validate.GetScriptTest();
+ int32_t eScriptTest = validate.GetScriptTest();
if (eScriptTest == XFA_ATTRIBUTEENUM_Warning) {
if (this->GetNode()->HasFlag(XFA_NODEFLAG_UserInteractive)) {
return;
@@ -454,7 +454,7 @@ void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_Validate validate, FX_INT32
}
}
}
-FX_INT32 CXFA_WidgetAcc::ProcessFormatTestValidate(CXFA_Validate validate, FX_BOOL bVersionFlag)
+int32_t CXFA_WidgetAcc::ProcessFormatTestValidate(CXFA_Validate validate, FX_BOOL bVersionFlag)
{
CFX_WideString wsRawValue = GetRawValue();
if (!wsRawValue.IsEmpty()) {
@@ -477,7 +477,7 @@ FX_INT32 CXFA_WidgetAcc::ProcessFormatTestValidate(CXFA_Validate validate, FX_BO
validate.GetFormatMessageText(wsFormatMsg);
CFX_WideString wsTitle;
pAppProvider->LoadString(XFA_IDS_AppName, wsTitle);
- FX_INT32 eFormatTest = validate.GetFormatTest();
+ int32_t eFormatTest = validate.GetFormatTest();
if (eFormatTest == XFA_ATTRIBUTEENUM_Error) {
if (wsFormatMsg.IsEmpty()) {
GetValidateMessage(pAppProvider, wsFormatMsg, TRUE, bVersionFlag);
@@ -503,7 +503,7 @@ FX_INT32 CXFA_WidgetAcc::ProcessFormatTestValidate(CXFA_Validate validate, FX_BO
}
return XFA_EVENTERROR_NotExist;
}
-FX_INT32 CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate, FX_INT32 iFlags, FX_BOOL bVersionFlag)
+int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate, int32_t iFlags, FX_BOOL bVersionFlag)
{
CFX_WideString wsValue;
this->GetValue(wsValue, XFA_VALUEPICTURE_Raw);
@@ -513,11 +513,11 @@ FX_INT32 CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate, FX_INT3
if (this->m_bIsNull && (this->m_bPreNull == this->m_bIsNull)) {
return XFA_EVENTERROR_Sucess;
}
- FX_INT32 eNullTest = validate.GetNullTest();
+ int32_t eNullTest = validate.GetNullTest();
CFX_WideString wsNullMsg;
validate.GetNullMessageText(wsNullMsg);
if (iFlags & 0x01) {
- FX_INT32 iRet = XFA_EVENTERROR_Sucess;
+ int32_t iRet = XFA_EVENTERROR_Sucess;
if (eNullTest != XFA_ATTRIBUTEENUM_Disabled) {
iRet = XFA_EVENTERROR_Error;
}
@@ -609,7 +609,7 @@ void CXFA_WidgetAcc::GetValidateMessage(IXFA_AppProvider* pAppProvider, CFX_Wide
pAppProvider->LoadString(XFA_IDS_ValidateWarning, wsWarning);
wsMessage.Format(wsWarning, (FX_LPCWSTR)wsCaptionName, (FX_LPCWSTR)wsCaptionName);
}
-FX_INT32 CXFA_WidgetAcc::ProcessValidate(FX_INT32 iFlags)
+int32_t CXFA_WidgetAcc::ProcessValidate(int32_t iFlags)
{
if (this->GetClassID() == XFA_ELEMENT_Draw) {
return XFA_EVENTERROR_NotExist;
@@ -620,9 +620,9 @@ FX_INT32 CXFA_WidgetAcc::ProcessValidate(FX_INT32 iFlags)
}
FX_BOOL bInitDoc = ((CXFA_Node*)validate)->HasFlag(XFA_NODEFLAG_NeedsInitApp);
FX_BOOL bStatus = m_pDocView->GetLayoutStatus() < XFA_DOCVIEW_LAYOUTSTATUS_End;
- FX_INT32 iFormat = 0;
+ int32_t iFormat = 0;
FXJSE_HVALUE pRetValue = NULL;
- FX_INT32 iRet = XFA_EVENTERROR_NotExist;
+ int32_t iRet = XFA_EVENTERROR_NotExist;
CXFA_Script script = validate.GetScript();
if (script) {
CXFA_EventParam eParam;
@@ -652,7 +652,7 @@ FX_INT32 CXFA_WidgetAcc::ProcessValidate(FX_INT32 iFlags)
}
return iRet | iFormat;
}
-FX_INT32 CXFA_WidgetAcc::ExecuteScript(CXFA_Script script, CXFA_EventParam* pEventParam, FXJSE_HVALUE* pRetValue)
+int32_t CXFA_WidgetAcc::ExecuteScript(CXFA_Script script, CXFA_EventParam* pEventParam, FXJSE_HVALUE* pRetValue)
{
FXSYS_assert(pEventParam);
if (!script) {
@@ -681,7 +681,7 @@ FX_INT32 CXFA_WidgetAcc::ExecuteScript(CXFA_Script script, CXFA_EventParam* pEve
FXJSE_HVALUE hRetValue = FXJSE_Value_Create(pContext->GetRuntime());
FX_BOOL bRet = FALSE;
bRet = pContext->RunScript((XFA_SCRIPTLANGTYPE)eScriptType, wsExpression, hRetValue, m_pNode);
- FX_INT32 iRet = XFA_EVENTERROR_Error;
+ int32_t iRet = XFA_EVENTERROR_Error;
if (bRet) {
iRet = XFA_EVENTERROR_Sucess;
if (pEventParam->m_eType == XFA_EVENT_Calculate || pEventParam->m_eType == XFA_EVENT_InitCalculate) {
@@ -701,8 +701,8 @@ FX_INT32 CXFA_WidgetAcc::ExecuteScript(CXFA_Script script, CXFA_EventParam* pEve
m_pDocView->AddValidateWidget(this);
}
}
- FX_INT32 iRefs = refNodes.GetSize();
- for (FX_INT32 r = 0; r < iRefs; r++) {
+ int32_t iRefs = refNodes.GetSize();
+ for (int32_t r = 0; r < iRefs; r++) {
CXFA_WidgetAcc* pRefAcc = (CXFA_WidgetAcc*)refNodes[r]->GetWidgetData();
if (pRefAcc && pRefAcc == this) {
continue;
@@ -773,7 +773,7 @@ void CXFA_WidgetAcc::CalcCaptionSize(CFX_SizeF &szCap)
}
LoadCaption();
XFA_ELEMENT eUIType = (XFA_ELEMENT)GetUIType();
- FX_INT32 iCapPlacement = caption.GetPlacementType();
+ int32_t iCapPlacement = caption.GetPlacementType();
FX_FLOAT fCapReserve = caption.GetReserve();
FX_BOOL bVert = iCapPlacement == XFA_ATTRIBUTEENUM_Top || iCapPlacement == XFA_ATTRIBUTEENUM_Bottom;
FX_BOOL bReserveExit = fCapReserve > 0.01;
@@ -826,7 +826,7 @@ FX_BOOL CXFA_WidgetAcc::CalculateFieldAutoSize(CFX_SizeF &size)
size.x += rtUIMargin.left + rtUIMargin.width;
size.y += rtUIMargin.top + rtUIMargin.height;
if (szCap.x > 0 && szCap.y > 0) {
- FX_INT32 iCapPlacement = this->GetCaption().GetPlacementType();
+ int32_t iCapPlacement = this->GetCaption().GetPlacementType();
switch(iCapPlacement) {
case XFA_ATTRIBUTEENUM_Left:
case XFA_ATTRIBUTEENUM_Right:
@@ -924,7 +924,7 @@ FX_BOOL CXFA_WidgetAcc::CalculateTextEditAutoSize(CFX_SizeF &size)
szCap.Set(0, 0);
CalcCaptionSize(szCap);
FX_BOOL bCapExit = szCap.x > 0.01 && szCap.y > 0.01;
- FX_INT32 iCapPlacement = XFA_ATTRIBUTEENUM_Unknown;
+ int32_t iCapPlacement = XFA_ATTRIBUTEENUM_Unknown;
if (bCapExit) {
iCapPlacement = this->GetCaption().GetPlacementType();
switch(iCapPlacement) {
@@ -993,8 +993,8 @@ FX_BOOL CXFA_WidgetAcc::CalculateImageAutoSize(CFX_SizeF &size)
CFX_RectF rtImage, rtFit;
rtImage.Set(0, 0, 0, 0);
rtFit.Set(0, 0, 0, 0);
- FX_INT32 iImageXDpi = 0;
- FX_INT32 iImageYDpi = 0;
+ int32_t iImageXDpi = 0;
+ int32_t iImageYDpi = 0;
GetImageDpi(iImageXDpi, iImageYDpi);
rtImage.width = XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetWidth(), (FX_FLOAT)iImageXDpi);
rtImage.height = XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetHeight(), (FX_FLOAT)iImageYDpi);
@@ -1023,8 +1023,8 @@ FX_BOOL CXFA_WidgetAcc::CalculateImageEditAutoSize(CFX_SizeF &size)
CFX_RectF rtImage, rtFit;
rtImage.Set(0, 0, 0, 0);
rtFit.Set(0, 0, 0, 0);
- FX_INT32 iImageXDpi = 0;
- FX_INT32 iImageYDpi = 0;
+ int32_t iImageXDpi = 0;
+ int32_t iImageYDpi = 0;
GetImageEditDpi(iImageXDpi, iImageYDpi);
rtImage.width = XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetWidth(), (FX_FLOAT)iImageXDpi);
rtImage.height = XFA_UnitPx2Pt((FX_FLOAT)pBitmap->GetHeight(), (FX_FLOAT)iImageYDpi);
@@ -1053,12 +1053,12 @@ FX_BOOL CXFA_WidgetAcc::LoadImageEditImage()
InitLayoutData();
return ((CXFA_ImageEditData*)m_pLayoutData)->LoadImageData(this);
}
-void CXFA_WidgetAcc::GetImageDpi(FX_INT32 &iImageXDpi, FX_INT32 &iImageYDpi)
+void CXFA_WidgetAcc::GetImageDpi(int32_t &iImageXDpi, int32_t &iImageYDpi)
{
iImageXDpi = ((CXFA_ImageLayoutData*)m_pLayoutData)->m_iImageXDpi;
iImageYDpi = ((CXFA_ImageLayoutData*)m_pLayoutData)->m_iImageYDpi;
}
-void CXFA_WidgetAcc::GetImageEditDpi(FX_INT32 &iImageXDpi, FX_INT32 &iImageYDpi)
+void CXFA_WidgetAcc::GetImageEditDpi(int32_t &iImageXDpi, int32_t &iImageYDpi)
{
iImageXDpi = ((CXFA_ImageEditData*)m_pLayoutData)->m_iImageXDpi;
iImageYDpi = ((CXFA_ImageEditData*)m_pLayoutData)->m_iImageYDpi;
@@ -1210,7 +1210,7 @@ void CXFA_WidgetAcc::CalculateAccWidthAndHeight(XFA_ELEMENT eUIType, FX_FLOAT& f
m_pLayoutData->m_fWidgetHeight = sz.y;
fCalcHeight = sz.y;
}
-FX_BOOL CXFA_WidgetAcc::FindSplitPos(FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeight)
+FX_BOOL CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex, FX_FLOAT &fCalcHeight)
{
XFA_ELEMENT eUIType = (XFA_ELEMENT)GetUIType();
if (eUIType == XFA_ELEMENT_Subform) {
@@ -1273,7 +1273,7 @@ FX_BOOL CXFA_WidgetAcc::FindSplitPos(FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeight
fCapReserve = 0;
}
}
- FX_INT32 iLinesCount = 0;
+ int32_t iLinesCount = 0;
FX_FLOAT fHeight = m_pLayoutData->m_fWidgetHeight;
CFX_WideString wsText;
this->GetValue(wsText, XFA_VALUEPICTURE_Display);
@@ -1291,9 +1291,9 @@ FX_BOOL CXFA_WidgetAcc::FindSplitPos(FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeight
((CXFA_FieldLayoutData*)m_pLayoutData)->m_pFieldSplitArray = FX_NEW CFX_FloatArray;
}
CFX_FloatArray* pFieldArray = ((CXFA_FieldLayoutData*)m_pLayoutData)->m_pFieldSplitArray;
- FX_INT32 iFieldSplitCount = pFieldArray->GetSize();
- for (FX_INT32 i = 0; i < iBlockIndex * 3; i += 3) {
- iLinesCount -= (FX_INT32)pFieldArray->GetAt(i + 1);
+ int32_t iFieldSplitCount = pFieldArray->GetSize();
+ for (int32_t i = 0; i < iBlockIndex * 3; i += 3) {
+ iLinesCount -= (int32_t)pFieldArray->GetAt(i + 1);
fHeight -= pFieldArray->GetAt(i + 2);
}
if (iLinesCount == 0) {
@@ -1327,7 +1327,7 @@ FX_BOOL CXFA_WidgetAcc::FindSplitPos(FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeight
fStartOffset = 0;
}
}
- for (FX_INT32 i = iBlockIndex - 1; iBlockIndex > 0 && i < iBlockIndex; i++) {
+ for (int32_t i = iBlockIndex - 1; iBlockIndex > 0 && i < iBlockIndex; i++) {
fStartOffset = pFieldArray->GetAt(i * 3) - pFieldArray->GetAt(i * 3 + 2);
if (fStartOffset < 0.1f) {
fStartOffset = 0;
@@ -1380,7 +1380,7 @@ FX_BOOL CXFA_WidgetAcc::FindSplitPos(FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeight
return TRUE;
}
FX_FLOAT fTextNum = fCalcHeight + XFA_FLOAT_PERCISION - fCapReserve - fStartOffset;
- FX_INT32 iLineNum = (FX_INT32)((fTextNum + (fLineHeight - fFontSize)) / fLineHeight);
+ int32_t iLineNum = (int32_t)((fTextNum + (fLineHeight - fFontSize)) / fLineHeight);
if (iLineNum >= iLinesCount) {
if (fCalcHeight - fStartOffset - fTextHeight >= fFontSize) {
if (iFieldSplitCount / 3 == (iBlockIndex + 1)) {
@@ -1399,7 +1399,7 @@ FX_BOOL CXFA_WidgetAcc::FindSplitPos(FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeight
return TRUE;
}
} else {
- iLineNum = (FX_INT32)(fTextNum / fLineHeight);
+ iLineNum = (int32_t)(fTextNum / fLineHeight);
}
}
if (iLineNum > 0) {
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp
index 856c0792bb..d43c5a6312 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp
@@ -40,7 +40,7 @@ CXFA_WidgetAcc* CXFA_FFWidgetHandler::GetDataAcc(IXFA_Widget* hWidget)
{
return static_cast<CXFA_FFWidget*>(hWidget)->GetDataAcc();
}
-void CXFA_FFWidgetHandler::GetName(IXFA_Widget* hWidget, CFX_WideString &wsName, FX_INT32 iNameType )
+void CXFA_FFWidgetHandler::GetName(IXFA_Widget* hWidget, CFX_WideString &wsName, int32_t iNameType )
{
static_cast<CXFA_FFWidget*>(hWidget)->GetDataAcc()->GetName(wsName, iNameType);
}
@@ -108,7 +108,7 @@ FX_BOOL CXFA_FFWidgetHandler::OnMouseMove(IXFA_Widget* hWidget, FX_DWORD dwFlags
m_pDocView->RunInvalidate();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnMouseWheel(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy)
+FX_BOOL CXFA_FFWidgetHandler::OnMouseWheel(IXFA_Widget* hWidget, FX_DWORD dwFlags, int16_t zDelta, FX_FLOAT fx, FX_FLOAT fy)
{
static_cast<CXFA_FFWidget*>(hWidget)->Rotate2Normal(fx, fy);
FX_BOOL bRet = static_cast<CXFA_FFWidget*>(hWidget)->OnMouseWheel(dwFlags, zDelta, fx, fy);
@@ -210,7 +210,7 @@ FX_BOOL CXFA_FFWidgetHandler::HasEvent(CXFA_WidgetAcc* pWidgetAcc, XFA_EVENTTYPE
CXFA_NodeArray eventArray;
return pWidgetAcc->GetEventByActivity(gs_EventActivity[eEventType], eventArray);
}
-FX_INT32 CXFA_FFWidgetHandler::ProcessEvent(CXFA_WidgetAcc* pWidgetAcc, CXFA_EventParam* pParam)
+int32_t CXFA_FFWidgetHandler::ProcessEvent(CXFA_WidgetAcc* pWidgetAcc, CXFA_EventParam* pParam)
{
if (!pParam || pParam->m_eType == XFA_EVENT_Unknown) {
return XFA_EVENTERROR_NotExist;
@@ -240,7 +240,7 @@ FX_INT32 CXFA_FFWidgetHandler::ProcessEvent(CXFA_WidgetAcc* pWidgetAcc, CXFA_Eve
default:
break;
}
- FX_INT32 iRet = pWidgetAcc->ProcessEvent(gs_EventActivity[pParam->m_eType], pParam);
+ int32_t iRet = pWidgetAcc->ProcessEvent(gs_EventActivity[pParam->m_eType], pParam);
return iRet;
}
IXFA_Widget* CXFA_FFWidgetHandler::CreateWidget(IXFA_Widget* hParent, XFA_WIDGETTYPE eType, IXFA_Widget* hBefore )
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h
index 28c6c84651..7c47b8d1a1 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h
+++ b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.h
@@ -18,7 +18,7 @@ public:
virtual FX_DWORD GetStatus(IXFA_Widget* hWidget);
virtual FX_BOOL GetBBox(IXFA_Widget* hWidget, CFX_RectF &rtBox, FX_DWORD dwStatus, FX_BOOL bDrawFocus = FALSE);
virtual CXFA_WidgetAcc* GetDataAcc(IXFA_Widget* hWidget);
- virtual void GetName(IXFA_Widget* hWidget, CFX_WideString &wsName, FX_INT32 iNameType = 0);
+ virtual void GetName(IXFA_Widget* hWidget, CFX_WideString &wsName, int32_t iNameType = 0);
virtual FX_BOOL GetToolTip(IXFA_Widget* hWidget, CFX_WideString &wsToolTip);
virtual void SetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback);
virtual FX_LPVOID GetPrivateData(IXFA_Widget* hWidget, FX_LPVOID module_id);
@@ -28,7 +28,7 @@ public:
virtual FX_BOOL OnLButtonUp(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnLButtonDblClk(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnMouseMove(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnMouseWheel(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_SHORT zDelta, FX_FLOAT fx, FX_FLOAT fy);
+ virtual FX_BOOL OnMouseWheel(IXFA_Widget* hWidget, FX_DWORD dwFlags, int16_t zDelta, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnRButtonDown(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnRButtonUp(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
virtual FX_BOOL OnRButtonDblClk(IXFA_Widget* hWidget, FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy);
@@ -40,7 +40,7 @@ public:
virtual FX_BOOL OnSetCursor(IXFA_Widget* hWidget, FX_FLOAT fx, FX_FLOAT fy);
virtual void RenderWidget(IXFA_Widget* hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix = NULL, FX_BOOL bHighlight = FALSE);
virtual FX_BOOL HasEvent(CXFA_WidgetAcc* pWidgetAcc, XFA_EVENTTYPE eEventType);
- virtual FX_INT32 ProcessEvent(CXFA_WidgetAcc* pWidgetAcc, CXFA_EventParam* pParam);
+ virtual int32_t ProcessEvent(CXFA_WidgetAcc* pWidgetAcc, CXFA_EventParam* pParam);
protected:
CXFA_Node* CreateWidgetFormItem(XFA_WIDGETTYPE eType, CXFA_Node* pParent, CXFA_Node* pBefore) const;
diff --git a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
index 5cacacfff6..127278fb46 100644
--- a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
@@ -966,9 +966,9 @@ void XFA_LocalFontNameToEnglishName(FX_WSTR wsLocalName, CFX_WideString &wsEngli
wsEnglishName = wsLocalName;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ || _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ || _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_
FX_DWORD dwLocalNameHash = FX_HashCode_String_GetW(wsLocalName.GetPtr(), wsLocalName.GetLength(), TRUE);
- FX_INT32 iStart = 0;
- FX_INT32 iEnd = sizeof(g_XFAFontsMap) / sizeof(XFA_FONTINFO) - 1;
- FX_INT32 iMid = 0;
+ int32_t iStart = 0;
+ int32_t iEnd = sizeof(g_XFAFontsMap) / sizeof(XFA_FONTINFO) - 1;
+ int32_t iMid = 0;
do {
iMid = (iStart + iEnd) / 2;
FX_DWORD dwFontNameHash = g_XFAFontsMap[iMid].dwFontNameHash;
@@ -989,9 +989,9 @@ const XFA_FONTINFO* XFA_GetFontINFOByFontName(FX_WSTR wsFontName)
CFX_WideString wsFontNameTemp = wsFontName;
wsFontNameTemp.Remove(L' ');
FX_DWORD dwCurFontNameHash = FX_HashCode_String_GetW(wsFontNameTemp, wsFontNameTemp.GetLength(), TRUE);
- FX_INT32 iStart = 0;
- FX_INT32 iEnd = sizeof(g_XFAFontsMap) / sizeof(XFA_FONTINFO) - 1;
- FX_INT32 iMid = 0;
+ int32_t iStart = 0;
+ int32_t iEnd = sizeof(g_XFAFontsMap) / sizeof(XFA_FONTINFO) - 1;
+ int32_t iMid = 0;
const XFA_FONTINFO *pFontInfo = NULL;
do {
iMid = (iStart + iEnd) / 2;
@@ -1021,8 +1021,8 @@ IXFA_FontMgr::~IXFA_FontMgr()
}
CXFA_DefFontMgr::~CXFA_DefFontMgr()
{
- FX_INT32 iCounts = m_CacheFonts.GetSize();
- for (FX_INT32 i = 0; i < iCounts; i++) {
+ int32_t iCounts = m_CacheFonts.GetSize();
+ for (int32_t i = 0; i < iCounts; i++) {
((IFX_Font*)m_CacheFonts[i])->Release();
}
m_CacheFonts.RemoveAll();
@@ -1054,7 +1054,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWOR
dwStyle |= FX_FONTSTYLE_Italic;
}
FX_LPCWSTR pReplace = pCurFont->pReplaceFont;
- FX_INT32 iLength = FXSYS_wcslen(pReplace);
+ int32_t iLength = FXSYS_wcslen(pReplace);
while (iLength > 0) {
FX_LPCWSTR pNameText = pReplace;
while (*pNameText != L',' && iLength > 0) {
@@ -1204,10 +1204,10 @@ IFX_Font* CXFA_PDFFontMgr::GetFont(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles,
CFX_ByteString CXFA_PDFFontMgr::PsNameToFontName(const CFX_ByteString& strPsName,
FX_BOOL bBold, FX_BOOL bItalic)
{
- FX_INT32 nCount = sizeof(g_XFAPDFFontName) / sizeof(XFA_PDFFONTNAME);
- for (FX_INT32 i = 0; i < nCount; i++) {
+ int32_t nCount = sizeof(g_XFAPDFFontName) / sizeof(XFA_PDFFONTNAME);
+ for (int32_t i = 0; i < nCount; i++) {
if (strPsName == g_XFAPDFFontName[i].lpPsName) {
- FX_INT32 index = 1 + ((bItalic << 1) | bBold);
+ int32_t index = 1 + ((bItalic << 1) | bBold);
return *(&g_XFAPDFFontName[i].lpPsName + index);
}
}
@@ -1217,17 +1217,17 @@ FX_BOOL CXFA_PDFFontMgr::PsNameMatchDRFontName(FX_BSTR bsPsName, FX_BOOL bBold,
{
CFX_ByteString bsDRName = bsDRFontName;
bsDRName.Remove('-');
- FX_INT32 iPsLen = bsPsName.GetLength();
- FX_INT32 nIndex = bsDRName.Find(bsPsName);
+ int32_t iPsLen = bsPsName.GetLength();
+ int32_t nIndex = bsDRName.Find(bsPsName);
if (nIndex != -1 && !bStrictMatch) {
return TRUE;
}
if (nIndex != 0) {
return FALSE;
}
- FX_INT32 iDifferLength = bsDRName.GetLength() - iPsLen;
+ int32_t iDifferLength = bsDRName.GetLength() - iPsLen;
if (iDifferLength > 1 || (bBold || bItalic)) {
- FX_INT32 iBoldIndex = bsDRName.Find(FX_BSTRC("Bold"));
+ int32_t iBoldIndex = bsDRName.Find(FX_BSTRC("Bold"));
FX_BOOL bBoldFont = iBoldIndex > 0;
if (bBold ^ bBoldFont) {
return FALSE;
@@ -1284,7 +1284,7 @@ FX_BOOL CXFA_PDFFontMgr::PsNameMatchDRFontName(FX_BSTR bsPsName, FX_BOOL bBold,
}
return TRUE;
}
-FX_BOOL CXFA_PDFFontMgr::GetCharWidth(IFX_Font* pFont, FX_WCHAR wUnicode, FX_INT32 &iWidth, FX_BOOL bCharCode)
+FX_BOOL CXFA_PDFFontMgr::GetCharWidth(IFX_Font* pFont, FX_WCHAR wUnicode, int32_t &iWidth, FX_BOOL bCharCode)
{
if (wUnicode != 0x20 || bCharCode) {
return FALSE;
diff --git a/xfa/src/fxfa/src/app/xfa_fontmgr.h b/xfa/src/fxfa/src/app/xfa_fontmgr.h
index 9de1348293..f612664644 100644
--- a/xfa/src/fxfa/src/app/xfa_fontmgr.h
+++ b/xfa/src/fxfa/src/app/xfa_fontmgr.h
@@ -29,7 +29,7 @@ public:
CXFA_PDFFontMgr(CXFA_FFDoc* pDoc);
~CXFA_PDFFontMgr();
IFX_Font* GetFont(FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, CPDF_Font** pPDFFont, FX_BOOL bStrictMatch = TRUE);
- FX_BOOL GetCharWidth(IFX_Font* pFont, FX_WCHAR wUnicode, FX_INT32 &iWidth, FX_BOOL bCharCode);
+ FX_BOOL GetCharWidth(IFX_Font* pFont, FX_WCHAR wUnicode, int32_t &iWidth, FX_BOOL bCharCode);
CFX_MapPtrToPtr m_FDE2PDFFont;
protected:
IFX_Font* FindFont(CFX_ByteString strFamilyName, FX_BOOL bBold, FX_BOOL bItalic, CPDF_Font** pPDFFont, FX_BOOL bStrictMatch = TRUE);
diff --git a/xfa/src/fxfa/src/app/xfa_fwladapter.h b/xfa/src/fxfa/src/app/xfa_fwladapter.h
index 8e830142c4..1ddfcf4113 100644
--- a/xfa/src/fxfa/src/app/xfa_fwladapter.h
+++ b/xfa/src/fxfa/src/app/xfa_fwladapter.h
@@ -22,7 +22,7 @@ public:
}
virtual void OnPreOpen(IFWL_Widget *pWidget) {}
virtual void OnPostOpen(IFWL_Widget *pWidget) {}
- virtual void OnSelectChanged(IFWL_Widget *pWidget, FX_INT32 iYear, FX_INT32 iMonth, FX_INT32 iDay) {}
+ virtual void OnSelectChanged(IFWL_Widget *pWidget, int32_t iYear, int32_t iMonth, int32_t iDay) {}
virtual void OnTextChanged(IFWL_Widget *pWidget, const CFX_WideString &wsChanged) {}
virtual void OnTextFull(IFWL_Widget *pWidget) {}
virtual FX_BOOL OnValidate(IFWL_Widget *pWidget, CFX_WideString &wsText)
diff --git a/xfa/src/fxfa/src/app/xfa_fwltheme.cpp b/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
index 036d6f1157..ca9bf5e890 100644
--- a/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
@@ -65,7 +65,7 @@ static FX_LPCWSTR g_FWLTheme_CalFonts[] = {
FWL_ERR CXFA_FWLTheme::Initialize()
{
m_pTextOut = IFDE_TextOut::Create();
- for (FX_INT32 i = 0; NULL == m_pCalendarFont && i < sizeof(g_FWLTheme_CalFonts) / sizeof(FX_LPCWSTR); i++) {
+ for (int32_t i = 0; NULL == m_pCalendarFont && i < sizeof(g_FWLTheme_CalFonts) / sizeof(FX_LPCWSTR); i++) {
m_pCalendarFont = IFX_Font::LoadFont(g_FWLTheme_CalFonts[i], 0, 0, m_pApp->GetFDEFontMgr());
}
if (NULL == m_pCalendarFont)
@@ -349,7 +349,7 @@ FX_BOOL CXFA_FWLCheckBoxTP::DrawBackground(CFWL_ThemeBackground *pParams)
}
return TRUE;
}
-void CXFA_FWLCheckBoxTP::DrawCheckSign(IFWL_Widget *pWidget, CFX_Graphics *pGraphics, const CFX_RectF *pRtBox, FX_INT32 iState, CFX_Matrix* pMatrix)
+void CXFA_FWLCheckBoxTP::DrawCheckSign(IFWL_Widget *pWidget, CFX_Graphics *pGraphics, const CFX_RectF *pRtBox, int32_t iState, CFX_Matrix* pMatrix)
{
CFX_RectF rtSign(*pRtBox);
FX_DWORD dwColor = 0xFF000000;
diff --git a/xfa/src/fxfa/src/app/xfa_fwltheme.h b/xfa/src/fxfa/src/app/xfa_fwltheme.h
index 34003b4eb1..37b8d1336a 100644
--- a/xfa/src/fxfa/src/app/xfa_fwltheme.h
+++ b/xfa/src/fxfa/src/app/xfa_fwltheme.h
@@ -81,7 +81,7 @@ public:
CXFA_FWLCheckBoxTP();
virtual FX_BOOL DrawBackground(CFWL_ThemeBackground *pParams);
protected:
- void DrawCheckSign(IFWL_Widget *pWidget, CFX_Graphics *pGraphics, const CFX_RectF *pRtBox, FX_INT32 iState, CFX_Matrix* pMatrix);
+ void DrawCheckSign(IFWL_Widget *pWidget, CFX_Graphics *pGraphics, const CFX_RectF *pRtBox, int32_t iState, CFX_Matrix* pMatrix);
};
class CXFA_FWLEditTP : public CFWL_EditTP
{
diff --git a/xfa/src/fxfa/src/app/xfa_rendercontext.cpp b/xfa/src/fxfa/src/app/xfa_rendercontext.cpp
index 5447506b24..c89dc3e4a0 100644
--- a/xfa/src/fxfa/src/app/xfa_rendercontext.cpp
+++ b/xfa/src/fxfa/src/app/xfa_rendercontext.cpp
@@ -27,7 +27,7 @@ CXFA_RenderContext::~CXFA_RenderContext()
{
StopRender();
}
-FX_INT32 CXFA_RenderContext::StartRender(IXFA_PageView* pPageView, CFX_Graphics* pGS, const CFX_Matrix& matrix, const CXFA_RenderOptions& options)
+int32_t CXFA_RenderContext::StartRender(IXFA_PageView* pPageView, CFX_Graphics* pGS, const CFX_Matrix& matrix, const CXFA_RenderOptions& options)
{
m_pPageView = pPageView;
m_pGS = pGS;
@@ -45,9 +45,9 @@ FX_INT32 CXFA_RenderContext::StartRender(IXFA_PageView* pPageView, CFX_Graphics*
m_pWidget = m_pWidgetIterator->MoveToNext();
return XFA_RENDERSTATUS_Ready;
}
-FX_INT32 CXFA_RenderContext::DoRender(IFX_Pause* pPause)
+int32_t CXFA_RenderContext::DoRender(IFX_Pause* pPause)
{
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
while(m_pWidget) {
CXFA_FFWidget* pWidget = (CXFA_FFWidget*)m_pWidget;
CFX_RectF rtWidgetBox;
diff --git a/xfa/src/fxfa/src/app/xfa_rendercontext.h b/xfa/src/fxfa/src/app/xfa_rendercontext.h
index cb514c5cdf..79931b2751 100644
--- a/xfa/src/fxfa/src/app/xfa_rendercontext.h
+++ b/xfa/src/fxfa/src/app/xfa_rendercontext.h
@@ -15,8 +15,8 @@ public:
{
delete this;
}
- virtual FX_INT32 StartRender(IXFA_PageView* pPageView, CFX_Graphics* pGS, const CFX_Matrix& matrix, const CXFA_RenderOptions& options);
- virtual FX_INT32 DoRender(IFX_Pause* pPause = NULL);
+ virtual int32_t StartRender(IXFA_PageView* pPageView, CFX_Graphics* pGS, const CFX_Matrix& matrix, const CXFA_RenderOptions& options);
+ virtual int32_t DoRender(IFX_Pause* pPause = NULL);
virtual void StopRender();
protected:
IXFA_WidgetIterator* m_pWidgetIterator;
diff --git a/xfa/src/fxfa/src/app/xfa_textlayout.cpp b/xfa/src/fxfa/src/app/xfa_textlayout.cpp
index 510b627b21..3043b772b8 100644
--- a/xfa/src/fxfa/src/app/xfa_textlayout.cpp
+++ b/xfa/src/fxfa/src/app/xfa_textlayout.cpp
@@ -43,13 +43,13 @@ void CXFA_CSSTagProvider::SetAttribute(const CFX_WideString &wsAttr, const CFX_W
*pValue = wsValue;
m_Attributes.SetAt(pName, pValue);
}
-void CXFA_TextParseContext::SetDecls(const IFDE_CSSDeclaration **ppDeclArray, FX_INT32 iDeclCount)
+void CXFA_TextParseContext::SetDecls(const IFDE_CSSDeclaration **ppDeclArray, int32_t iDeclCount)
{
if (iDeclCount <= 0 || ppDeclArray == NULL) {
return;
}
m_dwMatchedDecls = iDeclCount;
- FX_INT32 iBytes = iDeclCount * sizeof(IFDE_CSSDeclaration*);
+ int32_t iBytes = iDeclCount * sizeof(IFDE_CSSDeclaration*);
m_ppMatchedDecls = (IFDE_CSSDeclaration**)FDE_Alloc(iBytes);
FX_memcpy(m_ppMatchedDecls, ppDeclArray, iBytes);
}
@@ -257,7 +257,7 @@ void CXFA_TextParser::ParseRichText(IFDE_XMLNode *pXMLNode, IFDE_CSSComputedStyl
IFDE_CSSAccelerator *pCSSAccel = m_pSelector->InitAccelerator();
pCSSAccel->OnEnterTag(&tagProvider);
CFDE_CSSDeclarationArray DeclArray;
- FX_INT32 iMatchedDecls = m_pSelector->MatchDeclarations(&tagProvider, DeclArray);
+ int32_t iMatchedDecls = m_pSelector->MatchDeclarations(&tagProvider, DeclArray);
const IFDE_CSSDeclaration **ppMatchDecls = (const IFDE_CSSDeclaration **)DeclArray.GetData();
m_pSelector->ComputeStyle(&tagProvider, ppMatchDecls, iMatchedDecls, pNewStyle);
pCSSAccel->OnLeaveTag(&tagProvider);
@@ -299,7 +299,7 @@ void CXFA_TextParser::ParseTagInfo(IFDE_XMLNode *pXMLNode, CXFA_CSSTagProvider &
pXMLElement->GetLocalTagName(wsName);
tagProvider.SetTagNameObj(wsName);
FX_DWORD dwHashCode = FX_HashCode_String_GetW(wsName, wsName.GetLength(), TRUE);
- static const FX_INT32 s_iCount = sizeof(s_XFATagName) / sizeof(FX_DWORD);
+ static const int32_t s_iCount = sizeof(s_XFATagName) / sizeof(FX_DWORD);
CFX_DSPATemplate<FX_DWORD> lookup;
tagProvider.m_bTagAviliable = lookup.Lookup(dwHashCode, s_XFATagName, s_iCount) > -1;
CFX_WideString wsValue;
@@ -312,9 +312,9 @@ void CXFA_TextParser::ParseTagInfo(IFDE_XMLNode *pXMLNode, CXFA_CSSTagProvider &
tagProvider.m_bContent = TRUE;
}
}
-FX_INT32 CXFA_TextParser::GetVAlgin(IXFA_TextProvider *pTextProvider) const
+int32_t CXFA_TextParser::GetVAlgin(IXFA_TextProvider *pTextProvider) const
{
- FX_INT32 iAlign = XFA_ATTRIBUTEENUM_Top;
+ int32_t iAlign = XFA_ATTRIBUTEENUM_Top;
CXFA_Para para = pTextProvider->GetParaNode();
if (para.IsExistInXML()) {
iAlign = para.GetVerticalAlign();
@@ -330,7 +330,7 @@ FX_FLOAT CXFA_TextParser::GetTabInterval(IFDE_CSSComputedStyle *pStyle) const
}
return 36;
}
-FX_INT32 CXFA_TextParser::CountTabs(IFDE_CSSComputedStyle *pStyle) const
+int32_t CXFA_TextParser::CountTabs(IFDE_CSSComputedStyle *pStyle) const
{
CFX_WideString wsValue;
if (pStyle && pStyle->GetCustomStyle(FX_WSTRC(L"xfa-tab-count"), wsValue)) {
@@ -363,7 +363,7 @@ IFX_Font* CXFA_TextParser::GetFont(IXFA_TextProvider *pTextProvider, IFDE_CSSCom
}
if (pStyle) {
IFDE_CSSFontStyle *pFontStyle = pStyle->GetFontStyles();
- FX_INT32 iCount = pFontStyle->CountFontFamilies();
+ int32_t iCount = pFontStyle->CountFontFamilies();
if (iCount > 0) {
wsFamily = pFontStyle->GetFontFamily(iCount - 1);
}
@@ -391,7 +391,7 @@ FX_FLOAT CXFA_TextParser::GetFontSize(IXFA_TextProvider *pTextProvider, IFDE_CSS
}
return 10;
}
-FX_INT32 CXFA_TextParser::GetHorScale(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle, IFDE_XMLNode *pXMLNode) const
+int32_t CXFA_TextParser::GetHorScale(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle, IFDE_XMLNode *pXMLNode) const
{
if (pStyle != NULL) {
CFX_WideString wsValue;
@@ -407,11 +407,11 @@ FX_INT32 CXFA_TextParser::GetHorScale(IXFA_TextProvider *pTextProvider, IFDE_CSS
}
}
if (CXFA_Font font = pTextProvider->GetFontNode()) {
- return (FX_INT32)font.GetHorizontalScale();
+ return (int32_t)font.GetHorizontalScale();
}
return 100;
}
-FX_INT32 CXFA_TextParser::GetVerScale(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle) const
+int32_t CXFA_TextParser::GetVerScale(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle) const
{
if (pStyle != NULL) {
CFX_WideString wsValue;
@@ -420,11 +420,11 @@ FX_INT32 CXFA_TextParser::GetVerScale(IXFA_TextProvider *pTextProvider, IFDE_CSS
}
}
if (CXFA_Font font = pTextProvider->GetFontNode()) {
- return (FX_INT32)font.GetVerticalScale();
+ return (int32_t)font.GetVerticalScale();
}
return 100;
}
-void CXFA_TextParser::GetUnderline(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle, FX_INT32 &iUnderline, FX_INT32 &iPeriod) const
+void CXFA_TextParser::GetUnderline(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle, int32_t &iUnderline, int32_t &iPeriod) const
{
iUnderline = 0;
iPeriod = XFA_ATTRIBUTEENUM_All;
@@ -451,7 +451,7 @@ void CXFA_TextParser::GetUnderline(IXFA_TextProvider *pTextProvider, IFDE_CSSCom
}
}
}
-void CXFA_TextParser::GetLinethrough(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle, FX_INT32 &iLinethrough) const
+void CXFA_TextParser::GetLinethrough(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle, int32_t &iLinethrough) const
{
if (pStyle) {
FX_DWORD dwDecoration = pStyle->GetParagraphStyles()->GetTextDecoration();
@@ -572,10 +572,10 @@ FX_BOOL CXFA_TextParser::GetTabstops(IFDE_CSSComputedStyle *pStyle, CXFA_TextTab
&& !pStyle->GetCustomStyle(FX_WSTRC(L"tab-stops"), wsValue)) {
return FALSE;
}
- FX_INT32 iLength = wsValue.GetLength();
+ int32_t iLength = wsValue.GetLength();
FX_LPCWSTR pTabStops = wsValue;
- FX_INT32 iCur = 0;
- FX_INT32 iLast = 0;
+ int32_t iCur = 0;
+ int32_t iLast = 0;
CFX_WideString wsAlign;
XFA_TABSTOPSSTATUS eStatus = XFA_TABSTOPSSTATUS_None;
FX_WCHAR ch;
@@ -607,7 +607,7 @@ FX_BOOL CXFA_TextParser::GetTabstops(IFDE_CSSComputedStyle *pStyle, CXFA_TextTab
if (ch != 'l') {
eStatus = XFA_TABSTOPSSTATUS_Location;
} else {
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
while (iCur < iLength) {
ch = pTabStops[iCur];
iCur++;
@@ -679,8 +679,8 @@ CXFA_TextLayout::~CXFA_TextLayout()
}
void CXFA_TextLayout::Unload()
{
- FX_INT32 iCount = m_pieceLines.GetSize();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = m_pieceLines.GetSize();
+ for (int32_t i = 0; i < iCount; i++) {
CXFA_PieceLine *pLine = m_pieceLines.GetAt(i);
FDE_DeleteWith(CXFA_PieceLine, m_pAllocator, pLine);
}
@@ -752,7 +752,7 @@ void CXFA_TextLayout::InitBreak(FX_FLOAT fLineWidth)
FX_FLOAT fStart = 0;
FX_FLOAT fStartPos = 0;
if (para.IsExistInXML()) {
- FX_INT32 iAlign = FX_RTFLINEALIGNMENT_Left;
+ int32_t iAlign = FX_RTFLINEALIGNMENT_Left;
switch (para.GetHorizontalAlign()) {
case XFA_ATTRIBUTEENUM_Center:
iAlign = FX_RTFLINEALIGNMENT_Center;
@@ -788,8 +788,8 @@ void CXFA_TextLayout::InitBreak(FX_FLOAT fLineWidth)
m_pBreak->SetLineWidth(fStart, fLineWidth);
m_pBreak->SetLinePos(fStartPos);
if (font.IsExistInXML()) {
- m_pBreak->SetHorizontalScale((FX_INT32)font.GetHorizontalScale());
- m_pBreak->SetVerticalScale((FX_INT32)font.GetVerticalScale());
+ m_pBreak->SetHorizontalScale((int32_t)font.GetHorizontalScale());
+ m_pBreak->SetVerticalScale((int32_t)font.GetVerticalScale());
m_pBreak->SetCharSpace(font.GetLetterSpacing());
}
FX_FLOAT fFontSize = m_textParser.GetFontSize(m_pTextProvider, NULL);
@@ -805,7 +805,7 @@ void CXFA_TextLayout::InitBreak(IFDE_CSSComputedStyle *pStyle, FDE_CSSDISPLAY eD
}
IFDE_CSSParagraphStyle *pParaStyle = pStyle->GetParagraphStyles();
if (eDisplay == FDE_CSSDISPLAY_Block || eDisplay == FDE_CSSDISPLAY_ListItem) {
- FX_INT32 iAlign = FX_RTFLINEALIGNMENT_Left;
+ int32_t iAlign = FX_RTFLINEALIGNMENT_Left;
switch (pParaStyle->GetTextAlign()) {
case FDE_CSSTEXTALIGN_Right:
iAlign = FX_RTFLINEALIGNMENT_Right;
@@ -863,7 +863,7 @@ void CXFA_TextLayout::InitBreak(IFDE_CSSComputedStyle *pStyle, FDE_CSSDISPLAY eD
m_pTabstopContext = FX_NEW CXFA_TextTabstopsContext;
}
m_textParser.GetTabstops(pStyle, m_pTabstopContext);
- for (FX_INT32 i = 0; i < m_pTabstopContext->m_iTabCount; i++) {
+ for (int32_t i = 0; i < m_pTabstopContext->m_iTabCount; i++) {
XFA_TABSTOPS *pTab = m_pTabstopContext->m_tabstops.GetDataPtr(i);
m_pBreak->AddPositionedTab(pTab->fTabstops);
}
@@ -876,7 +876,7 @@ void CXFA_TextLayout::InitBreak(IFDE_CSSComputedStyle *pStyle, FDE_CSSDISPLAY eD
m_pBreak->SetVerticalScale(m_textParser.GetVerScale(m_pTextProvider, pStyle));
m_pBreak->SetCharSpace(pParaStyle->GetLetterSpacing().GetValue());
}
-FX_INT32 CXFA_TextLayout::GetText(CFX_WideString &wsText)
+int32_t CXFA_TextLayout::GetText(CFX_WideString &wsText)
{
GetTextDataNode();
wsText.Empty();
@@ -891,7 +891,7 @@ FX_FLOAT CXFA_TextLayout::GetLayoutHeight()
if (m_pLoader == NULL) {
return 0;
}
- FX_INT32 iCount = m_pLoader->m_lineHeights.GetSize();
+ int32_t iCount = m_pLoader->m_lineHeights.GetSize();
if (iCount == 0 && m_pLoader->m_fWidth > 0) {
CFX_SizeF szMax, szDef;
szMax.Set(m_pLoader->m_fWidth, m_pLoader->m_fHeight);
@@ -905,7 +905,7 @@ FX_FLOAT CXFA_TextLayout::GetLayoutHeight()
FX_FLOAT fHeight = m_pLoader->m_fHeight;
if (fHeight < 0.1f) {
fHeight = 0;
- for (FX_INT32 i = 0; i < iCount; i++) {
+ for (int32_t i = 0; i < iCount; i++) {
fHeight += m_pLoader->m_lineHeights.ElementAt(i);
}
}
@@ -935,12 +935,12 @@ FX_FLOAT CXFA_TextLayout::StartLayout(FX_FLOAT fWidth )
}
return fWidth;
}
-FX_BOOL CXFA_TextLayout::DoLayout(FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeight, FX_FLOAT fContentAreaHeight , FX_FLOAT fTextHeight )
+FX_BOOL CXFA_TextLayout::DoLayout(int32_t iBlockIndex, FX_FLOAT &fCalcHeight, FX_FLOAT fContentAreaHeight , FX_FLOAT fTextHeight )
{
if (m_pLoader == NULL) {
return FALSE;
}
- FX_INT32 iBlockCount = m_Blocks.GetSize();
+ int32_t iBlockCount = m_Blocks.GetSize();
FX_FLOAT fHeight = fTextHeight;
if (fHeight < 0) {
fHeight = GetLayoutHeight();
@@ -953,7 +953,7 @@ FX_BOOL CXFA_TextLayout::DoLayout(FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeight, F
if (iBlockCount == 0 && fHeight > 0) {
fHeight = fTextHeight - GetLayoutHeight();
if (fHeight > 0) {
- FX_INT32 iAlign = m_textParser.GetVAlgin(m_pTextProvider);
+ int32_t iAlign = m_textParser.GetVAlgin(m_pTextProvider);
if (iAlign == XFA_ATTRIBUTEENUM_Middle) {
fHeight /= 2.0f;
} else if (iAlign != XFA_ATTRIBUTEENUM_Bottom) {
@@ -963,7 +963,7 @@ FX_BOOL CXFA_TextLayout::DoLayout(FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeight, F
}
}
FX_FLOAT fLinePos = m_pLoader->m_fStartLineOffset;
- FX_INT32 iLineIndex = 0;
+ int32_t iLineIndex = 0;
if (iBlockCount > 1) {
if (iBlockCount >= (iBlockIndex + 1) * 2) {
iLineIndex = m_Blocks.ElementAt(iBlockIndex * 2);
@@ -971,13 +971,13 @@ FX_BOOL CXFA_TextLayout::DoLayout(FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeight, F
iLineIndex = m_Blocks.ElementAt(iBlockCount - 1) + m_Blocks.ElementAt(iBlockCount - 2);
}
if (m_pLoader->m_BlocksHeight.GetSize() > 0) {
- for (FX_INT32 i = 0; i < iBlockIndex; i++) {
+ for (int32_t i = 0; i < iBlockIndex; i++) {
fLinePos -= m_pLoader->m_BlocksHeight.ElementAt(i * 2 + 1);
}
}
}
- FX_INT32 iCount = m_pLoader->m_lineHeights.GetSize();
- FX_INT32 i = 0;
+ int32_t iCount = m_pLoader->m_lineHeights.GetSize();
+ int32_t i = 0;
for (i = iLineIndex; i < iCount; i++) {
FX_FLOAT fLineHeight = m_pLoader->m_lineHeights.ElementAt(i);
if ((i == iLineIndex) && (fLineHeight - fContentAreaHeight > 0.001)) {
@@ -1010,9 +1010,9 @@ FX_BOOL CXFA_TextLayout::DoLayout(FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeight, F
}
return FALSE;
}
-FX_INT32 CXFA_TextLayout::CountBlocks() const
+int32_t CXFA_TextLayout::CountBlocks() const
{
- FX_INT32 iCount = m_Blocks.GetSize() / 2;
+ int32_t iCount = m_Blocks.GetSize() / 2;
return iCount > 0 ? iCount : 1;
}
FX_BOOL CXFA_TextLayout::CalcSize(const CFX_SizeF &minSize, const CFX_SizeF &maxSize, CFX_SizeF &defaultSize)
@@ -1063,7 +1063,7 @@ FX_BOOL CXFA_TextLayout::Layout(const CFX_SizeF &size, FX_FLOAT* fHeight)
}
return TRUE;
}
-FX_BOOL CXFA_TextLayout::Layout(FX_INT32 iBlock)
+FX_BOOL CXFA_TextLayout::Layout(int32_t iBlock)
{
if (m_pLoader == NULL || iBlock < 0 || iBlock >= CountBlocks()) {
return FALSE;
@@ -1077,8 +1077,8 @@ FX_BOOL CXFA_TextLayout::Layout(FX_INT32 iBlock)
CXFA_Node *pNode = NULL;
CFX_SizeF szText;
szText.Set(m_pLoader->m_fWidth, m_pLoader->m_fHeight);
- FX_INT32 iCount = m_Blocks.GetSize();
- FX_INT32 iBlocksHeightCount = m_pLoader->m_BlocksHeight.GetSize();
+ int32_t iCount = m_Blocks.GetSize();
+ int32_t iBlocksHeightCount = m_pLoader->m_BlocksHeight.GetSize();
iBlocksHeightCount /= 2;
if (iBlock < iBlocksHeightCount) {
return TRUE;
@@ -1087,7 +1087,7 @@ FX_BOOL CXFA_TextLayout::Layout(FX_INT32 iBlock)
Unload();
m_pBreak = CreateBreak(TRUE);
fLinePos = m_pLoader->m_fStartLineOffset;
- for (FX_INT32 i = 0; i < iBlocksHeightCount; i++) {
+ for (int32_t i = 0; i < iBlocksHeightCount; i++) {
fLinePos -= m_pLoader->m_BlocksHeight.ElementAt(i * 2 + 1);
}
m_pLoader->m_iChar = 0;
@@ -1161,24 +1161,24 @@ FX_BOOL CXFA_TextLayout::Layout(FX_INT32 iBlock)
}
return TRUE;
}
-void CXFA_TextLayout::ItemBlocks(const CFX_RectF& rtText, FX_INT32 iBlockIndex)
+void CXFA_TextLayout::ItemBlocks(const CFX_RectF& rtText, int32_t iBlockIndex)
{
if (!m_pLoader) {
return;
}
- FX_INT32 iCountHeight = m_pLoader->m_lineHeights.GetSize();
+ int32_t iCountHeight = m_pLoader->m_lineHeights.GetSize();
if (iCountHeight == 0) {
return;
}
FX_BOOL bEndItem = TRUE;
- FX_INT32 iBlockCount = m_Blocks.GetSize();
+ int32_t iBlockCount = m_Blocks.GetSize();
FX_FLOAT fLinePos = m_pLoader->m_fStartLineOffset;
- FX_INT32 iLineIndex = 0;
+ int32_t iLineIndex = 0;
if (iBlockIndex > 0) {
- FX_INT32 iBlockHeightCount = m_pLoader->m_BlocksHeight.GetSize();
+ int32_t iBlockHeightCount = m_pLoader->m_BlocksHeight.GetSize();
iBlockHeightCount /= 2;
if (iBlockHeightCount >= iBlockIndex) {
- for (FX_INT32 i = 0; i < iBlockIndex; i++) {
+ for (int32_t i = 0; i < iBlockIndex; i++) {
fLinePos -= m_pLoader->m_BlocksHeight.ElementAt(i * 2 + 1);
}
} else {
@@ -1186,7 +1186,7 @@ void CXFA_TextLayout::ItemBlocks(const CFX_RectF& rtText, FX_INT32 iBlockIndex)
}
iLineIndex = m_Blocks.ElementAt(iBlockCount - 1) + m_Blocks.ElementAt(iBlockCount - 2);
}
- FX_INT32 i = 0;
+ int32_t i = 0;
for (i = iLineIndex; i < iCountHeight; i++) {
FX_FLOAT fLineHeight = m_pLoader->m_lineHeights.ElementAt(i);
if (fLinePos + fLineHeight - rtText.height > 0.001) {
@@ -1202,7 +1202,7 @@ void CXFA_TextLayout::ItemBlocks(const CFX_RectF& rtText, FX_INT32 iBlockIndex)
m_Blocks.Add(i - iLineIndex);
}
}
-FX_BOOL CXFA_TextLayout::DrawString(CFX_RenderDevice *pFxDevice, const CFX_Matrix &tmDoc2Device, const CFX_RectF &rtClip, FX_INT32 iBlock )
+FX_BOOL CXFA_TextLayout::DrawString(CFX_RenderDevice *pFxDevice, const CFX_Matrix &tmDoc2Device, const CFX_RectF &rtClip, int32_t iBlock )
{
IFDE_RenderDevice *pDevice = IFDE_RenderDevice::Create(pFxDevice);
if (pDevice == NULL) {
@@ -1214,16 +1214,16 @@ FX_BOOL CXFA_TextLayout::DrawString(CFX_RenderDevice *pFxDevice, const CFX_Matri
IFDE_Pen *pPen = IFDE_Pen::Create();
FXSYS_assert(pDevice != NULL && pSolidBrush != NULL && pPen != NULL);
if (m_pieceLines.GetSize() == 0) {
- FX_INT32 iBlockCount = CountBlocks();
- for (FX_INT32 i = 0; i < iBlockCount; i++) {
+ int32_t iBlockCount = CountBlocks();
+ for (int32_t i = 0; i < iBlockCount; i++) {
Layout(i);
}
}
FXTEXT_CHARPOS *pCharPos = NULL;
- FX_INT32 iCharCount = 0;
- FX_INT32 iLineStart = 0;
- FX_INT32 iPieceLines = m_pieceLines.GetSize();
- FX_INT32 iCount = m_Blocks.GetSize();
+ int32_t iCharCount = 0;
+ int32_t iLineStart = 0;
+ int32_t iPieceLines = m_pieceLines.GetSize();
+ int32_t iCount = m_Blocks.GetSize();
if (iCount > 0) {
iBlock *= 2;
if (iBlock < iCount) {
@@ -1233,16 +1233,16 @@ FX_BOOL CXFA_TextLayout::DrawString(CFX_RenderDevice *pFxDevice, const CFX_Matri
iPieceLines = 0;
}
}
- for (FX_INT32 i = 0; i < iPieceLines; i++) {
+ for (int32_t i = 0; i < iPieceLines; i++) {
if(i + iLineStart >= m_pieceLines.GetSize()) {
break;
}
CXFA_PieceLine *pPieceLine = m_pieceLines.GetAt(i + iLineStart);
- FX_INT32 iPieces = pPieceLine->m_textPieces.GetSize();
- FX_INT32 j = 0;
+ int32_t iPieces = pPieceLine->m_textPieces.GetSize();
+ int32_t j = 0;
for (j = 0; j < iPieces; j++) {
XFA_LPCTEXTPIECE pPiece = pPieceLine->m_textPieces.GetAt(j);
- FX_INT32 iChars = pPiece->iChars;
+ int32_t iChars = pPiece->iChars;
if (iCharCount < iChars) {
if (pCharPos != NULL) {
FDE_Free(pCharPos);
@@ -1281,11 +1281,11 @@ void CXFA_TextLayout::UpdateAlign(FX_FLOAT fHeight, FX_FLOAT fBottom)
default:
return;
}
- FX_INT32 iCount = m_pieceLines.GetSize();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = m_pieceLines.GetSize();
+ for (int32_t i = 0; i < iCount; i++) {
CXFA_PieceLine *pPieceLine = m_pieceLines.GetAt(i);
- FX_INT32 iPieces = pPieceLine->m_textPieces.GetSize();
- for (FX_INT32 j = 0; j < iPieces; j++) {
+ int32_t iPieces = pPieceLine->m_textPieces.GetSize();
+ for (int32_t j = 0; j < iPieces; j++) {
XFA_LPTEXTPIECE pPiece = pPieceLine->m_textPieces.GetAt(j);
CFX_RectF &rect = pPiece->rtPiece;
rect.top += fHeight;
@@ -1326,7 +1326,7 @@ void CXFA_TextLayout::LoadText(CXFA_Node *pNode, const CFX_SizeF &szText, FX_FLO
if (fSpaceAbove < 0.1f) {
fSpaceAbove = 0;
}
- FX_INT32 verAlign = para.GetVerticalAlign();
+ int32_t verAlign = para.GetVerticalAlign();
switch (verAlign) {
case XFA_ATTRIBUTEENUM_Top:
case XFA_ATTRIBUTEENUM_Middle:
@@ -1345,7 +1345,7 @@ void CXFA_TextLayout::LoadText(CXFA_Node *pNode, const CFX_SizeF &szText, FX_FLO
EndBreak(FX_RTFBREAK_ParagraphBreak, fLinePos, bSavePieces);
}
}
-FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode *pXMLNode, const CFX_SizeF &szText, FX_FLOAT &fLinePos, IFDE_CSSComputedStyle *pParentStyle, FX_BOOL bSavePieces, CXFA_LinkUserData* pLinkData, FX_BOOL bEndBreak, FX_BOOL bIsOl, FX_INT32 iLiCount)
+FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode *pXMLNode, const CFX_SizeF &szText, FX_FLOAT &fLinePos, IFDE_CSSComputedStyle *pParentStyle, FX_BOOL bSavePieces, CXFA_LinkUserData* pLinkData, FX_BOOL bEndBreak, FX_BOOL bIsOl, int32_t iLiCount)
{
if (pXMLNode == NULL) {
return FALSE;
@@ -1398,7 +1398,7 @@ FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode *pXMLNode, const CFX_SizeF &
wsLinkContent.ReleaseBuffer(wsLinkContent.GetLength());
}
}
- FX_INT32 iTabCount = m_textParser.CountTabs(bContentNode ? pParentStyle : pStyle);
+ int32_t iTabCount = m_textParser.CountTabs(bContentNode ? pParentStyle : pStyle);
FX_BOOL bSpaceRun = m_textParser.IsSpaceRun(bContentNode ? pParentStyle : pStyle);
CFX_WideString wsText;
if (bContentNode && iTabCount == 0) {
@@ -1421,7 +1421,7 @@ FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode *pXMLNode, const CFX_SizeF &
m_textParser.GetEmbbedObj(m_pTextProvider, pXMLNode, wsText);
}
}
- FX_INT32 iLength = wsText.GetLength();
+ int32_t iLength = wsText.GetLength();
if (iLength > 0 && bContentNode && !bSpaceRun) {
ProcessText(wsText);
}
@@ -1527,12 +1527,12 @@ FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode *pXMLNode, const CFX_SizeF &
FX_BOOL CXFA_TextLayout::AppendChar(const CFX_WideString &wsText, FX_FLOAT &fLinePos, FX_FLOAT fSpaceAbove, FX_BOOL bSavePieces)
{
FX_DWORD dwStatus = 0;
- FX_INT32 iChar = 0;
+ int32_t iChar = 0;
if (m_pLoader) {
iChar = m_pLoader->m_iChar;
}
- FX_INT32 iLength = wsText.GetLength();
- for (FX_INT32 i = iChar; i < iLength; i++) {
+ int32_t iLength = wsText.GetLength();
+ for (int32_t i = iChar; i < iLength; i++) {
FX_WCHAR wch = wsText.GetAt(i);
if (wch == 0xA0) {
wch = 0x20;
@@ -1567,14 +1567,14 @@ FX_BOOL CXFA_TextLayout::IsEnd(FX_BOOL bSavePieces)
}
void CXFA_TextLayout::ProcessText(CFX_WideString &wsText)
{
- FX_INT32 iLen = wsText.GetLength();
+ int32_t iLen = wsText.GetLength();
if (iLen == 0) {
return;
}
FX_LPWSTR psz = wsText.GetBuffer(iLen);
- FX_INT32 iTrimLeft = 0;
+ int32_t iTrimLeft = 0;
FX_WCHAR wch = 0, wPrev = 0;
- for (FX_INT32 i = 0; i < iLen; i++) {
+ for (int32_t i = 0; i < iLen; i++) {
wch = psz[i];
if (wch < 0x20) {
wch = 0x20;
@@ -1603,13 +1603,13 @@ void CXFA_TextLayout::DoTabstops(IFDE_CSSComputedStyle *pStyle, CXFA_PieceLine *
if (pStyle == NULL || pPieceLine == NULL) {
return;
}
- FX_INT32 iPieces = pPieceLine->m_textPieces.GetSize();
+ int32_t iPieces = pPieceLine->m_textPieces.GetSize();
if (iPieces == 0) {
return;
}
XFA_LPTEXTPIECE pPiece = pPieceLine->m_textPieces.GetAt(iPieces - 1);
- FX_INT32 &iTabstopsIndex = m_pTabstopContext->m_iTabIndex;
- FX_INT32 iCount = m_textParser.CountTabs(pStyle);
+ int32_t &iTabstopsIndex = m_pTabstopContext->m_iTabIndex;
+ int32_t iCount = m_textParser.CountTabs(pStyle);
if (iTabstopsIndex > m_pTabstopContext->m_iTabCount - 1) {
return;
}
@@ -1633,8 +1633,8 @@ void CXFA_TextLayout::DoTabstops(IFDE_CSSComputedStyle *pStyle, CXFA_PieceLine *
|| dwAlgin == FX_HashCode_String_GetW(L"before", 6)) {
fLeft = pPiece->rtPiece.width;
} else if (dwAlgin == FX_HashCode_String_GetW(L"decimal", 7)) {
- FX_INT32 iChars = pPiece->iChars;
- for (FX_INT32 i = 0; i < iChars; i++) {
+ int32_t iChars = pPiece->iChars;
+ for (int32_t i = 0; i < iChars; i++) {
if (pPiece->pszText[i] == L'.') {
break;
}
@@ -1650,7 +1650,7 @@ void CXFA_TextLayout::DoTabstops(IFDE_CSSComputedStyle *pStyle, CXFA_PieceLine *
}
void CXFA_TextLayout::AppendTextLine(FX_DWORD dwStatus, FX_FLOAT &fLinePos, FX_BOOL bSavePieces, FX_BOOL bEndBreak)
{
- FX_INT32 iPieces = m_pBreak->CountBreakPieces();
+ int32_t iPieces = m_pBreak->CountBreakPieces();
if (iPieces < 1) {
return;
}
@@ -1662,7 +1662,7 @@ void CXFA_TextLayout::AppendTextLine(FX_DWORD dwStatus, FX_FLOAT &fLinePos, FX_B
m_pTabstopContext->Reset();
}
FX_FLOAT fLineStep = 0, fBaseLine = 0;
- FX_INT32 i = 0;
+ int32_t i = 0;
for (i = 0; i < iPieces; i++) {
const CFX_RTFPiece *pPiece = m_pBreak->GetBreakPiece(i);
CXFA_TextUserData *pUserData = (CXFA_TextUserData*)pPiece->m_pUserData;
@@ -1672,7 +1672,7 @@ void CXFA_TextLayout::AppendTextLine(FX_DWORD dwStatus, FX_FLOAT &fLinePos, FX_B
FX_FLOAT fVerScale = pPiece->m_iVerticalScale / 100.0f;
XFA_LPTEXTPIECE pTP = (XFA_LPTEXTPIECE)m_pAllocator->Alloc(sizeof(XFA_TEXTPIECE));
pTP->pszText = (FX_LPWSTR)m_pAllocator->Alloc(pPiece->m_iChars * sizeof(FX_WCHAR));
- pTP->pWidths = (FX_INT32*)m_pAllocator->Alloc(pPiece->m_iChars * sizeof(FX_INT32));
+ pTP->pWidths = (int32_t*)m_pAllocator->Alloc(pPiece->m_iChars * sizeof(int32_t));
pTP->iChars = pPiece->m_iChars;
pPiece->GetString(pTP->pszText);
pPiece->GetWidths(pTP->pWidths);
@@ -1721,7 +1721,7 @@ void CXFA_TextLayout::AppendTextLine(FX_DWORD dwStatus, FX_FLOAT &fLinePos, FX_B
} else {
FX_FLOAT fLineStep = 0;
FX_FLOAT fLineWidth = 0;
- for (FX_INT32 i = 0; i < iPieces; i++) {
+ for (int32_t i = 0; i < iPieces; i++) {
const CFX_RTFPiece *pPiece = m_pBreak->GetBreakPiece(i);
CXFA_TextUserData *pUserData = (CXFA_TextUserData*)pPiece->m_pUserData;
if (pUserData != NULL) {
@@ -1781,17 +1781,17 @@ void CXFA_TextLayout::AppendTextLine(FX_DWORD dwStatus, FX_FLOAT &fLinePos, FX_B
}
m_iLines++;
}
-void CXFA_TextLayout::RenderString(IFDE_RenderDevice *pDevice, IFDE_SolidBrush *pBrush, CXFA_PieceLine *pPieceLine, FX_INT32 iPiece, FXTEXT_CHARPOS *pCharPos, const CFX_Matrix &tmDoc2Device)
+void CXFA_TextLayout::RenderString(IFDE_RenderDevice *pDevice, IFDE_SolidBrush *pBrush, CXFA_PieceLine *pPieceLine, int32_t iPiece, FXTEXT_CHARPOS *pCharPos, const CFX_Matrix &tmDoc2Device)
{
XFA_LPCTEXTPIECE pPiece = pPieceLine->m_textPieces.GetAt(iPiece);
- FX_INT32 iCount = GetDisplayPos(pPiece, pCharPos);
+ int32_t iCount = GetDisplayPos(pPiece, pCharPos);
if (iCount > 0) {
pBrush->SetColor(pPiece->dwColor);
pDevice->DrawString(pBrush, pPiece->pFont, pCharPos, iCount, pPiece->fFontSize, &tmDoc2Device);
}
pPieceLine->m_charCounts.Add(iCount);
}
-void CXFA_TextLayout::RenderPath(IFDE_RenderDevice *pDevice, IFDE_Pen *pPen, CXFA_PieceLine *pPieceLine, FX_INT32 iPiece, FXTEXT_CHARPOS *pCharPos, const CFX_Matrix &tmDoc2Device)
+void CXFA_TextLayout::RenderPath(IFDE_RenderDevice *pDevice, IFDE_Pen *pPen, CXFA_PieceLine *pPieceLine, int32_t iPiece, FXTEXT_CHARPOS *pCharPos, const CFX_Matrix &tmDoc2Device)
{
XFA_TEXTPIECE *pPiece = pPieceLine->m_textPieces.GetAt(iPiece);
FX_BOOL bNoUnderline = pPiece->iUnderline < 1 || pPiece->iUnderline > 2;
@@ -1801,14 +1801,14 @@ void CXFA_TextLayout::RenderPath(IFDE_RenderDevice *pDevice, IFDE_Pen *pPen, CXF
}
pPen->SetColor(pPiece->dwColor);
IFDE_Path *pPath = IFDE_Path::Create();
- FX_INT32 iChars = GetDisplayPos(pPiece, pCharPos);
+ int32_t iChars = GetDisplayPos(pPiece, pCharPos);
if (iChars > 0) {
CFX_PointF pt1, pt2;
FX_FLOAT fEndY = pCharPos[0].m_OriginY + 1.05f;
- FX_INT32 i = 0;
+ int32_t i = 0;
if (pPiece->iPeriod == XFA_ATTRIBUTEENUM_Word) {
- for (FX_INT32 i = 0; i < pPiece->iUnderline; i++) {
- for (FX_INT32 j = 0; j < iChars; j++) {
+ for (int32_t i = 0; i < pPiece->iUnderline; i++) {
+ for (int32_t j = 0; j < iChars; j++) {
pt1.x = pCharPos[j].m_OriginX;
pt2.x = pt1.x + pCharPos[j].m_FontCharWidth * pPiece->fFontSize / 1000.0f;
pt1.y = pt2.y = fEndY;
@@ -1819,7 +1819,7 @@ void CXFA_TextLayout::RenderPath(IFDE_RenderDevice *pDevice, IFDE_Pen *pPen, CXF
} else {
pt1.x = pCharPos[0].m_OriginX;
pt2.x = pCharPos[iChars - 1].m_OriginX + pCharPos[iChars - 1].m_FontCharWidth * pPiece->fFontSize / 1000.0f;
- for (FX_INT32 i = 0; i < pPiece->iUnderline; i++) {
+ for (int32_t i = 0; i < pPiece->iUnderline; i++) {
pt1.y = pt2.y = fEndY;
pPath->AddLine(pt1, pt2);
fEndY += 2.0f;
@@ -1837,8 +1837,8 @@ void CXFA_TextLayout::RenderPath(IFDE_RenderDevice *pDevice, IFDE_Pen *pPen, CXF
if (bNoLineThrough && (bNoUnderline || pPiece->iPeriod != XFA_ATTRIBUTEENUM_All)) {
goto XFA_RenderPathRet;
}
- FX_INT32 iCharsTmp = 0;
- FX_INT32 iPiecePrev = iPiece, iPieceNext = iPiece;
+ int32_t iCharsTmp = 0;
+ int32_t iPiecePrev = iPiece, iPieceNext = iPiece;
while (iPiecePrev > 0) {
iPiecePrev--;
iCharsTmp = pPieceLine->m_charCounts.GetAt(iPiecePrev);
@@ -1850,7 +1850,7 @@ void CXFA_TextLayout::RenderPath(IFDE_RenderDevice *pDevice, IFDE_Pen *pPen, CXF
goto XFA_RenderPathRet;
}
iCharsTmp = 0;
- FX_INT32 iPieces = pPieceLine->m_textPieces.GetSize();
+ int32_t iPieces = pPieceLine->m_textPieces.GetSize();
while (iPieceNext < iPieces - 1) {
iPieceNext++;
iCharsTmp = pPieceLine->m_charCounts.GetAt(iPieceNext);
@@ -1877,7 +1877,7 @@ void CXFA_TextLayout::RenderPath(IFDE_RenderDevice *pDevice, IFDE_Pen *pPen, CXF
CFX_PointF pt1, pt2;
pt1.x = fOrgX, pt2.x = fEndX;
FX_FLOAT fEndY = pCharPos[0].m_OriginY + 1.05f;
- FX_INT32 i = 0;
+ int32_t i = 0;
for (i = 0; i < pPiece->iUnderline; i++) {
pt1.y = pt2.y = fEndY;
pPath->AddLine(pt1, pt2);
@@ -1894,7 +1894,7 @@ void CXFA_TextLayout::RenderPath(IFDE_RenderDevice *pDevice, IFDE_Pen *pPen, CXF
XFA_RenderPathRet:
pPath->Release();
}
-FX_INT32 CXFA_TextLayout::GetDisplayPos(XFA_LPCTEXTPIECE pPiece, FXTEXT_CHARPOS *pCharPos, FX_BOOL bCharCode )
+int32_t CXFA_TextLayout::GetDisplayPos(XFA_LPCTEXTPIECE pPiece, FXTEXT_CHARPOS *pCharPos, FX_BOOL bCharCode )
{
if (pPiece == NULL) {
return 0;
@@ -1907,7 +1907,7 @@ FX_INT32 CXFA_TextLayout::GetDisplayPos(XFA_LPCTEXTPIECE pPiece, FXTEXT_CHARPOS
}
FX_BOOL CXFA_TextLayout::ToRun(XFA_LPCTEXTPIECE pPiece, FX_RTFTEXTOBJ &tr)
{
- FX_INT32 iLength = pPiece->iChars;
+ int32_t iLength = pPiece->iChars;
if (iLength < 1) {
return FALSE;
}
diff --git a/xfa/src/fxfa/src/app/xfa_textlayout.h b/xfa/src/fxfa/src/app/xfa_textlayout.h
index a47189cb3f..96d94956d6 100644
--- a/xfa/src/fxfa/src/app/xfa_textlayout.h
+++ b/xfa/src/fxfa/src/app/xfa_textlayout.h
@@ -64,7 +64,7 @@ public:
{
return m_eDisplay;
}
- void SetDecls(const IFDE_CSSDeclaration **ppDeclArray, FX_INT32 iDeclCount);
+ void SetDecls(const IFDE_CSSDeclaration **ppDeclArray, int32_t iDeclCount);
const IFDE_CSSDeclaration** GetDecls()
{
return (const IFDE_CSSDeclaration**)m_ppMatchedDecls;
@@ -93,17 +93,17 @@ public:
return m_pAllocator != NULL;
}
- FX_INT32 GetVAlgin(IXFA_TextProvider *pTextProvider) const;
+ int32_t GetVAlgin(IXFA_TextProvider *pTextProvider) const;
FX_FLOAT GetTabInterval(IFDE_CSSComputedStyle *pStyle) const;
- FX_INT32 CountTabs(IFDE_CSSComputedStyle *pStyle) const;
+ int32_t CountTabs(IFDE_CSSComputedStyle *pStyle) const;
FX_BOOL IsSpaceRun(IFDE_CSSComputedStyle *pStyle) const;
FX_BOOL GetTabstops(IFDE_CSSComputedStyle *pStyle, CXFA_TextTabstopsContext *pTabstopContext);
IFX_Font* GetFont(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle) const;
FX_FLOAT GetFontSize(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle) const;
- FX_INT32 GetHorScale(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle, IFDE_XMLNode *pXMLNode) const;
- FX_INT32 GetVerScale(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle) const;
- void GetUnderline(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle, FX_INT32 &iUnderline, FX_INT32 &iPeriod) const;
- void GetLinethrough(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle, FX_INT32 &iLinethrough) const;
+ int32_t GetHorScale(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle, IFDE_XMLNode *pXMLNode) const;
+ int32_t GetVerScale(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle) const;
+ void GetUnderline(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle, int32_t &iUnderline, int32_t &iPeriod) const;
+ void GetLinethrough(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle, int32_t &iLinethrough) const;
FX_ARGB GetColor(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle) const;
FX_FLOAT GetBaseline(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle) const;
FX_FLOAT GetLineHeight(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle, FX_BOOL bFirst, FX_FLOAT fVerScale) const;
@@ -140,9 +140,9 @@ public:
FX_FLOAT m_fHeight;
FX_FLOAT m_fLastPos;
FX_FLOAT m_fStartLineOffset;
- FX_INT32 m_iChar;
- FX_INT32 m_iLines;
- FX_INT32 m_iTotalLines;
+ int32_t m_iChar;
+ int32_t m_iLines;
+ int32_t m_iTotalLines;
IFDE_XMLNode *m_pXMLNode;
CXFA_Node *m_pNode;
IFDE_CSSComputedStyle *m_pParentStyle;
@@ -237,14 +237,14 @@ protected:
};
typedef struct _XFA_TEXTPIECE : public CFX_Target {
FX_LPWSTR pszText;
- FX_INT32 iChars;
- FX_INT32 *pWidths;
- FX_INT32 iHorScale;
- FX_INT32 iVerScale;
- FX_INT32 iBidiLevel;
- FX_INT32 iUnderline;
- FX_INT32 iPeriod;
- FX_INT32 iLineThrough;
+ int32_t iChars;
+ int32_t *pWidths;
+ int32_t iHorScale;
+ int32_t iVerScale;
+ int32_t iBidiLevel;
+ int32_t iUnderline;
+ int32_t iPeriod;
+ int32_t iLineThrough;
IFX_Font *pFont;
FX_ARGB dwColor;
FX_FLOAT fFontSize;
@@ -284,7 +284,7 @@ public:
CXFA_TextTabstopsContext() : m_iTabCount(0), m_iTabIndex(-1), m_bTabstops(FALSE), m_fTabWidth(0), m_fLeft(0) {}
void Append(FX_DWORD dwAlign, FX_FLOAT fTabstops)
{
- FX_INT32 i = 0;
+ int32_t i = 0;
for (i = 0; i < m_iTabCount; i++) {
XFA_TABSTOPS *pTabstop = m_tabstops.GetDataPtr(i);
if (fTabstops < pTabstop->fTabstops) {
@@ -311,8 +311,8 @@ public:
m_fLeft = 0;
}
CFX_ArrayTemplate<XFA_TABSTOPS> m_tabstops;
- FX_INT32 m_iTabCount;
- FX_INT32 m_iTabIndex;
+ int32_t m_iTabCount;
+ int32_t m_iTabIndex;
FX_BOOL m_bTabstops;
FX_FLOAT m_fTabWidth;
FX_FLOAT m_fLeft;
@@ -322,15 +322,15 @@ class CXFA_TextLayout
public:
CXFA_TextLayout(IXFA_TextProvider *pTextProvider);
virtual ~CXFA_TextLayout();
- FX_INT32 GetText(CFX_WideString &wsText);
+ int32_t GetText(CFX_WideString &wsText);
FX_FLOAT GetLayoutHeight();
FX_FLOAT StartLayout(FX_FLOAT fWidth = -1);
- FX_BOOL DoLayout(FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeight, FX_FLOAT fContentAreaHeight = -1, FX_FLOAT fTextHeight = -1);
+ FX_BOOL DoLayout(int32_t iBlockIndex, FX_FLOAT &fCalcHeight, FX_FLOAT fContentAreaHeight = -1, FX_FLOAT fTextHeight = -1);
FX_BOOL CalcSize(const CFX_SizeF &minSize, const CFX_SizeF &maxSize, CFX_SizeF &defaultSize);
FX_BOOL Layout(const CFX_SizeF &size, FX_FLOAT* fHeight = NULL);
- void ItemBlocks(const CFX_RectF& rtText, FX_INT32 iBlockIndex);
- FX_BOOL DrawString(CFX_RenderDevice *pFxDevice, const CFX_Matrix &tmDoc2Device, const CFX_RectF &rtClip, FX_INT32 iBlock = 0);
+ void ItemBlocks(const CFX_RectF& rtText, int32_t iBlockIndex);
+ FX_BOOL DrawString(CFX_RenderDevice *pFxDevice, const CFX_Matrix &tmDoc2Device, const CFX_RectF &rtClip, int32_t iBlock = 0);
FX_BOOL IsLoaded() const
{
@@ -347,7 +347,7 @@ private:
FX_BOOL Loader(const CFX_SizeF &szText, FX_FLOAT &fLinePos, FX_BOOL bSavePieces = TRUE);
void LoadText(CXFA_Node *pNode, const CFX_SizeF &szText, FX_FLOAT &fLinePos, FX_BOOL bSavePieces);
- FX_BOOL LoadRichText(IFDE_XMLNode *pXMLNode, const CFX_SizeF &szText, FX_FLOAT &fLinePos, IFDE_CSSComputedStyle *pParentStyle, FX_BOOL bSavePieces, CXFA_LinkUserData* pLinkData = NULL, FX_BOOL bEndBreak = TRUE, FX_BOOL bIsOl = FALSE, FX_INT32 iLiCount = 0);
+ FX_BOOL LoadRichText(IFDE_XMLNode *pXMLNode, const CFX_SizeF &szText, FX_FLOAT &fLinePos, IFDE_CSSComputedStyle *pParentStyle, FX_BOOL bSavePieces, CXFA_LinkUserData* pLinkData = NULL, FX_BOOL bEndBreak = TRUE, FX_BOOL bIsOl = FALSE, int32_t iLiCount = 0);
FX_BOOL AppendChar(const CFX_WideString &wsText, FX_FLOAT &fLinePos, FX_FLOAT fSpaceAbove, FX_BOOL bSavePieces);
@@ -359,16 +359,16 @@ private:
void UpdateAlign(FX_FLOAT fHeight, FX_FLOAT fBottom);
void RenderString(IFDE_RenderDevice *pDevice, IFDE_SolidBrush *pBrush, CXFA_PieceLine *pPieceLine,
- FX_INT32 iPiece, FXTEXT_CHARPOS *pCharPos, const CFX_Matrix &tmDoc2Device);
- void RenderPath(IFDE_RenderDevice *pDevice, IFDE_Pen *pPen, CXFA_PieceLine *pPieceLine, FX_INT32 iPiece,
+ int32_t iPiece, FXTEXT_CHARPOS *pCharPos, const CFX_Matrix &tmDoc2Device);
+ void RenderPath(IFDE_RenderDevice *pDevice, IFDE_Pen *pPen, CXFA_PieceLine *pPieceLine, int32_t iPiece,
FXTEXT_CHARPOS *pCharPos, const CFX_Matrix &tmDoc2Device);
- FX_INT32 GetDisplayPos(XFA_LPCTEXTPIECE pPiece, FXTEXT_CHARPOS *pCharPos, FX_BOOL bCharCode = FALSE);
+ int32_t GetDisplayPos(XFA_LPCTEXTPIECE pPiece, FXTEXT_CHARPOS *pCharPos, FX_BOOL bCharCode = FALSE);
FX_BOOL ToRun(XFA_LPCTEXTPIECE pPiece, FX_RTFTEXTOBJ &tr);
void DoTabstops(IFDE_CSSComputedStyle *pStyle, CXFA_PieceLine *pPieceLine);
- FX_BOOL Layout(FX_INT32 iBlock);
- FX_INT32 CountBlocks() const;
+ FX_BOOL Layout(int32_t iBlock);
+ int32_t CountBlocks() const;
IXFA_TextProvider *m_pTextProvider;
CXFA_Node *m_pTextDataNode;
FX_BOOL m_bRichText;
@@ -377,7 +377,7 @@ private:
FX_DWORD m_dwTextData;
CXFA_LoaderContext *m_pLoader;
- FX_INT32 m_iLines;
+ int32_t m_iLines;
FX_FLOAT m_fMaxWidth;
CXFA_TextParser m_textParser;
diff --git a/xfa/src/fxfa/src/common/fxfa_localevalue.h b/xfa/src/fxfa/src/common/fxfa_localevalue.h
index b6a3db5096..c9cec57336 100644
--- a/xfa/src/fxfa/src/common/fxfa_localevalue.h
+++ b/xfa/src/fxfa/src/common/fxfa_localevalue.h
@@ -37,8 +37,8 @@ public:
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, FX_INT32 nIntLen, FX_INT32 nDecLen, FX_BOOL bSign = TRUE);
- FX_BOOL ValidateNumericTemp(CFX_WideString& wsNumeric, CFX_WideString& wsFormat, IFX_Locale* pLocale = NULL, FX_INT32* pos = NULL);
+ 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;
diff --git a/xfa/src/fxfa/src/common/xfa_doclayout.h b/xfa/src/fxfa/src/common/xfa_doclayout.h
index d5aaaa9cf8..d360faa62c 100644
--- a/xfa/src/fxfa/src/common/xfa_doclayout.h
+++ b/xfa/src/fxfa/src/common/xfa_doclayout.h
@@ -15,8 +15,8 @@ public:
IXFA_LayoutPage* GetPage() const;
CXFA_Node* GetFormNode() const;
void GetRect(CFX_RectF &rtLayout, FX_BOOL bRelative = FALSE) const;
- FX_INT32 GetIndex() const;
- FX_INT32 GetCount() const;
+ int32_t GetIndex() const;
+ int32_t GetCount() const;
CXFA_LayoutItem* GetParent() const;
CXFA_LayoutItem* GetFirst() const;
CXFA_LayoutItem* GetPrev() const;
@@ -88,7 +88,7 @@ class IXFA_LayoutPage
{
public:
IXFA_DocLayout* GetLayout() const;
- FX_INT32 GetPageIndex() const;
+ int32_t GetPageIndex() const;
void GetPageSize(CFX_SizeF &size);
CXFA_Node* GetMasterPage() const;
};
@@ -96,11 +96,11 @@ class IXFA_DocLayout
{
public:
virtual CXFA_Document* GetDocument() const = 0;
- virtual FX_INT32 StartLayout(FX_BOOL bForceRestart = FALSE) = 0;
- virtual FX_INT32 DoLayout(IFX_Pause *pPause = NULL) = 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 FX_INT32 CountPages() const = 0;
- virtual IXFA_LayoutPage* GetPage(FX_INT32 index) const = 0;
+ virtual int32_t CountPages() const = 0;
+ virtual IXFA_LayoutPage* GetPage(int32_t index) const = 0;
virtual CXFA_LayoutItem* GetLayoutItem(CXFA_Node *pFormItem) = 0;
};
diff --git a/xfa/src/fxfa/src/common/xfa_document.h b/xfa/src/fxfa/src/common/xfa_document.h
index e082321f22..1a45bd4126 100644
--- a/xfa/src/fxfa/src/common/xfa_document.h
+++ b/xfa/src/fxfa/src/common/xfa_document.h
@@ -72,9 +72,9 @@ public:
virtual CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node *pNode) = 0;
virtual void OnLayoutEvent(IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, XFA_LAYOUTEVENT eEvent, FX_LPVOID pParam = NULL, FX_LPVOID pParam2 = NULL) = 0;
virtual void StartFieldDrawLayout(CXFA_Node *pItem, FX_FLOAT &fCalcWidth, FX_FLOAT &fCalcHeight) = 0;
- virtual FX_BOOL FindSplitPos(CXFA_Node *pItem, FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeightPos) = 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 FX_INT32 ExecEventByDeepFirst(CXFA_Node* pFormNode, XFA_EVENTTYPE eEventType, FX_BOOL bIsFormReady = FALSE, FX_BOOL bRecursive = TRUE, CXFA_WidgetAcc* pExclude = NULL) = 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;
@@ -84,7 +84,7 @@ public:
virtual void OpenDropDownList(IXFA_Widget* hWidget) = 0;
virtual CFX_WideString GetCurrentDateTime() = 0;
virtual void ResetData(CXFA_WidgetData* pWidgetData = NULL) = 0;
- virtual FX_INT32 GetLayoutStatus() = 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;
diff --git a/xfa/src/fxfa/src/common/xfa_fm2jsapi.h b/xfa/src/fxfa/src/common/xfa_fm2jsapi.h
index cdb4fe94f6..10b96dd44e 100644
--- a/xfa/src/fxfa/src/common/xfa_fm2jsapi.h
+++ b/xfa/src/fxfa/src/common/xfa_fm2jsapi.h
@@ -14,7 +14,7 @@ extern "C"
typedef struct XFA_HFM2JSCONTEXT_ {
FX_LPVOID* pData;
}* XFA_HFM2JSCONTEXT;
-FX_INT32 XFA_FM2JS_Translate(FX_WSTR wsFormcalc, CFX_WideTextBuf& wsJavascript, CFX_WideString& wsError);
+int32_t XFA_FM2JS_Translate(FX_WSTR 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,
diff --git a/xfa/src/fxfa/src/common/xfa_object.h b/xfa/src/fxfa/src/common/xfa_object.h
index d2b0f1df96..7c4acd4105 100644
--- a/xfa/src/fxfa/src/common/xfa_object.h
+++ b/xfa/src/fxfa/src/common/xfa_object.h
@@ -80,9 +80,9 @@ public:
}
XFA_ELEMENT GetClassID() const;
void GetClassName(CFX_WideStringC &wsName) const;
- FX_UINT32 GetClassHashCode() const;
+ uint32_t GetClassHashCode() const;
void Script_ObjectClass_ClassName(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void ThrowScriptErrorMessage(FX_INT32 iStringID, ...);
+ void ThrowScriptErrorMessage(int32_t iStringID, ...);
protected:
CXFA_Document *m_pDocument;
FX_DWORD m_uFlags;
@@ -115,15 +115,15 @@ typedef struct _XFA_MAPDATABLOCK {
return (FX_LPBYTE)this + sizeof(_XFA_MAPDATABLOCK);
}
XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo;
- FX_INT32 iBytes;
+ int32_t iBytes;
} XFA_MAPDATABLOCK, * XFA_LPMAPDATABLOCK;
typedef struct _XFA_MAPMODULEDATA {
CFX_MapPtrToPtr m_ValueMap;
CFX_MapPtrTemplate<FX_LPVOID, XFA_LPMAPDATABLOCK> m_BufferMap;
} XFA_MAPMODULEDATA, * XFA_LPMAPMODULEDATA;
-#define XFA_CalcRefCount (FX_LPVOID)(FX_UINTPTR)FXBSTR_ID('X', 'F', 'A', 'R')
-#define XFA_CalcData (FX_LPVOID)(FX_UINTPTR)FXBSTR_ID('X', 'F', 'A', 'C')
-#define XFA_LAYOUTITEMKEY (FX_LPVOID)(FX_UINTPTR)FXBSTR_ID('L', 'Y', 'I', 'M')
+#define XFA_CalcRefCount (FX_LPVOID)(uintptr_t)FXBSTR_ID('X', 'F', 'A', 'R')
+#define XFA_CalcData (FX_LPVOID)(uintptr_t)FXBSTR_ID('X', 'F', 'A', 'C')
+#define XFA_LAYOUTITEMKEY (FX_LPVOID)(uintptr_t)FXBSTR_ID('L', 'Y', 'I', 'M')
class CXFA_Node : public CXFA_Object
{
public:
@@ -176,7 +176,7 @@ public:
FX_BOOL SetBoolean(XFA_ATTRIBUTE eAttr, FX_BOOL bValue, FX_BOOL bNotify = FALSE)
{
- return SetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, (FX_LPVOID)(FX_UINTPTR)bValue, bNotify);
+ return SetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, (FX_LPVOID)(uintptr_t)bValue, bNotify);
}
FX_BOOL TryBoolean(XFA_ATTRIBUTE eAttr, FX_BOOL &bValue, FX_BOOL bUseDefault = TRUE);
FX_BOOL GetBoolean(XFA_ATTRIBUTE eAttr)
@@ -184,19 +184,19 @@ public:
FX_BOOL bValue;
return TryBoolean(eAttr, bValue, TRUE) ? bValue : FALSE;
}
- FX_BOOL SetInteger(XFA_ATTRIBUTE eAttr, FX_INT32 iValue, FX_BOOL bNotify = FALSE)
+ FX_BOOL SetInteger(XFA_ATTRIBUTE eAttr, int32_t iValue, FX_BOOL bNotify = FALSE)
{
- return SetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, (FX_LPVOID)(FX_UINTPTR)iValue, bNotify);
+ return SetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, (FX_LPVOID)(uintptr_t)iValue, bNotify);
}
- FX_BOOL TryInteger(XFA_ATTRIBUTE eAttr, FX_INT32 &iValue, FX_BOOL bUseDefault = TRUE);
- FX_INT32 GetInteger(XFA_ATTRIBUTE eAttr)
+ FX_BOOL TryInteger(XFA_ATTRIBUTE eAttr, int32_t &iValue, FX_BOOL bUseDefault = TRUE);
+ int32_t GetInteger(XFA_ATTRIBUTE eAttr)
{
- FX_INT32 iValue;
+ 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, (FX_LPVOID)(FX_UINTPTR)eValue, bNotify);
+ return SetValue(eAttr, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)(uintptr_t)eValue, bNotify);
}
FX_BOOL TryEnum(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTEENUM &eValue, FX_BOOL bUseDefault = TRUE);
XFA_ATTRIBUTEENUM GetEnum(XFA_ATTRIBUTE eAttr)
@@ -234,16 +234,16 @@ public:
FX_LPVOID pData;
return TryUserData(pKey, pData, bProtoAlso) ? pData : NULL;
}
- CXFA_Node* GetProperty(FX_INT32 index, XFA_ELEMENT eProperty, FX_BOOL bCreateProperty = TRUE);
- FX_INT32 CountChildren(XFA_ELEMENT eElement, FX_BOOL bOnlyChild = FALSE);
- CXFA_Node* GetChild(FX_INT32 index, XFA_ELEMENT eElement, FX_BOOL bOnlyChild = FALSE);
- FX_INT32 InsertChild(FX_INT32 index, CXFA_Node *pNode);
+ 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;
- FX_INT32 GetNodeList(CXFA_NodeArray &nodes, FX_DWORD dwTypeFilter = XFA_NODEFILTER_Children | XFA_NODEFILTER_Properties, XFA_ELEMENT eElementFilter = XFA_ELEMENT_UNKNOWN, FX_INT32 iLevel = 1);
+ 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();
@@ -251,9 +251,9 @@ public:
CXFA_Node* GetDataDescriptionNode();
void SetDataDescriptionNode(CXFA_Node* pDataDescriptionNode);
CXFA_Node* GetBindData();
- FX_INT32 GetBindItems(CXFA_NodeArray& formItems);
- FX_INT32 AddBindItem(CXFA_Node* pFormNode);
- FX_INT32 RemoveBindItem(CXFA_Node* pFormNode);
+ 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();
@@ -265,8 +265,8 @@ public:
CXFA_Node* GetNextSameNameSibling(FX_DWORD dwNodeNameHash) const;
CXFA_Node* GetNextSameNameSibling(FX_WSTR wsNodeName) const;
CXFA_Node* GetNextSameClassSibling(XFA_ELEMENT eNodeClass) const;
- FX_INT32 GetNodeSameNameIndex() const;
- FX_INT32 GetNodeSameClassIndex() const;
+ int32_t GetNodeSameNameIndex() const;
+ int32_t GetNodeSameClassIndex() const;
void GetSOMExpression(CFX_WideString& wsSOMExpression);
CXFA_Node* GetInstanceMgrOfSubform();
@@ -367,7 +367,7 @@ public:
void Script_Subform_ExecValidate(CFXJSE_Arguments* pArguments);
void Script_Subform_GetInvalidObjects(CFXJSE_Arguments* pArguments);
- FX_INT32 Subform_and_SubformSet_InstanceIndex();
+ 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);
@@ -384,8 +384,8 @@ public:
void Script_InstanceManager_SetInstances(CFXJSE_Arguments* pArguments);
void Script_InstanceManager_AddInstance(CFXJSE_Arguments* pArguments);
void Script_InstanceManager_InsertInstance(CFXJSE_Arguments* pArguments);
- FX_INT32 InstanceManager_SetInstances(FX_INT32 iCount);
- FX_INT32 InstanceManager_MoveInstance(FX_INT32 iTo, FX_INT32 iFrom);
+ 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);
@@ -434,7 +434,7 @@ protected:
void OnRemoved(CXFA_Node *pParent, CXFA_Node *pRemoved, FX_BOOL bNotify);
void OnChanging(XFA_ATTRIBUTE eAttr, FX_LPVOID pNewValue, FX_BOOL bNotify);
void OnChanged(XFA_ATTRIBUTE eAttr, FX_LPVOID pNewValue, FX_BOOL bNotify, FX_BOOL bScriptModify = FALSE);
- FX_INT32 execSingleEventByName(FX_WSTR wsEventName, XFA_ELEMENT eElementType);
+ int32_t execSingleEventByName(FX_WSTR 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);
@@ -442,8 +442,8 @@ protected:
FX_BOOL GetMapModuleValue(FX_LPVOID pKey, FX_LPVOID &pValue);
void SetMapModuleString(FX_LPVOID pKey, FX_WSTR wsValue);
FX_BOOL GetMapModuleString(FX_LPVOID pKey, CFX_WideStringC &wsValue);
- void SetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID pValue, FX_INT32 iBytes, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL);
- FX_BOOL GetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID &pValue, FX_INT32 &iBytes, FX_BOOL bProtoAlso = TRUE);
+ void SetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID pValue, int32_t iBytes, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL);
+ FX_BOOL GetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID &pValue, int32_t &iBytes, FX_BOOL bProtoAlso = TRUE);
FX_BOOL HasMapModuleKey(FX_LPVOID pKey, FX_BOOL bProtoAlso = FALSE);
void RemoveMapModuleKey(FX_LPVOID pKey = NULL);
void MergeAllData(FX_LPVOID pDstModule, FX_BOOL bUseSrcAttr = TRUE);
@@ -472,13 +472,13 @@ public:
{
return (XFA_ELEMENT)m_eNodeClass;
}
- FX_UINT32 GetScriptObjHash()
+ uint32_t GetScriptObjHash()
{
return m_uScriptHash;
}
protected:
XFA_ELEMENT m_eNodeClass;
- FX_UINT32 m_uScriptHash;
+ uint32_t m_uScriptHash;
};
class CXFA_ThisProxy : public CXFA_Object
{
@@ -511,11 +511,11 @@ public:
return XFA_ELEMENT_NodeList;
}
CXFA_Node* NamedItem(FX_WSTR wsName);
- virtual FX_INT32 GetLength() = 0;
+ 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(FX_INT32 iIndex) = 0;
+ virtual CXFA_Node* Item(int32_t iIndex) = 0;
void Script_ListClass_Append(CFXJSE_Arguments* pArguments);
void Script_ListClass_Insert(CFXJSE_Arguments* pArguments);
@@ -530,11 +530,11 @@ class CXFA_ArrayNodeList : public CXFA_NodeList
public:
CXFA_ArrayNodeList(CXFA_Document* pDocument);
void SetArrayNodeList(const CXFA_NodeArray &srcArray);
- virtual FX_INT32 GetLength();
+ 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(FX_INT32 iIndex);
+ virtual CXFA_Node* Item(int32_t iIndex);
protected:
CXFA_NodeArray m_array;
};
@@ -543,11 +543,11 @@ class CXFA_AttachNodeList : public CXFA_NodeList
public:
CXFA_AttachNodeList(CXFA_Document* pDocument, CXFA_Node* pAttachNode);
- virtual FX_INT32 GetLength();
+ 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(FX_INT32 iIndex);
+ virtual CXFA_Node* Item(int32_t iIndex);
protected:
CXFA_Node* m_pAttachNode;
};
diff --git a/xfa/src/fxfa/src/common/xfa_parser.h b/xfa/src/fxfa/src/common/xfa_parser.h
index 2b1f1e62a8..b534acd03c 100644
--- a/xfa/src/fxfa/src/common/xfa_parser.h
+++ b/xfa/src/fxfa/src/common/xfa_parser.h
@@ -12,9 +12,9 @@ class IXFA_Parser
public:
static IXFA_Parser* Create(IXFA_ObjFactory *pFactory, FX_BOOL bDocumentParser = FALSE);
virtual void Release() = 0;
- virtual FX_INT32 StartParse(IFX_FileRead *pStream, XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) = 0;
- virtual FX_INT32 DoParse(IFX_Pause *pPause = NULL) = 0;
- virtual FX_INT32 ParseXMLData(const CFX_WideString &wsXML, IFDE_XMLNode* &pXMLNode, IFX_Pause *pPause = NULL) = 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;
diff --git a/xfa/src/fxfa/src/common/xfa_script.h b/xfa/src/fxfa/src/common/xfa_script.h
index a61dc959b3..5be9077083 100644
--- a/xfa/src/fxfa/src/common/xfa_script.h
+++ b/xfa/src/fxfa/src/common/xfa_script.h
@@ -35,13 +35,13 @@ public:
CXFA_HVALUEArray(FXJSE_HRUNTIME hRunTime) : m_hRunTime(hRunTime) {};
~CXFA_HVALUEArray()
{
- for (FX_INT32 i = 0; i < GetSize(); i++) {
+ for (int32_t i = 0; i < GetSize(); i++) {
FXJSE_Value_Release(GetAt(i));
}
}
void GetAttributeObject(CXFA_ObjArray& objArray)
{
- for (FX_INT32 i = 0; i < GetSize(); i++) {
+ for (int32_t i = 0; i < GetSize(); i++) {
CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(GetAt(i), NULL);
objArray.Add(pObject);
}
@@ -54,11 +54,11 @@ typedef struct _XFA_RESOLVENODE_RS {
{
nodes.RemoveAll();
}
- FX_INT32 GetAttributeResult(CXFA_HVALUEArray& hValueArray) const
+ int32_t GetAttributeResult(CXFA_HVALUEArray& hValueArray) const
{
if (pScriptAttribute && pScriptAttribute->eValueType == XFA_SCRIPT_Object) {
FXJSE_HRUNTIME hRunTime = hValueArray.m_hRunTime;
- for (FX_INT32 i = 0; i < nodes.GetSize(); i++) {
+ 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);
@@ -71,11 +71,11 @@ typedef struct _XFA_RESOLVENODE_RS {
XFA_RESOVENODE_RSTYPE dwFlags;
} XFA_RESOLVENODE_RS, * XFA_LPRESOLVENODE_RS;
typedef struct _XFA_JSBUILTININFO {
- FX_UINT32 uUnicodeHash;
+ uint32_t uUnicodeHash;
FX_LPCSTR pName;
} XFA_JSBUILTININFO, * XFA_LPJSBUILTININFO;
typedef XFA_JSBUILTININFO const * XFA_LPCJSBUILTININFO;
-XFA_LPCJSBUILTININFO XFA_GetJSBuiltinByHash(FX_UINT32 uHashCode);
+XFA_LPCJSBUILTININFO XFA_GetJSBuiltinByHash(uint32_t uHashCode);
class IXFA_ScriptContext
{
public:
@@ -85,13 +85,13 @@ public:
virtual void SetEventParam(CXFA_EventParam* pEventParam) = 0;
virtual CXFA_EventParam* GetEventParam() = 0;
virtual FX_BOOL RunScript(XFA_SCRIPTLANGTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, CXFA_Object* pThisObject = NULL) = 0;
- virtual FX_INT32 ResolveObjects(CXFA_Object* refNode, FX_WSTR wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, FX_DWORD dwStyles = XFA_RESOLVENODE_Children, CXFA_Node* bindNode = NULL) = 0;
+ virtual int32_t ResolveObjects(CXFA_Object* refNode, FX_WSTR 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 FX_INT32 GetIndexByName(CXFA_Node* refNode) = 0;
- virtual FX_INT32 GetIndexByClassName(CXFA_Node* refNode) = 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;
diff --git a/xfa/src/fxfa/src/common/xfa_utils.h b/xfa/src/fxfa/src/common/xfa_utils.h
index b666397e83..abb9dd208a 100644
--- a/xfa/src/fxfa/src/common/xfa_utils.h
+++ b/xfa/src/fxfa/src/common/xfa_utils.h
@@ -70,7 +70,7 @@ public:
NodeType* MoveToPrev()
{
NodeType *pCurrent = GetCurrent();
- FX_INT32 nStackLength = m_NodeStack.GetSize();
+ int32_t nStackLength = m_NodeStack.GetSize();
if(nStackLength == 1) {
return NULL;
} else if(nStackLength > 1) {
@@ -210,7 +210,7 @@ public:
void* pKey = NULL;
void* pValue = NULL;
CFX_MapPtrToPtr::GetNextAssoc(rNextPosition, pKey, pValue);
- rKey = (KeyType)(FX_UINTPTR)pKey;
+ rKey = (KeyType)(uintptr_t)pKey;
}
};
class CXFA_Node;
@@ -218,10 +218,10 @@ 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, FX_INT32 iLead, FX_INT32 iTread);
+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(FX_BSTR szStringVal);
-FX_INT32 XFA_MapRotation(FX_INT32 nRotation);
+int32_t XFA_MapRotation(int32_t nRotation);
#ifndef XFA_PARSE_HAS_LINEIDENTIFIER
#define XFA_PARSE_HAS_LINEIDENTIFIER
#endif
diff --git a/xfa/src/fxfa/src/fm2js/xfa_expression.cpp b/xfa/src/fxfa/src/fm2js/xfa_expression.cpp
index 7b230de528..47e5cb440f 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_expression.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_expression.cpp
@@ -35,8 +35,8 @@ CXFA_FMFunctionDefinition::~CXFA_FMFunctionDefinition()
m_pArguments = 0;
}
if (m_pExpressions) {
- FX_INT32 expc = m_pExpressions->GetSize();
- FX_INT32 index = 0;
+ int32_t expc = m_pExpressions->GetSize();
+ int32_t index = 0;
CXFA_FMExpression *e = 0;
while (index < expc) {
e = (CXFA_FMExpression *)m_pExpressions->GetAt(index);
@@ -66,8 +66,8 @@ void CXFA_FMFunctionDefinition::ToJavaScript(CFX_WideTextBuf& javascript)
}
javascript << FX_WSTRC(L"(");
if (m_pArguments != 0) {
- FX_INT32 argc = m_pArguments->GetSize();
- FX_INT32 index = 0;
+ int32_t argc = m_pArguments->GetSize();
+ int32_t index = 0;
CFX_WideStringC identifier = 0;
while (index < argc) {
identifier = m_pArguments->GetAt(index);
@@ -88,8 +88,8 @@ void CXFA_FMFunctionDefinition::ToJavaScript(CFX_WideTextBuf& javascript)
javascript << RUNTIMEFUNCTIONRETURNVALUE;
javascript << FX_WSTRC(L" = null;\n");
if (m_pExpressions) {
- FX_INT32 expc = m_pExpressions->GetSize();
- FX_INT32 index = 0;
+ int32_t expc = m_pExpressions->GetSize();
+ int32_t index = 0;
CXFA_FMExpression *e = 0;
while (index < expc) {
e = (CXFA_FMExpression *)m_pExpressions->GetAt(index);
@@ -229,8 +229,8 @@ CXFA_FMBlockExpression::CXFA_FMBlockExpression(FX_DWORD line, CFX_PtrArray *pExp
CXFA_FMBlockExpression::~CXFA_FMBlockExpression()
{
if (m_pExpressionList) {
- FX_INT32 expc = m_pExpressionList->GetSize();
- FX_INT32 index = 0;
+ int32_t expc = m_pExpressionList->GetSize();
+ int32_t index = 0;
CXFA_FMExpression *e = 0;
while (index < expc) {
e = (CXFA_FMExpression *)m_pExpressionList->GetAt(index);
@@ -246,8 +246,8 @@ void CXFA_FMBlockExpression::ToJavaScript(CFX_WideTextBuf& javascript)
{
javascript << FX_WSTRC(L"{\n");
if (m_pExpressionList) {
- FX_INT32 expc = m_pExpressionList->GetSize();
- FX_INT32 index = 0;
+ int32_t expc = m_pExpressionList->GetSize();
+ int32_t index = 0;
CXFA_FMExpression *e = 0;
while (index < expc) {
e = (CXFA_FMExpression *)m_pExpressionList->GetAt(index);
@@ -261,8 +261,8 @@ void CXFA_FMBlockExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript)
{
javascript << FX_WSTRC(L"{\n");
if (m_pExpressionList) {
- FX_INT32 expc = m_pExpressionList->GetSize();
- FX_INT32 index = 0;
+ int32_t expc = m_pExpressionList->GetSize();
+ int32_t index = 0;
CXFA_FMExpression *e = 0;
while (index < expc) {
e = (CXFA_FMExpression *)m_pExpressionList->GetAt(index);
@@ -451,7 +451,7 @@ void CXFA_FMContinueExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript)
javascript << FX_WSTRC(L" = 0;\n");
javascript << FX_WSTRC(L"continue;\n");
}
-CXFA_FMForExpression::CXFA_FMForExpression(FX_DWORD line, FX_WSTR wsVariant, CXFA_FMSimpleExpression *pAssignment, CXFA_FMSimpleExpression *pAccessor, FX_INT32 iDirection, CXFA_FMSimpleExpression *pStep, CXFA_FMExpression *pList)
+CXFA_FMForExpression::CXFA_FMForExpression(FX_DWORD line, FX_WSTR wsVariant, CXFA_FMSimpleExpression *pAssignment, CXFA_FMSimpleExpression *pAccessor, int32_t iDirection, CXFA_FMSimpleExpression *pStep, CXFA_FMExpression *pList)
: CXFA_FMLoopExpression(line),
m_wsVariant(wsVariant),
m_pAssignment(pAssignment),
@@ -594,8 +594,8 @@ CXFA_FMForeachExpression::~CXFA_FMForeachExpression()
m_pList = 0;
}
if (m_pAccessors) {
- FX_INT32 size = m_pAccessors->GetSize();
- FX_INT32 index = 0;
+ int32_t size = m_pAccessors->GetSize();
+ int32_t index = 0;
CXFA_FMSimpleExpression *e = 0;
while (index < size) {
e = (CXFA_FMSimpleExpression *)m_pAccessors->GetAt(index);
@@ -623,8 +623,8 @@ void CXFA_FMForeachExpression::ToJavaScript(CFX_WideTextBuf& javascript)
javascript << FX_WSTRC(L" = ");
javascript << XFA_FM_EXPTypeToString(CONCATFMOBJECT);
javascript << FX_WSTRC(L"(");
- FX_INT32 iSize = m_pAccessors->GetSize();
- FX_INT32 index = 0;
+ int32_t iSize = m_pAccessors->GetSize();
+ int32_t index = 0;
CXFA_FMSimpleExpression *s = 0;
while(index < iSize) {
s = (CXFA_FMSimpleExpression *)m_pAccessors->GetAt(index);
@@ -677,8 +677,8 @@ void CXFA_FMForeachExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript)
javascript << FX_WSTRC(L" = ");
javascript << XFA_FM_EXPTypeToString(CONCATFMOBJECT);
javascript << FX_WSTRC(L"(");
- FX_INT32 iSize = m_pAccessors->GetSize();
- FX_INT32 index = 0;
+ int32_t iSize = m_pAccessors->GetSize();
+ int32_t index = 0;
CXFA_FMSimpleExpression *s = 0;
while(index < iSize) {
s = (CXFA_FMSimpleExpression *)m_pAccessors->GetAt(index);
diff --git a/xfa/src/fxfa/src/fm2js/xfa_expression.h b/xfa/src/fxfa/src/fm2js/xfa_expression.h
index 6a51925527..a3781fa26d 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_expression.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_expression.h
@@ -145,7 +145,7 @@ class CXFA_FMForExpression : public CXFA_FMLoopExpression
{
public:
CXFA_FMForExpression(FX_DWORD line, FX_WSTR wsVariant, CXFA_FMSimpleExpression *pAssignment,
- CXFA_FMSimpleExpression *pAccessor, FX_INT32 iDirection, CXFA_FMSimpleExpression *pStep, CXFA_FMExpression *pList);
+ CXFA_FMSimpleExpression *pAccessor, int32_t iDirection, CXFA_FMSimpleExpression *pStep, CXFA_FMExpression *pList);
virtual ~CXFA_FMForExpression();
virtual void ToJavaScript(CFX_WideTextBuf& javascript);
virtual void ToImpliedReturnJS(CFX_WideTextBuf&);
@@ -153,7 +153,7 @@ private:
CFX_WideStringC m_wsVariant;
CXFA_FMSimpleExpression * m_pAssignment;
CXFA_FMSimpleExpression *m_pAccessor;
- FX_INT32 m_iDirection;
+ int32_t m_iDirection;
CXFA_FMSimpleExpression *m_pStep;
CXFA_FMExpression *m_pList;
};
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp b/xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp
index 8a1b1226f4..0ffec233dd 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp
@@ -9,14 +9,14 @@
extern "C"
{
#endif
-FX_INT32 XFA_FM2JS_Translate(FX_WSTR wsFormcalc, CFX_WideTextBuf& wsJavascript, CFX_WideString& wsError)
+int32_t XFA_FM2JS_Translate(FX_WSTR wsFormcalc, CFX_WideTextBuf& wsJavascript, CFX_WideString& wsError)
{
if (wsFormcalc.IsEmpty()) {
wsJavascript.Clear();
wsError.Empty();
return 0;
}
- FX_INT32 status = 0;
+ int32_t status = 0;
CXFA_FMProgram program;
status = program.Init(wsFormcalc);
if(status) {
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp
index be74852098..84a7747e7a 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp
@@ -8,13 +8,13 @@
#include <time.h>
#define FINANCIAL_PRECISION 0.00000001
struct XFA_FMHtmlReserveCode {
- FX_UINT32 m_uCode;
+ uint32_t m_uCode;
FX_LPCWSTR m_htmlReserve;
};
struct XFA_FMHtmlHashedReserveCode {
- FX_UINT32 m_uHash;
+ uint32_t m_uHash;
FX_LPCWSTR m_htmlReserve;
- FX_UINT32 m_uCode;
+ uint32_t m_uCode;
};
static XFA_FMHtmlHashedReserveCode reservesForDecode [] = {
{0x00018b62, L"Mu", 924},
@@ -547,12 +547,12 @@ void CXFA_FM2JSContext::Avg(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 argc = args.GetLength();
- FX_UINT32 uCount = 0;
+ int32_t argc = args.GetLength();
+ uint32_t uCount = 0;
FX_DOUBLE dSum = 0.0;
if(argc >= 1) {
FXJSE_HVALUE argValue = 0;
- for(FX_INT32 i = 0; i < argc; i++) {
+ for(int32_t i = 0; i < argc; i++) {
argValue = args.GetValue(i);
if(FXJSE_Value_IsNull(argValue)) {
FXJSE_Value_Release(argValue);
@@ -560,14 +560,14 @@ void CXFA_FM2JSContext::Avg(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
} else if(FXJSE_Value_IsArray(argValue)) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argValue, FX_BSTRC("length"), lengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(lengthValue);
+ int32_t iLength = FXJSE_Value_ToInteger(lengthValue);
FXJSE_Value_Release(lengthValue);
if(iLength > 2) {
FXJSE_HVALUE propertyValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectPropByIdx(argValue, 1, propertyValue);
FXJSE_HVALUE jsObjectValue = FXJSE_Value_Create(hruntime);
if(FXJSE_Value_IsNull(propertyValue)) {
- for(FX_INT32 j = 2; j < iLength; j++) {
+ for(int32_t j = 2; j < iLength; j++) {
FXJSE_Value_GetObjectPropByIdx(argValue, j, jsObjectValue);
FXJSE_HVALUE defaultPropValue = FXJSE_Value_Create(hruntime);
GetObjectDefaultValue(jsObjectValue, defaultPropValue);
@@ -581,7 +581,7 @@ void CXFA_FM2JSContext::Avg(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
FXJSE_HVALUE newPropertyValue = FXJSE_Value_Create(hruntime);
- for(FX_INT32 j = 2; j < iLength; j++) {
+ for(int32_t j = 2; j < iLength; j++) {
FXJSE_Value_GetObjectPropByIdx(argValue, j, jsObjectValue);
FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr, newPropertyValue);
if (!FXJSE_Value_IsNull(newPropertyValue)) {
@@ -628,10 +628,10 @@ void CXFA_FM2JSContext::Count(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 argc = args.GetLength();
- FX_UINT32 uCount = 0;
+ int32_t argc = args.GetLength();
+ uint32_t uCount = 0;
FXJSE_HVALUE argValue = 0;
- for(FX_INT32 i = 0; i < argc; i++) {
+ for(int32_t i = 0; i < argc; i++) {
argValue = args.GetValue(i);
if(FXJSE_Value_IsNull(argValue)) {
FXJSE_Value_Release(argValue);
@@ -639,7 +639,7 @@ void CXFA_FM2JSContext::Count(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
} else if(FXJSE_Value_IsArray(argValue)) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argValue, FX_BSTRC("length"), lengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(lengthValue);
+ int32_t iLength = FXJSE_Value_ToInteger(lengthValue);
FXJSE_Value_Release(lengthValue);
if(iLength > 2) {
FXJSE_HVALUE propertyValue = FXJSE_Value_Create(hruntime);
@@ -648,7 +648,7 @@ void CXFA_FM2JSContext::Count(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
FXJSE_Value_GetObjectPropByIdx(argValue, 1, propertyValue);
FXJSE_Value_GetObjectPropByIdx(argValue, 2, jsObjectValue);
if(FXJSE_Value_IsNull(propertyValue)) {
- for(FX_INT32 i = 2; i < iLength; i++) {
+ for(int32_t i = 2; i < iLength; i++) {
FXJSE_Value_GetObjectPropByIdx(argValue, i, jsObjectValue);
GetObjectDefaultValue(jsObjectValue, newPropertyValue);
if (!FXJSE_Value_IsNull(newPropertyValue)) {
@@ -658,7 +658,7 @@ void CXFA_FM2JSContext::Count(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
} else {
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
- for(FX_INT32 i = 2; i < iLength; i++) {
+ for(int32_t i = 2; i < iLength; i++) {
FXJSE_Value_GetObjectPropByIdx(argValue, i, jsObjectValue);
FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr, newPropertyValue);
uCount += (FXJSE_Value_IsNull(newPropertyValue) ? 0 : 1);
@@ -683,7 +683,7 @@ void CXFA_FM2JSContext::Count(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
FXJSE_Value_Release(argValue);
}
argValue = 0;
- FXJSE_Value_SetInteger(args.GetReturnValue(), (FX_INT32)uCount);
+ FXJSE_Value_SetInteger(args.GetReturnValue(), (int32_t)uCount);
}
void CXFA_FM2JSContext::Floor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
@@ -705,11 +705,11 @@ void CXFA_FM2JSContext::Max(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 argc = args.GetLength();
- FX_UINT32 uCount = 0;
+ int32_t argc = args.GetLength();
+ uint32_t uCount = 0;
FX_DOUBLE dMaxValue = 0.0;
FXJSE_HVALUE argValue = 0;
- for(FX_INT32 i = 0; i < argc; i++) {
+ for(int32_t i = 0; i < argc; i++) {
argValue = args.GetValue(i);
if(FXJSE_Value_IsNull(argValue)) {
FXJSE_Value_Release(argValue);
@@ -717,7 +717,7 @@ void CXFA_FM2JSContext::Max(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
} else if(FXJSE_Value_IsArray(argValue)) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argValue, FX_BSTRC("length"), lengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(lengthValue);
+ int32_t iLength = FXJSE_Value_ToInteger(lengthValue);
FXJSE_Value_Release(lengthValue);
if(iLength > 2) {
FXJSE_HVALUE propertyValue = FXJSE_Value_Create(hruntime);
@@ -726,7 +726,7 @@ void CXFA_FM2JSContext::Max(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
FXJSE_Value_GetObjectPropByIdx(argValue, 1, propertyValue);
FXJSE_Value_GetObjectPropByIdx(argValue, 2, jsObjectValue);
if(FXJSE_Value_IsNull(propertyValue)) {
- for(FX_INT32 i = 2; i < iLength; i++) {
+ for(int32_t i = 2; i < iLength; i++) {
FXJSE_Value_GetObjectPropByIdx(argValue, i, jsObjectValue);
GetObjectDefaultValue(jsObjectValue, newPropertyValue);
if(!FXJSE_Value_IsNull(newPropertyValue)) {
@@ -744,7 +744,7 @@ void CXFA_FM2JSContext::Max(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
} else {
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
- for(FX_INT32 i = 2; i < iLength; i++) {
+ for(int32_t i = 2; i < iLength; i++) {
FXJSE_Value_GetObjectPropByIdx(argValue, i, jsObjectValue);
FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr, newPropertyValue);
if(!FXJSE_Value_IsNull(newPropertyValue)) {
@@ -805,11 +805,11 @@ void CXFA_FM2JSContext::Min(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 argc = args.GetLength();
- FX_UINT32 uCount = 0;
+ int32_t argc = args.GetLength();
+ uint32_t uCount = 0;
FX_DOUBLE dMinValue = 0.0;
FXJSE_HVALUE argValue = 0;
- for(FX_INT32 i = 0; i < argc; i++) {
+ for(int32_t i = 0; i < argc; i++) {
argValue = args.GetValue(i);
if(FXJSE_Value_IsNull(argValue)) {
FXJSE_Value_Release(argValue);
@@ -817,7 +817,7 @@ void CXFA_FM2JSContext::Min(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
} else if(FXJSE_Value_IsArray(argValue)) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argValue, FX_BSTRC("length"), lengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(lengthValue);
+ int32_t iLength = FXJSE_Value_ToInteger(lengthValue);
FXJSE_Value_Release(lengthValue);
if(iLength > 2) {
FXJSE_HVALUE propertyValue = FXJSE_Value_Create(hruntime);
@@ -826,7 +826,7 @@ void CXFA_FM2JSContext::Min(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
FXJSE_Value_GetObjectPropByIdx(argValue, 1, propertyValue);
FXJSE_Value_GetObjectPropByIdx(argValue, 2, jsObjectValue);
if(FXJSE_Value_IsNull(propertyValue)) {
- for(FX_INT32 i = 2; i < iLength; i++) {
+ for(int32_t i = 2; i < iLength; i++) {
FXJSE_Value_GetObjectPropByIdx(argValue, i, jsObjectValue);
GetObjectDefaultValue(jsObjectValue, newPropertyValue);
if(!FXJSE_Value_IsNull(newPropertyValue)) {
@@ -844,7 +844,7 @@ void CXFA_FM2JSContext::Min(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
} else {
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
- for(FX_INT32 i = 2; i < iLength; i++) {
+ for(int32_t i = 2; i < iLength; i++) {
FXJSE_Value_GetObjectPropByIdx(argValue, i, jsObjectValue);
FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr, newPropertyValue);
if(!FXJSE_Value_IsNull(newPropertyValue)) {
@@ -916,7 +916,7 @@ void CXFA_FM2JSContext::Mod(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
if(FXJSE_Value_IsArray(argOne)) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argOne, FX_BSTRC("length"), lengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(lengthValue);
+ int32_t iLength = FXJSE_Value_ToInteger(lengthValue);
FXJSE_Value_Release(lengthValue);
if(iLength > 2) {
FXJSE_HVALUE propertyValue = FXJSE_Value_Create(hruntime);
@@ -944,7 +944,7 @@ void CXFA_FM2JSContext::Mod(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
if(FXJSE_Value_IsArray(argTwo)) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argTwo, FX_BSTRC("length"), lengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(lengthValue);
+ int32_t iLength = FXJSE_Value_ToInteger(lengthValue);
FXJSE_Value_Release(lengthValue);
if(iLength > 2) {
FXJSE_HVALUE propertyValue = FXJSE_Value_Create(hruntime);
@@ -970,7 +970,7 @@ void CXFA_FM2JSContext::Mod(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
dDividor = HValueToDouble(hThis, argTwo);
}
if(dDividor) {
- FXJSE_Value_SetDouble(args.GetReturnValue(), dDividend - dDividor * (FX_INT32)(dDividend / dDividor));
+ FXJSE_Value_SetDouble(args.GetReturnValue(), dDividend - dDividor * (int32_t)(dDividend / dDividor));
} else {
pContext->ThrowScriptErrorMessage(XFA_IDS_DIVIDE_ZERO);
}
@@ -985,8 +985,8 @@ void CXFA_FM2JSContext::Round(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 argc = args.GetLength();
- FX_UINT8 uPrecision = 0;
+ int32_t argc = args.GetLength();
+ uint8_t uPrecision = 0;
if(argc == 1) {
FXJSE_HVALUE argOne = args.GetValue(0);
if(FXJSE_Value_IsNull(argOne)) {
@@ -1071,7 +1071,7 @@ void CXFA_FM2JSContext::Round(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
} else if(dPrecision > 12.0) {
uPrecision = 12;
} else {
- uPrecision = (FX_UINT8)dPrecision;
+ uPrecision = (uint8_t)dPrecision;
}
CFX_Decimal decimalValue((FX_FLOAT)dValue, uPrecision);
CFX_WideString wsValue = decimalValue;
@@ -1087,12 +1087,12 @@ void CXFA_FM2JSContext::Sum(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 argc = args.GetLength();
- FX_UINT32 uCount = 0;
+ int32_t argc = args.GetLength();
+ uint32_t uCount = 0;
FX_DOUBLE dSum = 0.0;
if(argc) {
FXJSE_HVALUE argValue = 0;
- for(FX_INT32 i = 0; i < argc; i++) {
+ for(int32_t i = 0; i < argc; i++) {
argValue = args.GetValue(i);
if(FXJSE_Value_IsNull(argValue)) {
FXJSE_Value_Release(argValue);
@@ -1100,7 +1100,7 @@ void CXFA_FM2JSContext::Sum(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
} else if(FXJSE_Value_IsArray(argValue)) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argValue, FX_BSTRC("length"), lengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(lengthValue);
+ int32_t iLength = FXJSE_Value_ToInteger(lengthValue);
FXJSE_Value_Release(lengthValue);
if(iLength > 2) {
FXJSE_HVALUE propertyValue = FXJSE_Value_Create(hruntime);
@@ -1108,7 +1108,7 @@ void CXFA_FM2JSContext::Sum(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
FXJSE_HVALUE jsObjectValue = FXJSE_Value_Create(hruntime);
FXJSE_HVALUE newPropertyValue = FXJSE_Value_Create(hruntime);
if(FXJSE_Value_IsNull(propertyValue)) {
- for(FX_INT32 j = 2; j < iLength; j++) {
+ for(int32_t j = 2; j < iLength; j++) {
FXJSE_Value_GetObjectPropByIdx(argValue, j, jsObjectValue);
GetObjectDefaultValue(jsObjectValue, newPropertyValue);
if (!FXJSE_Value_IsNull(newPropertyValue)) {
@@ -1119,7 +1119,7 @@ void CXFA_FM2JSContext::Sum(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
} else {
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
- for(FX_INT32 j = 2; j < iLength; j++) {
+ for(int32_t j = 2; j < iLength; j++) {
FXJSE_Value_GetObjectPropByIdx(argValue, j, jsObjectValue);
FXJSE_Value_GetObjectProp(jsObjectValue, propertyStr, newPropertyValue);
if (!FXJSE_Value_IsNull(newPropertyValue)) {
@@ -1170,7 +1170,7 @@ void CXFA_FM2JSContext::Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
bufferMon.Format("%02d", pTmStruct->tm_mon + 1);
bufferDay.Format("%02d", pTmStruct->tm_mday);
CFX_ByteString bufferCurrent = bufferYear + bufferMon + bufferDay;
- FX_INT32 dDays = DateString2Num(bufferCurrent);
+ int32_t dDays = DateString2Num(bufferCurrent);
FXJSE_Value_SetInteger(args.GetReturnValue(), dDays);
} else {
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
@@ -1179,7 +1179,7 @@ void CXFA_FM2JSContext::Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
}
void CXFA_FM2JSContext::Date2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 4)) {
FX_BOOL bFlags = FALSE;
CFX_ByteString dateString;
@@ -1234,10 +1234,10 @@ void CXFA_FM2JSContext::Date2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
}
void CXFA_FM2JSContext::DateFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if (argc < 3) {
FX_BOOL bFlags = FALSE;
- FX_INT32 iStyle = 0;
+ int32_t iStyle = 0;
CFX_ByteString szLocal;
FXJSE_HVALUE argStyle = 0;
FXJSE_HVALUE argLocal = 0;
@@ -1246,7 +1246,7 @@ void CXFA_FM2JSContext::DateFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_
if (FXJSE_Value_IsNull(argStyle)) {
bFlags = TRUE;
}
- iStyle = (FX_INT32)HValueToFloat(hThis, argStyle);
+ iStyle = (int32_t)HValueToFloat(hThis, argStyle);
if (iStyle > 4 || iStyle < 0) {
iStyle = 0;
}
@@ -1289,8 +1289,8 @@ void CXFA_FM2JSContext::IsoDate2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFX
} else {
CFX_ByteString szArgString;
HValueToUTF8String(argOne, szArgString);
- FX_INT32 dDays = DateString2Num(szArgString);
- FXJSE_Value_SetInteger(args.GetReturnValue(), (FX_INT32)dDays);
+ int32_t dDays = DateString2Num(szArgString);
+ FXJSE_Value_SetInteger(args.GetReturnValue(), (int32_t)dDays);
}
FXJSE_Value_Release(argOne);
} else {
@@ -1320,15 +1320,15 @@ void CXFA_FM2JSContext::IsoTime2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFX
CXFA_LocaleValue timeValue(XFA_VT_TIME, CFX_WideString::FromUTF8(szArgString, szArgString.GetLength()), (CXFA_LocaleMgr*)pMgr);
if (timeValue.IsValid()) {
CFX_Unitime uniTime = timeValue.GetTime();
- FX_INT32 hour = uniTime.GetHour();
- FX_INT32 min = uniTime.GetMinute();
- FX_INT32 second = uniTime.GetSecond();
- FX_INT32 milSecond = uniTime.GetMillisecond();
+ int32_t hour = uniTime.GetHour();
+ int32_t min = uniTime.GetMinute();
+ int32_t second = uniTime.GetSecond();
+ int32_t milSecond = uniTime.GetMillisecond();
IFX_Locale* pDefLocale = pMgr->GetDefLocale();
FXSYS_assert(pDefLocale);
FX_TIMEZONE tzLocale;
pDefLocale->GetTimeZone(tzLocale);
- FX_INT32 mins = hour * 60 + min;
+ int32_t mins = hour * 60 + min;
mins -= (tzLocale.tzHour * 60);
while (mins > 1440) {
mins -= 1440;
@@ -1338,7 +1338,7 @@ void CXFA_FM2JSContext::IsoTime2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFX
}
hour = mins / 60;
min = mins % 60;
- FX_INT32 iResult = hour * 3600000 + min * 60000 + second * 1000 + milSecond + 1;
+ int32_t iResult = hour * 3600000 + min * 60000 + second * 1000 + milSecond + 1;
FXJSE_Value_SetInteger(args.GetReturnValue(), iResult);
} else {
FXJSE_Value_SetInteger(args.GetReturnValue(), 0);
@@ -1351,10 +1351,10 @@ void CXFA_FM2JSContext::IsoTime2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFX
}
void CXFA_FM2JSContext::LocalDateFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if (argc < 3) {
FX_BOOL bFlags = FALSE;
- FX_INT32 iStyle = 0;
+ int32_t iStyle = 0;
CFX_ByteString szLocal;
FXJSE_HVALUE argStyle = 0;
FXJSE_HVALUE argLocal = 0;
@@ -1363,7 +1363,7 @@ void CXFA_FM2JSContext::LocalDateFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
if (FXJSE_Value_IsNull(argStyle)) {
bFlags = TRUE;
}
- iStyle = (FX_INT32)HValueToFloat(hThis, argStyle);
+ iStyle = (int32_t)HValueToFloat(hThis, argStyle);
if (iStyle > 4 || iStyle < 0) {
iStyle = 0;
}
@@ -1399,10 +1399,10 @@ void CXFA_FM2JSContext::LocalDateFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
}
void CXFA_FM2JSContext::LocalTimeFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if (argc < 3) {
FX_BOOL bFlags = FALSE;
- FX_INT32 iStyle = 0;
+ int32_t iStyle = 0;
CFX_ByteString szLocal;
FXJSE_HVALUE argStyle = 0;
FXJSE_HVALUE argLocal = 0;
@@ -1411,7 +1411,7 @@ void CXFA_FM2JSContext::LocalTimeFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
if (FXJSE_Value_IsNull(argStyle)) {
bFlags = TRUE;
}
- iStyle = (FX_INT32)HValueToFloat(hThis, argStyle);
+ iStyle = (int32_t)HValueToFloat(hThis, argStyle);
if (iStyle > 4 || iStyle < 0) {
iStyle = 0;
}
@@ -1447,10 +1447,10 @@ void CXFA_FM2JSContext::LocalTimeFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
}
void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 4)) {
FX_BOOL bFlags = FALSE;
- FX_INT32 dDate;
+ int32_t dDate;
CFX_ByteString formatString;
CFX_ByteString localString;
FXJSE_HVALUE dateValue = GetSimpleHValue(hThis, args, 0);
@@ -1459,7 +1459,7 @@ void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
if(HValueIsNull(hThis, dateValue)) {
bFlags = TRUE;
} else {
- dDate = (FX_INT32)HValueToFloat(hThis, dateValue);
+ dDate = (int32_t)HValueToFloat(hThis, dateValue);
bFlags = dDate < 1;
}
if(argc > 1) {
@@ -1479,10 +1479,10 @@ void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
}
}
if (!bFlags) {
- FX_INT32 iYear = 1900;
- FX_INT32 iMonth = 1;
- FX_INT32 iDay = 1;
- FX_INT32 i = 0;
+ int32_t iYear = 1900;
+ int32_t iMonth = 1;
+ int32_t iDay = 1;
+ int32_t i = 0;
while (dDate > 0) {
if (iMonth == 2) {
if ((!((iYear + i) % 4) && ((iYear + i) % 100)) || !((iYear + i) % 400)) {
@@ -1495,7 +1495,7 @@ void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
iDay = 1;
dDate -= 29;
} else {
- iDay += static_cast<FX_INT32>(dDate) - 1;
+ iDay += static_cast<int32_t>(dDate) - 1;
dDate = 0;
}
} else {
@@ -1508,7 +1508,7 @@ void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
iDay = 1;
dDate -= 28;
} else {
- iDay += static_cast<FX_INT32>(dDate) - 1;
+ iDay += static_cast<int32_t>(dDate) - 1;
dDate = 0;
}
}
@@ -1523,7 +1523,7 @@ void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
iDay = 1;
dDate -= 30;
} else {
- iDay += static_cast<FX_INT32>(dDate) - 1;
+ iDay += static_cast<int32_t>(dDate) - 1;
dDate = 0;
}
} else {
@@ -1536,7 +1536,7 @@ void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
iDay = 1;
dDate -= 31;
} else {
- iDay += static_cast<FX_INT32>(dDate) - 1;
+ iDay += static_cast<int32_t>(dDate) - 1;
dDate = 0;
}
}
@@ -1551,7 +1551,7 @@ void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
iDay = 1;
dDate -= 30;
} else {
- iDay += static_cast<FX_INT32>(dDate) - 1;
+ iDay += static_cast<int32_t>(dDate) - 1;
dDate = 0;
}
} else {
@@ -1564,7 +1564,7 @@ void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
iDay = 1;
dDate -= 31;
} else {
- iDay += static_cast<FX_INT32>(dDate) - 1;
+ iDay += static_cast<int32_t>(dDate) - 1;
dDate = 0;
}
}
@@ -1595,10 +1595,10 @@ void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
}
void CXFA_FM2JSContext::Num2GMTime(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 4)) {
FX_BOOL bFlags = FALSE;
- FX_INT32 iTime;
+ int32_t iTime;
CFX_ByteString formatString;
CFX_ByteString localString;
FXJSE_HVALUE timeValue = GetSimpleHValue(hThis, args, 0);
@@ -1607,7 +1607,7 @@ void CXFA_FM2JSContext::Num2GMTime(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJ
if(FXJSE_Value_IsNull(timeValue)) {
bFlags = TRUE;
} else {
- iTime = (FX_INT32)HValueToFloat(hThis, timeValue);
+ iTime = (int32_t)HValueToFloat(hThis, timeValue);
if (FXSYS_abs(iTime) < 1.0) {
bFlags = TRUE;
}
@@ -1652,7 +1652,7 @@ void CXFA_FM2JSContext::Num2GMTime(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJ
}
void CXFA_FM2JSContext::Num2Time(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 4)) {
FX_BOOL bFlags = FALSE;
FX_FLOAT fTime;
@@ -1687,7 +1687,7 @@ void CXFA_FM2JSContext::Num2Time(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
}
if (!bFlags) {
CFX_ByteString szLocalTimeString;
- Num2AllTime(hThis, (FX_INT32)fTime, formatString, localString, FALSE, szLocalTimeString);
+ Num2AllTime(hThis, (int32_t)fTime, formatString, localString, FALSE, szLocalTimeString);
if (szLocalTimeString.IsEmpty()) {
szLocalTimeString = FX_BSTRC("");
}
@@ -1713,9 +1713,9 @@ void CXFA_FM2JSContext::Time(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
time_t now;
time(&now);
struct tm *pGmt = gmtime(&now);
- FX_INT32 iGMHour = pGmt->tm_hour;
- FX_INT32 iGMMin = pGmt->tm_min;
- FX_INT32 iGMSec = pGmt->tm_sec;
+ int32_t iGMHour = pGmt->tm_hour;
+ int32_t iGMMin = pGmt->tm_min;
+ int32_t iGMSec = pGmt->tm_sec;
FXJSE_Value_SetInteger(args.GetReturnValue(), ((iGMHour * 3600 + iGMMin * 60 + iGMSec) * 1000));
} else {
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
@@ -1724,7 +1724,7 @@ void CXFA_FM2JSContext::Time(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
}
void CXFA_FM2JSContext::Time2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 4)) {
FX_BOOL bFlags = FALSE;
CFX_ByteString timeString;
@@ -1779,11 +1779,11 @@ void CXFA_FM2JSContext::Time2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
wsFormat, pLocale, (CXFA_LocaleMgr*)pMgr);
if (timeValue.IsValid()) {
CFX_Unitime uniTime = timeValue.GetTime();
- FX_INT32 hour = uniTime.GetHour();
- FX_INT32 min = uniTime.GetMinute();
- FX_INT32 second = uniTime.GetSecond();
- FX_INT32 milSecond = uniTime.GetMillisecond();
- FX_INT32 mins = hour * 60 + min;
+ int32_t hour = uniTime.GetHour();
+ int32_t min = uniTime.GetMinute();
+ int32_t second = uniTime.GetSecond();
+ int32_t milSecond = uniTime.GetMillisecond();
+ int32_t mins = hour * 60 + min;
IXFA_TimeZoneProvider* pProvider = IXFA_TimeZoneProvider::Get();
if (pProvider != NULL) {
FX_TIMEZONE tz;
@@ -1798,7 +1798,7 @@ void CXFA_FM2JSContext::Time2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
hour = mins / 60;
min = mins % 60;
}
- FX_INT32 iResult = hour * 3600000 + min * 60000 + second * 1000 + milSecond + 1;
+ int32_t iResult = hour * 3600000 + min * 60000 + second * 1000 + milSecond + 1;
FXJSE_Value_SetInteger(args.GetReturnValue(), iResult);
} else {
FXJSE_Value_SetInteger(args.GetReturnValue(), 0);
@@ -1820,10 +1820,10 @@ void CXFA_FM2JSContext::Time2Num(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
}
void CXFA_FM2JSContext::TimeFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if (argc < 3) {
FX_BOOL bFlags = FALSE;
- FX_INT32 iStyle = 0;
+ int32_t iStyle = 0;
CFX_ByteString szLocal;
FXJSE_HVALUE argStyle = 0;
FXJSE_HVALUE argLocal = 0;
@@ -1832,7 +1832,7 @@ void CXFA_FM2JSContext::TimeFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_
if (FXJSE_Value_IsNull(argStyle)) {
bFlags = TRUE;
}
- iStyle = (FX_INT32)HValueToFloat(hThis, argStyle);
+ iStyle = (int32_t)HValueToFloat(hThis, argStyle);
if (iStyle > 4 || iStyle < 0) {
iStyle = 0;
}
@@ -1866,7 +1866,7 @@ void CXFA_FM2JSContext::TimeFmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"TimeFmt");
}
}
-FX_BOOL CXFA_FM2JSContext::IsIsoDateFormat(FX_LPCSTR pData, FX_INT32 iLength, FX_INT32 &iStyle, FX_INT32 &iYear, FX_INT32 &iMonth, FX_INT32 &iDay)
+FX_BOOL CXFA_FM2JSContext::IsIsoDateFormat(FX_LPCSTR pData, int32_t iLength, int32_t &iStyle, int32_t &iYear, int32_t &iMonth, int32_t &iDay)
{
iYear = 0;
iMonth = 1;
@@ -1877,7 +1877,7 @@ FX_BOOL CXFA_FM2JSContext::IsIsoDateFormat(FX_LPCSTR pData, FX_INT32 iLength, FX
}
FX_CHAR strYear[5];
strYear[4] = '\0';
- for (FX_INT32 i = 0; i < 4; ++i) {
+ for (int32_t i = 0; i < 4; ++i) {
if (*(pData + i) <= '9' && *(pData + i) >= '0') {
strYear[i] = *(pData + i);
} else {
@@ -1898,7 +1898,7 @@ FX_BOOL CXFA_FM2JSContext::IsIsoDateFormat(FX_LPCSTR pData, FX_INT32 iLength, FX
}
FX_CHAR strTemp[3];
strTemp[2] = '\0';
- FX_INT32 iPosOff = 0;
+ int32_t iPosOff = 0;
if (iStyle == 0) {
iPosOff = 4;
if (iLength == 4) {
@@ -1979,7 +1979,7 @@ FX_BOOL CXFA_FM2JSContext::IsIsoDateFormat(FX_LPCSTR pData, FX_INT32 iLength, FX
iRet = TRUE;
return iRet;
}
-FX_BOOL CXFA_FM2JSContext::IsIsoTimeFormat(FX_LPCSTR pData, FX_INT32 iLength, FX_INT32 &iHour, FX_INT32 &iMinute, FX_INT32 &iSecond, FX_INT32 &iMilliSecond, FX_INT32 &iZoneHour, FX_INT32 &iZoneMinute)
+FX_BOOL CXFA_FM2JSContext::IsIsoTimeFormat(FX_LPCSTR pData, int32_t iLength, int32_t &iHour, int32_t &iMinute, int32_t &iSecond, int32_t &iMilliSecond, int32_t &iZoneHour, int32_t &iZoneMinute)
{
iHour = 0;
iMinute = 0;
@@ -1990,12 +1990,12 @@ FX_BOOL CXFA_FM2JSContext::IsIsoTimeFormat(FX_LPCSTR pData, FX_INT32 iLength, FX
if (!pData) {
return FALSE;
}
- FX_INT32 iRet = FALSE;
+ int32_t iRet = FALSE;
FX_CHAR strTemp[3];
strTemp[2] = '\0';
- FX_INT32 iIndex = 0;
- FX_INT32 iZone = 0;
- FX_INT32 i = iIndex;
+ int32_t iIndex = 0;
+ int32_t iZone = 0;
+ int32_t i = iIndex;
while (i < iLength) {
if ((*(pData + i) > '9' || *(pData + i) < '0') && *(pData + i) != ':' ) {
iZone = i;
@@ -2006,7 +2006,7 @@ FX_BOOL CXFA_FM2JSContext::IsIsoTimeFormat(FX_LPCSTR pData, FX_INT32 iLength, FX
if (i == iLength) {
iZone = iLength;
}
- FX_INT32 iPos = 0;
+ int32_t iPos = 0;
while (iIndex < iZone) {
if (iIndex >= iZone) {
break;
@@ -2070,7 +2070,7 @@ FX_BOOL CXFA_FM2JSContext::IsIsoTimeFormat(FX_LPCSTR pData, FX_INT32 iLength, FX
}
iIndex += 3;
}
- FX_INT32 iSign = 1;
+ int32_t iSign = 1;
if (*(pData + iIndex) == 'z' || *(pData + iIndex) == 'Z') {
iRet = 1;
return iRet;
@@ -2121,7 +2121,7 @@ FX_BOOL CXFA_FM2JSContext::IsIsoTimeFormat(FX_LPCSTR pData, FX_INT32 iLength, FX
iRet = TRUE;
return iRet;
}
-FX_BOOL CXFA_FM2JSContext::IsIsoDateTimeFormat(FX_LPCSTR pData, FX_INT32 iLength, FX_INT32 &iYear, FX_INT32 &iMonth, FX_INT32 &iDay, FX_INT32 &iHour, FX_INT32 &iMinute, FX_INT32 &iSecond, FX_INT32 &iMillionSecond, FX_INT32 &iZoneHour, FX_INT32 &iZoneMinute)
+FX_BOOL CXFA_FM2JSContext::IsIsoDateTimeFormat(FX_LPCSTR pData, int32_t iLength, int32_t &iYear, int32_t &iMonth, int32_t &iDay, int32_t &iHour, int32_t &iMinute, int32_t &iSecond, int32_t &iMillionSecond, int32_t &iZoneHour, int32_t &iZoneMinute)
{
iYear = 0;
iMonth = 0;
@@ -2132,8 +2132,8 @@ FX_BOOL CXFA_FM2JSContext::IsIsoDateTimeFormat(FX_LPCSTR pData, FX_INT32 iLength
if (!pData) {
return FALSE;
}
- FX_INT32 iRet = FALSE;
- FX_INT32 iIndex = 0;
+ int32_t iRet = FALSE;
+ int32_t iIndex = 0;
while (*(pData + iIndex) != 'T' && *(pData + iIndex) != 't') {
if (iIndex >= iLength) {
return iRet;
@@ -2143,7 +2143,7 @@ FX_BOOL CXFA_FM2JSContext::IsIsoDateTimeFormat(FX_LPCSTR pData, FX_INT32 iLength
if (iIndex != 8 && iIndex != 10) {
return iRet;
}
- FX_INT32 iStyle = -1;
+ int32_t iStyle = -1;
iRet = IsIsoDateFormat(pData, iIndex , iStyle, iYear, iMonth, iDay);
if (!iRet) {
return iRet;
@@ -2328,21 +2328,21 @@ FX_BOOL CXFA_FM2JSContext::GetGMTTime(FXJSE_HOBJECT hThis, FX_BSTR szTime, FX_BS
strGMTTime = FX_UTF8Encode(wsRet, wsRet.GetLength());
return TRUE;
}
-FX_INT32 CXFA_FM2JSContext::DateString2Num(FX_BSTR szDateString)
+int32_t CXFA_FM2JSContext::DateString2Num(FX_BSTR szDateString)
{
FX_BOOL bFlags = FALSE;
- FX_INT32 iLength = szDateString.GetLength();
+ int32_t iLength = szDateString.GetLength();
FX_BOOL iRet = FALSE;
- FX_INT32 iStyle = -1;
- FX_INT32 iYear = 0;
- FX_INT32 iMonth = 0;
- FX_INT32 iDay = 0;
- FX_INT32 iHour = 0;
- FX_INT32 iMinute = 0;
- FX_INT32 iSecond = 0;
- FX_INT32 iMillionSecond = 0;
- FX_INT32 iZoneHour = 0;
- FX_INT32 iZoneMinute = 0;
+ int32_t iStyle = -1;
+ int32_t iYear = 0;
+ int32_t iMonth = 0;
+ int32_t iDay = 0;
+ int32_t iHour = 0;
+ int32_t iMinute = 0;
+ int32_t iSecond = 0;
+ int32_t iMillionSecond = 0;
+ int32_t iZoneHour = 0;
+ int32_t iZoneMinute = 0;
if (iLength <= 10) {
iRet = IsIsoDateFormat(szDateString.GetCStr(), iLength, iStyle, iYear, iMonth, iDay);
} else {
@@ -2352,7 +2352,7 @@ FX_INT32 CXFA_FM2JSContext::DateString2Num(FX_BSTR szDateString)
bFlags = TRUE;
}
FX_FLOAT dDays = 0;
- FX_INT32 i = 1;
+ int32_t i = 1;
if (iYear < 1900) {
bFlags = TRUE;
}
@@ -2396,10 +2396,10 @@ FX_INT32 CXFA_FM2JSContext::DateString2Num(FX_BSTR szDateString)
} else {
dDays = 0;
}
- return (FX_INT32)dDays;
+ return (int32_t)dDays;
}
#define XFA_N 19
-static FX_BYTE g_sAltTable_Date[] = {
+static uint8_t g_sAltTable_Date[] = {
XFA_N, XFA_N, XFA_N, 3, 9, XFA_N, XFA_N, XFA_N,
XFA_N, XFA_N, XFA_N, XFA_N, 2, XFA_N, XFA_N, XFA_N,
XFA_N, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N,
@@ -2409,7 +2409,7 @@ static FX_BYTE g_sAltTable_Date[] = {
XFA_N, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N,
XFA_N, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N,
};
-static FX_BYTE g_sAltTable_Time[] = {
+static uint8_t g_sAltTable_Time[] = {
14, XFA_N, XFA_N, 3, 9, XFA_N, XFA_N, 15,
XFA_N, XFA_N, XFA_N, XFA_N, 6, XFA_N, XFA_N, XFA_N,
XFA_N, XFA_N, 7, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N,
@@ -2419,12 +2419,12 @@ static FX_BYTE g_sAltTable_Time[] = {
XFA_N, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N,
XFA_N, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N, XFA_N,
};
-static void XFA_FM_AlternateDateTimeSymbols(CFX_WideString &wsPattern, const CFX_WideString &wsAltSymbols, FX_BYTE *pAltTable)
+static void XFA_FM_AlternateDateTimeSymbols(CFX_WideString &wsPattern, const CFX_WideString &wsAltSymbols, uint8_t *pAltTable)
{
- FX_INT32 nLength = wsPattern.GetLength();
+ int32_t nLength = wsPattern.GetLength();
FX_BOOL bInConstRange = FALSE;
FX_BOOL bEscape = FALSE;
- FX_INT32 i = 0, n = 0;
+ int32_t i = 0, n = 0;
while (i < nLength) {
FX_WCHAR wc = wsPattern[i];
if (wc == L'\'') {
@@ -2439,7 +2439,7 @@ static void XFA_FM_AlternateDateTimeSymbols(CFX_WideString &wsPattern, const CFX
continue;
}
if (!bInConstRange && (n = wc - L'A') >= 0 && n <= (L'a' - L'A')) {
- FX_INT32 nAlt = (FX_INT32)pAltTable[n];
+ int32_t nAlt = (int32_t)pAltTable[n];
if (nAlt != XFA_N) {
wsPattern.SetAt(i, wsAltSymbols[nAlt]);
}
@@ -2449,7 +2449,7 @@ static void XFA_FM_AlternateDateTimeSymbols(CFX_WideString &wsPattern, const CFX
}
}
#undef XFA_N
-void CXFA_FM2JSContext::GetLocalDateFormat(FXJSE_HOBJECT hThis, FX_INT32 iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard)
+void CXFA_FM2JSContext::GetLocalDateFormat(FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard)
{
FX_LOCALEDATETIMESUBCATEGORY strStyle;
switch (iStyle) {
@@ -2499,7 +2499,7 @@ void CXFA_FM2JSContext::GetLocalDateFormat(FXJSE_HOBJECT hThis, FX_INT32 iStyle,
}
strFormat = FX_UTF8Encode(strRet, strRet.GetLength());
}
-void CXFA_FM2JSContext::GetLocalTimeFormat(FXJSE_HOBJECT hThis, FX_INT32 iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard)
+void CXFA_FM2JSContext::GetLocalTimeFormat(FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard)
{
FX_LOCALEDATETIMESUBCATEGORY strStyle;
switch (iStyle) {
@@ -2550,22 +2550,22 @@ void CXFA_FM2JSContext::GetLocalTimeFormat(FXJSE_HOBJECT hThis, FX_INT32 iStyle,
}
strFormat = FX_UTF8Encode(strRet, strRet.GetLength());
}
-void CXFA_FM2JSContext::GetStandardDateFormat(FXJSE_HOBJECT hThis, FX_INT32 iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat)
+void CXFA_FM2JSContext::GetStandardDateFormat(FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat)
{
GetLocalDateFormat(hThis, iStyle, szLocalStr, strFormat, TRUE);
}
-void CXFA_FM2JSContext::GetStandardTimeFormat(FXJSE_HOBJECT hThis, FX_INT32 iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat)
+void CXFA_FM2JSContext::GetStandardTimeFormat(FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat)
{
GetLocalTimeFormat(hThis, iStyle, szLocalStr, strFormat, TRUE);
}
-void CXFA_FM2JSContext::Num2AllTime(FXJSE_HOBJECT hThis, FX_INT32 iTime, FX_BSTR szFormat, FX_BSTR szLocale, FX_BOOL bGM, CFX_ByteString &strTime)
+void CXFA_FM2JSContext::Num2AllTime(FXJSE_HOBJECT hThis, int32_t iTime, FX_BSTR szFormat, FX_BSTR szLocale, FX_BOOL bGM, CFX_ByteString &strTime)
{
- FX_INT32 iHour = 0;
- FX_INT32 iMin = 0;
- FX_INT32 iSec = 0;
- FX_INT32 iZoneHour = 0;
- FX_INT32 iZoneMin = 0;
- FX_INT32 iZoneSec = 0;
+ int32_t iHour = 0;
+ int32_t iMin = 0;
+ int32_t iSec = 0;
+ int32_t iZoneHour = 0;
+ int32_t iZoneMin = 0;
+ int32_t iZoneSec = 0;
iHour = static_cast<int>(iTime) / 3600000;
iMin = (static_cast<int>(iTime) - iHour * 3600000) / 60000;
iSec = (static_cast<int>(iTime) - iHour * 3600000 - iMin * 60000) / 1000;
@@ -2575,7 +2575,7 @@ void CXFA_FM2JSContext::Num2AllTime(FXJSE_HOBJECT hThis, FX_INT32 iTime, FX_BSTR
iMin += iZoneMin;
iSec += iZoneSec;
}
- FX_INT32 iRet = 0;
+ int32_t iRet = 0;
CFX_ByteString strIsoTime;
strIsoTime.Format("%02d:%02d:%02d", iHour, iMin, iSec);
if (bGM) {
@@ -2588,18 +2588,18 @@ void CXFA_FM2JSContext::Num2AllTime(FXJSE_HOBJECT hThis, FX_INT32 iTime, FX_BSTR
}
return;
}
-void CXFA_FM2JSContext::GetLocalTimeZone(FX_INT32 &iHour, FX_INT32 &iMin, FX_INT32 &iSec)
+void CXFA_FM2JSContext::GetLocalTimeZone(int32_t &iHour, int32_t &iMin, int32_t &iSec)
{
time_t now;
time(&now);
struct tm *pGmt = gmtime(&now);
- FX_INT32 iGMHour = pGmt->tm_hour;
- FX_INT32 iGMMin = pGmt->tm_min;
- FX_INT32 iGMSec = pGmt->tm_sec;
+ int32_t iGMHour = pGmt->tm_hour;
+ int32_t iGMMin = pGmt->tm_min;
+ int32_t iGMSec = pGmt->tm_sec;
struct tm *pLocal = localtime(&now);
- FX_INT32 iLocalHour = pLocal->tm_hour;
- FX_INT32 iLocalMin = pLocal->tm_min;
- FX_INT32 iLocalSec = pLocal->tm_sec;
+ int32_t iLocalHour = pLocal->tm_hour;
+ int32_t iLocalMin = pLocal->tm_min;
+ int32_t iLocalSec = pLocal->tm_sec;
iHour = iLocalHour - iGMHour;
iMin = iLocalMin - iGMMin;
iSec = iLocalSec - iGMSec;
@@ -2628,7 +2628,7 @@ void CXFA_FM2JSContext::Apr(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
} else {
FX_DOUBLE r = 2 * (nPeriods * nPayment - nPrincipal) / (nPeriods * nPrincipal);
FX_DOUBLE nTemp = 1;
- for (FX_INT32 i = 0; i < nPeriods; ++i) {
+ for (int32_t i = 0; i < nPeriods; ++i) {
nTemp *= (1 + r);
}
FX_DOUBLE nRet = r * nTemp / (nTemp - 1) - nPayment / nPrincipal;
@@ -2641,7 +2641,7 @@ void CXFA_FM2JSContext::Apr(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
}
r = r - nRet / nDerivative;
nTemp = 1;
- for (FX_INT32 i = 0; i < nPeriods; ++i) {
+ for (int32_t i = 0; i < nPeriods; ++i) {
nTemp *= (1 + r);
}
nRet = r * nTemp / (nTemp - 1) - nPayment / nPrincipal;
@@ -2766,8 +2766,8 @@ void CXFA_FM2JSContext::IPmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
} else {
FX_FLOAT fResult = 0;
FX_FLOAT nRateOfMonth = nRate / 12;
- FX_INT32 iNums = (FX_INT32)((FXSYS_log10((FX_FLOAT)(nPayment / nPrincpalAmount)) - FXSYS_log10((FX_FLOAT)(nPayment / nPrincpalAmount - nRateOfMonth))) / FXSYS_log10((FX_FLOAT)(1 + nRateOfMonth)));
- FX_INT32 iEnd = (FX_INT32)(nFirstMonth + nNumberOfMonths - 1);
+ int32_t iNums = (int32_t)((FXSYS_log10((FX_FLOAT)(nPayment / nPrincpalAmount)) - FXSYS_log10((FX_FLOAT)(nPayment / nPrincpalAmount - nRateOfMonth))) / FXSYS_log10((FX_FLOAT)(1 + nRateOfMonth)));
+ int32_t iEnd = (int32_t)(nFirstMonth + nNumberOfMonths - 1);
if (iEnd > iNums) {
iEnd = iNums;
}
@@ -2777,7 +2777,7 @@ void CXFA_FM2JSContext::IPmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
fResult = 0;
}
if(!bFlags) {
- FX_INT32 i = 0;
+ int32_t i = 0;
for (i = 0; i < nFirstMonth - 1; ++i) {
nPrincpalAmount -= nPayment - nPrincpalAmount * nRateOfMonth;
}
@@ -2802,11 +2802,11 @@ void CXFA_FM2JSContext::IPmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
void CXFA_FM2JSContext::NPV(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if (argc > 2) {
FX_BOOL bFlags = FALSE;
FXJSE_HVALUE *argValues = FX_Alloc(FXJSE_HVALUE, argc);
- for (FX_INT32 i = 0; i < argc; i++) {
+ for (int32_t i = 0; i < argc; i++) {
argValues[i] = GetSimpleHValue(hThis, args, i);
if (HValueIsNull(hThis, argValues[i])) {
bFlags = TRUE;
@@ -2819,14 +2819,14 @@ void CXFA_FM2JSContext::NPV(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
} else {
FX_DOUBLE *pData = FX_Alloc(FX_DOUBLE, argc - 1);
- for (FX_INT32 i = 1; i < argc; i++) {
+ for (int32_t i = 1; i < argc; i++) {
pData[i - 1] = HValueToDouble(hThis, argValues[i]);
}
FX_DOUBLE nSum = 0;
- FX_INT32 iIndex = 0;
- for (FX_INT32 i = 0; i < argc - 1; i++) {
+ int32_t iIndex = 0;
+ for (int32_t i = 0; i < argc - 1; i++) {
FX_DOUBLE nTemp = 1;
- for (FX_INT32 j = 0; j <= i; j++) {
+ for (int32_t j = 0; j <= i; j++) {
nTemp *= 1 + nRate;
}
FX_DOUBLE nNum = *(pData + iIndex++);
@@ -2839,7 +2839,7 @@ void CXFA_FM2JSContext::NPV(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
} else {
FXJSE_Value_SetNull(args.GetReturnValue());
}
- for (FX_INT32 i = 0; i < argc; i++) {
+ for (int32_t i = 0; i < argc; i++) {
FXJSE_Value_Release(argValues[i]);
}
FX_Free(argValues);
@@ -2872,7 +2872,7 @@ void CXFA_FM2JSContext::Pmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
FX_FLOAT nSum = 0;
FX_FLOAT nTmp = 1 + nRate;
nSum = nTmp;
- for (FX_INT32 i = 0; i < nPeriods - 1; ++i) {
+ for (int32_t i = 0; i < nPeriods - 1; ++i) {
nSum *= nTmp;
}
FXJSE_Value_SetFloat(args.GetReturnValue(), (nPrincipal * nRate * nSum) / (nSum - 1));
@@ -2914,10 +2914,10 @@ void CXFA_FM2JSContext::PPmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
if(bFlags) {
pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
} else {
- FX_INT32 iEnd = (FX_INT32)(nFirstMonth + nNumberOfMonths - 1);
+ int32_t iEnd = (int32_t)(nFirstMonth + nNumberOfMonths - 1);
FX_FLOAT nSum = 0;
FX_FLOAT nRateOfMonth = nRate / 12;
- FX_INT32 iNums = (FX_INT32)((FXSYS_log10((FX_FLOAT)(nPayment / nPrincpalAmount)) - FXSYS_log10((FX_FLOAT)(nPayment / nPrincpalAmount - nRateOfMonth))) / FXSYS_log10((FX_FLOAT)(1 + nRateOfMonth)));
+ int32_t iNums = (int32_t)((FXSYS_log10((FX_FLOAT)(nPayment / nPrincpalAmount)) - FXSYS_log10((FX_FLOAT)(nPayment / nPrincpalAmount - nRateOfMonth))) / FXSYS_log10((FX_FLOAT)(1 + nRateOfMonth)));
if (iEnd > iNums) {
iEnd = iNums;
}
@@ -2925,7 +2925,7 @@ void CXFA_FM2JSContext::PPmt(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
bFlags = TRUE;
}
if(!bFlags) {
- FX_INT32 i = 0;
+ int32_t i = 0;
for (i = 0; i < nFirstMonth - 1; ++i) {
nPrincpalAmount -= nPayment - nPrincpalAmount * nRateOfMonth;
}
@@ -2973,7 +2973,7 @@ void CXFA_FM2JSContext::PV(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argum
pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
} else {
FX_DOUBLE nTemp = 1;
- for (FX_INT32 i = 0; i < nPeriod; ++i) {
+ for (int32_t i = 0; i < nPeriod; ++i) {
nTemp *= 1 + nRate;
}
nTemp = 1 / nTemp;
@@ -3055,14 +3055,14 @@ void CXFA_FM2JSContext::Choose(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if (argc > 1) {
FXJSE_HVALUE argOne = args.GetValue(0);
FX_BOOL argOneIsNull = FALSE;
- FX_INT32 iIndex = 0;
+ int32_t iIndex = 0;
argOneIsNull = HValueIsNull(hThis, argOne);
if (!argOneIsNull) {
- iIndex = (FX_INT32)HValueToFloat(hThis, argOne);
+ iIndex = (int32_t)HValueToFloat(hThis, argOne);
}
FXJSE_Value_Release(argOne);
if (argOneIsNull) {
@@ -3072,14 +3072,14 @@ void CXFA_FM2JSContext::Choose(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
} else {
FX_BOOL bFound = FALSE;
FX_BOOL bStopCounterFlags = FALSE;
- FX_INT32 iArgIndex = 1;
- FX_INT32 iValueIndex = 0;
+ int32_t iArgIndex = 1;
+ int32_t iValueIndex = 0;
while(!bFound && !bStopCounterFlags && (iArgIndex < argc)) {
FXJSE_HVALUE argIndexValue = args.GetValue(iArgIndex);
if (FXJSE_Value_IsArray(argIndexValue)) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argIndexValue, FX_BSTRC("length"), lengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(lengthValue);
+ int32_t iLength = FXJSE_Value_ToInteger(lengthValue);
FXJSE_Value_Release(lengthValue);
if (iLength > 3) {
bStopCounterFlags = TRUE;
@@ -3160,14 +3160,14 @@ void CXFA_FM2JSContext::HasValue(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
}
void CXFA_FM2JSContext::Oneof(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if(argc > 1) {
FX_BOOL bFlags = FALSE;
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
FXJSE_HVALUE *parametersValue = 0;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
unfoldArgs(hThis, args, parametersValue, iCount, 1);
- for(FX_INT32 i = 0; i < iCount; i++) {
+ for(int32_t i = 0; i < iCount; i++) {
if(simpleValueCompare(hThis, argOne, parametersValue[i])) {
bFlags = TRUE;
break;
@@ -3175,7 +3175,7 @@ void CXFA_FM2JSContext::Oneof(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
}
FXJSE_Value_SetInteger(args.GetReturnValue(), bFlags);
FXJSE_Value_Release(argOne);
- for (FX_INT32 i = 0; i < iCount; i++) {
+ for (int32_t i = 0; i < iCount; i++) {
FXJSE_Value_Release(parametersValue[i]);
}
FX_Free(parametersValue);
@@ -3187,7 +3187,7 @@ void CXFA_FM2JSContext::Oneof(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
}
void CXFA_FM2JSContext::Within(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if(argc == 3) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
if(FXJSE_Value_IsNull(argOne)) {
@@ -3220,7 +3220,7 @@ void CXFA_FM2JSContext::Within(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
}
void CXFA_FM2JSContext::If(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if (args.GetLength() == 3) {
FXJSE_HVALUE argCondition = GetSimpleHValue(hThis, args, 0);
FXJSE_HVALUE argFirstValue = GetSimpleHValue(hThis, args, 1);
@@ -3271,20 +3271,20 @@ void CXFA_FM2JSContext::Ref(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
FXJSE_HVALUE argOne = args.GetValue(0);
if (FXJSE_Value_IsNull(argOne)) {
FXJSE_HVALUE rgValues[3];
- for (FX_INT32 i = 0; i < 3; i++) {
+ for (int32_t i = 0; i < 3; i++) {
rgValues[i] = FXJSE_Value_Create(hruntime);
}
FXJSE_Value_SetInteger(rgValues[0], 4);
FXJSE_Value_SetNull(rgValues[1]);
FXJSE_Value_SetNull(rgValues[2]);
FXJSE_Value_SetArray(args.GetReturnValue(), 3, rgValues);
- for (FX_INT32 i = 0; i < 3; i++) {
+ for (int32_t i = 0; i < 3; i++) {
FXJSE_Value_Release(rgValues[i]);
}
} else if (FXJSE_Value_IsArray(argOne)) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argOne, FX_BSTRC("length"), lengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(lengthValue);
+ int32_t iLength = FXJSE_Value_ToInteger(lengthValue);
FXJSE_Value_Release(lengthValue);
FXSYS_assert(iLength >= 3);
FXJSE_HVALUE propertyValue = FXJSE_Value_Create(hruntime);
@@ -3295,14 +3295,14 @@ void CXFA_FM2JSContext::Ref(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
} else if(FXJSE_Value_IsNull(propertyValue) && (!FXJSE_Value_IsNull(jsObjectValue))) {
FXJSE_HVALUE rgValues[3];
- for (FX_INT32 i = 0; i < 3; i++) {
+ for (int32_t i = 0; i < 3; i++) {
rgValues[i] = FXJSE_Value_Create(hruntime);
}
FXJSE_Value_SetInteger(rgValues[0], 3);
FXJSE_Value_SetNull(rgValues[1]);
FXJSE_Value_Set(rgValues[2], jsObjectValue);
FXJSE_Value_SetArray(args.GetReturnValue(), 3, rgValues);
- for (FX_INT32 i = 0; i < 3; i++) {
+ for (int32_t i = 0; i < 3; i++) {
FXJSE_Value_Release(rgValues[i]);
}
} else {
@@ -3312,14 +3312,14 @@ void CXFA_FM2JSContext::Ref(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
FXJSE_Value_Release(propertyValue);
} else if(FXJSE_Value_IsObject(argOne)) {
FXJSE_HVALUE rgValues[3];
- for (FX_INT32 i = 0; i < 3; i++) {
+ for (int32_t i = 0; i < 3; i++) {
rgValues[i] = FXJSE_Value_Create(hruntime);
}
FXJSE_Value_SetInteger(rgValues[0], 3);
FXJSE_Value_SetNull(rgValues[1]);
FXJSE_Value_Set(rgValues[2], argOne);
FXJSE_Value_SetArray(args.GetReturnValue(), 3, rgValues);
- for (FX_INT32 i = 0; i < 3; i++) {
+ for (int32_t i = 0; i < 3; i++) {
FXJSE_Value_Release(rgValues[i]);
}
} else if(FXJSE_Value_IsBoolean(argOne) || FXJSE_Value_IsUTF8String(argOne) || FXJSE_Value_IsNumber(argOne)) {
@@ -3360,8 +3360,8 @@ void CXFA_FM2JSContext::UnitType(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
unitspanString.MakeLower();
CFX_WideString wsTypeString = CFX_WideString::FromUTF8(unitspanString, unitspanString.GetLength());
FX_LPCWSTR pData = wsTypeString;
- FX_INT32 u = 0;
- FX_INT32 uLen = wsTypeString.GetLength();
+ int32_t u = 0;
+ int32_t uLen = wsTypeString.GetLength();
while (*(pData + u) == 0x20 || *(pData + u) == 0x09 || *(pData + u) == 0x0B || *(pData + u) == 0x0C || *(pData + u) == 0x0A || *(pData + u) == 0x0D) {
u++;
}
@@ -3435,7 +3435,7 @@ void CXFA_FM2JSContext::UnitType(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE
}
void CXFA_FM2JSContext::UnitValue(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if ((argc == 1) || (argc == 2)) {
FXJSE_HVALUE unitspanValue = GetSimpleHValue(hThis, args, 0);
FXJSE_HVALUE unitValue = 0;
@@ -3449,12 +3449,12 @@ void CXFA_FM2JSContext::UnitValue(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJS
HValueToUTF8String(unitspanValue, unitspanString);
FX_LPCSTR pData = unitspanString;
if (pData) {
- FX_INT32 u = 0;
+ int32_t u = 0;
while (*(pData + u) == 0x20 || *(pData + u) == 0x09 || *(pData + u) == 0x0B || *(pData + u) == 0x0C || *(pData + u) == 0x0A || *(pData + u) == 0x0D) {
FX_CHAR ch = *(pData + u);
++u;
}
- FX_INT32 uStart = u;
+ int32_t uStart = u;
while (u < unitspanString.GetLength()) {
if ((*(pData + u) > '9' || *(pData + u) < '0') && *(pData + u) != '.' && *(pData + u) != '-') {
break;
@@ -3466,7 +3466,7 @@ void CXFA_FM2JSContext::UnitValue(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJS
while (*(pData + u) == ' ' || *(pData + u) == 0x09 || *(pData + u) == 0x0B || *(pData + u) == 0x0C || *(pData + u) == 0x0A || *(pData + u) == 0x0D) {
++u;
}
- FX_INT32 uLen = unitspanString.GetLength();
+ int32_t uLen = unitspanString.GetLength();
while (u < uLen) {
if (*(pData + u) == ' ') {
break;
@@ -3480,7 +3480,7 @@ void CXFA_FM2JSContext::UnitValue(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJS
CFX_ByteString unitTempString;
HValueToUTF8String(unitValue, unitTempString);
FX_LPCSTR pData = unitTempString;
- FX_INT32 u = 0;
+ int32_t u = 0;
while (*(pData + u) == ' ' || *(pData + u) == 0x09 || *(pData + u) == 0x0B || *(pData + u) == 0x0C || *(pData + u) == 0x0A || *(pData + u) == 0x0D) {
++u;
}
@@ -3493,7 +3493,7 @@ void CXFA_FM2JSContext::UnitValue(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJS
while (*(pData + u) == ' ' || *(pData + u) == 0x09 || *(pData + u) == 0x0B || *(pData + u) == 0x0C || *(pData + u) == 0x0A || *(pData + u) == 0x0D) {
++u;
}
- FX_INT32 uLen = unitTempString.GetLength();
+ int32_t uLen = unitTempString.GetLength();
while (u < uLen) {
if (*(pData + u) == ' ') {
break;
@@ -3612,12 +3612,12 @@ void CXFA_FM2JSContext::Concat(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if (argc >= 1) {
CFX_ByteString resultString;
FX_BOOL bAllNull = TRUE;
FXJSE_HVALUE *argValues = FX_Alloc(FXJSE_HVALUE, argc);
- for (FX_INT32 i = 0; i < argc; i++) {
+ for (int32_t i = 0; i < argc; i++) {
argValues[i] = GetSimpleHValue(hThis, args, i);
if(!HValueIsNull(hThis, argValues[i])) {
CFX_ByteString valueStr;
@@ -3626,7 +3626,7 @@ void CXFA_FM2JSContext::Concat(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
bAllNull = FALSE;
}
}
- for(FX_INT32 i = 0; i < argc; i++) {
+ for(int32_t i = 0; i < argc; i++) {
FXJSE_Value_Release(argValues[i]);
}
FX_Free(argValues);
@@ -3643,7 +3643,7 @@ void CXFA_FM2JSContext::Decode(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if(argc == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
if (HValueIsNull(hThis, argOne)) {
@@ -3686,8 +3686,8 @@ void CXFA_FM2JSContext::DecodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResu
{
CFX_WideString wsURLString = CFX_WideString::FromUTF8(szURLString.GetCStr(), szURLString.GetLength());
FX_LPCWSTR pData = wsURLString;
- FX_INT32 iLen = wsURLString.GetLength();
- FX_INT32 i = 0;
+ int32_t iLen = wsURLString.GetLength();
+ int32_t i = 0;
FX_WCHAR ch = 0;
FX_WCHAR chTemp = 0;
CFX_WideTextBuf wsResultBuf;
@@ -3695,7 +3695,7 @@ void CXFA_FM2JSContext::DecodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResu
ch = *(pData + i);
if ('%' == ch) {
chTemp = 0;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
while (iCount < 2) {
++i;
ch = *(pData + i);
@@ -3738,10 +3738,10 @@ void CXFA_FM2JSContext::DecodeHTML(FX_BSTR szHTMLString, CFX_ByteTextBuf &szResu
{
CFX_WideString wsHTMLString = CFX_WideString::FromUTF8(szHTMLString.GetCStr(), szHTMLString.GetLength());
FX_WCHAR strString[9];
- FX_INT32 iStrIndex = 0;
- FX_INT32 iLen = wsHTMLString.GetLength();
- FX_INT32 i = 0;
- FX_INT32 iCode = 0;
+ int32_t iStrIndex = 0;
+ int32_t iLen = wsHTMLString.GetLength();
+ int32_t i = 0;
+ int32_t iCode = 0;
FX_WCHAR ch = 0;
FX_LPCWSTR pData = wsHTMLString;
CFX_WideTextBuf wsResultBuf;
@@ -3791,7 +3791,7 @@ void CXFA_FM2JSContext::DecodeHTML(FX_BSTR szHTMLString, CFX_ByteTextBuf &szResu
++i;
continue;
}
- FX_UINT32 iData = 0;
+ uint32_t iData = 0;
if (HTMLSTR2Code(strString, iData)) {
wsResultBuf.AppendChar((FX_WCHAR)iData);
} else {
@@ -3808,10 +3808,10 @@ void CXFA_FM2JSContext::DecodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResu
{
CFX_WideString wsXMLString = CFX_WideString::FromUTF8(szXMLString.GetCStr(), szXMLString.GetLength());
FX_WCHAR strString[9];
- FX_INT32 iStrIndex = 0;
- FX_INT32 iLen = wsXMLString.GetLength();
- FX_INT32 i = 0;
- FX_INT32 iCode = 0;
+ int32_t iStrIndex = 0;
+ int32_t iLen = wsXMLString.GetLength();
+ int32_t i = 0;
+ int32_t iCode = 0;
FX_WCHAR ch = 0;
FX_LPCWSTR pData = wsXMLString;
CFX_WideTextBuf wsXMLBuf;
@@ -3868,7 +3868,7 @@ void CXFA_FM2JSContext::DecodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResu
L"lt",
L"gt"
};
- FX_INT32 iIndex = 0;
+ int32_t iIndex = 0;
while (iIndex < 5) {
if (FXSYS_memcmp(strString, strName[iIndex], FXSYS_wcslen(strName[iIndex])) == 0) {
break;
@@ -3907,7 +3907,7 @@ void CXFA_FM2JSContext::Encode(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if(argc == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
if (HValueIsNull(hThis, argOne)) {
@@ -3951,7 +3951,7 @@ void CXFA_FM2JSContext::EncodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResu
CFX_WideString wsURLString = CFX_WideString::FromUTF8(szURLString.GetCStr(), szURLString.GetLength());
CFX_WideTextBuf wsResultBuf;
FX_WCHAR ch = 0;
- FX_INT32 iLength = wsURLString.GetLength();
+ int32_t iLength = wsURLString.GetLength();
FX_WCHAR strEncode[4];
strEncode[0] = '%';
strEncode[3] = 0;
@@ -3959,13 +3959,13 @@ void CXFA_FM2JSContext::EncodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResu
FX_WCHAR strReserved[] = {';', '/', '?', ':', '@', '=', '&'};
FX_WCHAR strSpecial[] = {'$', '-', '+', '!', '*', '\'', '(', ')', ','};
const FX_LPCWSTR strCode = L"0123456789abcdef";
- for (FX_INT32 u = 0; u < iLength; ++u) {
+ for (int32_t u = 0; u < iLength; ++u) {
ch = wsURLString.GetAt(u);
- FX_INT32 i = 0;
- FX_INT32 iCount = sizeof(strUnsafe) / sizeof(strUnsafe[0]);
+ int32_t i = 0;
+ int32_t iCount = sizeof(strUnsafe) / sizeof(strUnsafe[0]);
while (i < iCount) {
if (ch == strUnsafe[i]) {
- FX_INT32 iIndex = ch / 16;
+ int32_t iIndex = ch / 16;
strEncode[1] = strCode[iIndex];
strEncode[2] = strCode[ch - iIndex * 16];
wsResultBuf << FX_WSTRC(strEncode);
@@ -3980,7 +3980,7 @@ void CXFA_FM2JSContext::EncodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResu
iCount = sizeof(strReserved) / sizeof(strReserved[0]);
while (i < iCount) {
if (ch == strReserved[i]) {
- FX_INT32 iIndex = ch / 16;
+ int32_t iIndex = ch / 16;
strEncode[1] = strCode[iIndex];
strEncode[2] = strCode[ch - iIndex * 16];
wsResultBuf << FX_WSTRC(strEncode);
@@ -4004,19 +4004,19 @@ void CXFA_FM2JSContext::EncodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResu
continue;
}
if (ch >= 0x80 && ch <= 0xff) {
- FX_INT32 iIndex = ch / 16;
+ int32_t iIndex = ch / 16;
strEncode[1] = strCode[iIndex];
strEncode[2] = strCode[ch - iIndex * 16];
wsResultBuf << FX_WSTRC(strEncode);
} else if ((ch >= 0x0 && ch <= 0x1f) || ch == 0x7f) {
- FX_INT32 iIndex = ch / 16;
+ int32_t iIndex = ch / 16;
strEncode[1] = strCode[iIndex];
strEncode[2] = strCode[ch - iIndex * 16];
wsResultBuf << FX_WSTRC(strEncode);
} else if (ch >= 0x20 && ch <= 0x7e) {
wsResultBuf.AppendChar(ch);
} else {
- FX_INT32 iRadix = 16;
+ int32_t iRadix = 16;
CFX_WideString strTmp;
while (ch >= iRadix) {
FX_WCHAR tmp = strCode[ch % iRadix];
@@ -4024,11 +4024,11 @@ void CXFA_FM2JSContext::EncodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResu
strTmp += tmp;
}
strTmp += strCode[ch];
- FX_INT32 iLen = strTmp.GetLength();
+ int32_t iLen = strTmp.GetLength();
if (iLen < 2) {
break;
}
- FX_INT32 iIndex = 0;
+ int32_t iIndex = 0;
if (iLen % 2 != 0) {
strEncode[1] = '0';
strEncode[2] = strTmp.GetAt(iLen - 1);
@@ -4064,11 +4064,11 @@ void CXFA_FM2JSContext::EncodeHTML(FX_BSTR szHTMLString, CFX_ByteTextBuf &szResu
strEncode[7] = ';';
strEncode[8] = 0;
CFX_WideTextBuf wsResultBuf;
- FX_UINT32 ch = 0;
- FX_INT32 iLen = wsHTMLString.GetLength();
- FX_INT32 i = 0;
+ uint32_t ch = 0;
+ int32_t iLen = wsHTMLString.GetLength();
+ int32_t i = 0;
FX_LPCWSTR pData = wsHTMLString;
- FX_INT32 iIndex = 0;
+ int32_t iIndex = 0;
CFX_WideString htmlReserve;
while (i < iLen) {
ch = *(pData + i);
@@ -4088,8 +4088,8 @@ void CXFA_FM2JSContext::EncodeHTML(FX_BSTR szHTMLString, CFX_ByteTextBuf &szResu
strEncode[6] = 0;
wsResultBuf << FX_WSTRC(strEncode);
} else {
- FX_INT32 iBigByte = ch / 256;
- FX_INT32 iLittleByte = ch % 256;
+ int32_t iBigByte = ch / 256;
+ int32_t iLittleByte = ch % 256;
strEncode[3] = strCode[iBigByte / 16];
strEncode[4] = strCode[iBigByte % 16];
strEncode[5] = strCode[iLittleByte / 16];
@@ -4130,9 +4130,9 @@ void CXFA_FM2JSContext::EncodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResu
};
const FX_LPCWSTR strCode = L"0123456789abcdef";
FX_WCHAR ch = 0;
- FX_INT32 iLength = wsXMLString.GetLength();
- FX_INT32 iIndex = 0;
- FX_INT32 u = 0;
+ int32_t iLength = wsXMLString.GetLength();
+ int32_t iIndex = 0;
+ int32_t u = 0;
FX_LPCWSTR pData = wsXMLString;
for (u = 0; u < iLength; ++u) {
ch = *(pData + u);
@@ -4173,8 +4173,8 @@ void CXFA_FM2JSContext::EncodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResu
strEncode[6] = 0;
wsResultBuf << FX_WSTRC(strEncode);
} else {
- FX_INT32 iBigByte = ch / 256;
- FX_INT32 iLittleByte = ch % 256;
+ int32_t iBigByte = ch / 256;
+ int32_t iLittleByte = ch % 256;
strEncode[3] = strCode[iBigByte / 16];
strEncode[4] = strCode[iBigByte % 16];
strEncode[5] = strCode[iLittleByte / 16];
@@ -4188,13 +4188,13 @@ void CXFA_FM2JSContext::EncodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResu
wsResultBuf.AppendChar(0);
szResultBuf = FX_UTF8Encode(wsResultBuf.GetBuffer(), wsResultBuf.GetLength());
}
-FX_BOOL CXFA_FM2JSContext::HTMLSTR2Code(FX_WSTR pData, FX_UINT32 &iCode)
+FX_BOOL CXFA_FM2JSContext::HTMLSTR2Code(FX_WSTR pData, uint32_t &iCode)
{
- FX_INT32 iLength = pData.GetLength();
- FX_UINT32 uHash = FX_HashCode_String_GetW(pData.GetPtr(), iLength);
+ int32_t iLength = pData.GetLength();
+ uint32_t uHash = FX_HashCode_String_GetW(pData.GetPtr(), iLength);
XFA_FMHtmlHashedReserveCode htmlhashedreservecode;
- FX_INT32 iStart = 0, iEnd = (sizeof(reservesForDecode) / sizeof(reservesForDecode[0])) - 1;
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iStart = 0, iEnd = (sizeof(reservesForDecode) / sizeof(reservesForDecode[0])) - 1;
+ int32_t iMid = (iStart + iEnd) / 2;
do {
iMid = (iStart + iEnd) / 2;
htmlhashedreservecode = reservesForDecode[iMid];
@@ -4209,11 +4209,11 @@ FX_BOOL CXFA_FM2JSContext::HTMLSTR2Code(FX_WSTR pData, FX_UINT32 &iCode)
} while (iStart <= iEnd);
return FALSE;
}
-FX_BOOL CXFA_FM2JSContext::HTMLCode2STR(FX_UINT32 iCode, CFX_WideString &wsHTMLReserve)
+FX_BOOL CXFA_FM2JSContext::HTMLCode2STR(uint32_t iCode, CFX_WideString &wsHTMLReserve)
{
XFA_FMHtmlReserveCode htmlreservecode;
- FX_INT32 iStart = 0, iEnd = (sizeof(reservesForEncode) / sizeof(reservesForEncode[0])) - 1;
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iStart = 0, iEnd = (sizeof(reservesForEncode) / sizeof(reservesForEncode[0])) - 1;
+ int32_t iMid = (iStart + iEnd) / 2;
do {
iMid = (iStart + iEnd) / 2;
htmlreservecode = reservesForEncode[iMid];
@@ -4260,8 +4260,8 @@ static FX_BOOL XFA_PATTERN_STRING_Type(FX_BSTR szPattern, FX_DWORD& patternType)
patternType = XFA_VT_NULL;
wsPattern.MakeLower();
FX_LPCWSTR pData = wsPattern;
- FX_INT32 iLength = wsPattern.GetLength();
- FX_INT32 iIndex = 0;
+ int32_t iLength = wsPattern.GetLength();
+ int32_t iIndex = 0;
FX_BOOL bSingleQuotation = FALSE;
FX_WCHAR patternChar;
while (iIndex < iLength) {
@@ -4308,7 +4308,7 @@ static FX_BOOL XFA_PATTERN_STRING_Type(FX_BSTR szPattern, FX_DWORD& patternType)
void CXFA_FM2JSContext::Format(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if (argc >= 2) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
FXJSE_HVALUE argTwo = GetSimpleHValue(hThis, args, 1);
@@ -4406,7 +4406,7 @@ void CXFA_FM2JSContext::Left(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
} else {
CFX_ByteString sourceString;
HValueToUTF8String(argOne, sourceString);
- FX_INT32 count = HValueToInteger(hThis, argTwo);
+ int32_t count = HValueToInteger(hThis, argTwo);
if (count < 0) {
count = 0;
}
@@ -4438,7 +4438,7 @@ void CXFA_FM2JSContext::Len(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
}
void CXFA_FM2JSContext::Lower(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 3)) {
CFX_ByteString argString;
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
@@ -4453,9 +4453,9 @@ void CXFA_FM2JSContext::Lower(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
CFX_WideTextBuf lowStringBuf;
CFX_WideString wsArgString = CFX_WideString::FromUTF8(argString, argString.GetLength());
FX_LPCWSTR pData = wsArgString;
- FX_INT32 iLen = argString.GetLength();
- FX_INT32 i = 0;
- FX_INT32 ch = 0;
+ int32_t iLen = argString.GetLength();
+ int32_t i = 0;
+ int32_t ch = 0;
while (i < iLen) {
ch = *(pData + i);
if (ch >= 0x41 && ch <= 0x5A) {
@@ -4629,7 +4629,7 @@ void CXFA_FM2JSContext::Parse(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
}
void CXFA_FM2JSContext::Replace(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if ((argc == 2) || (argc == 3)) {
FX_BOOL bFlags = FALSE;
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
@@ -4648,17 +4648,17 @@ void CXFA_FM2JSContext::Replace(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_
argThree = GetSimpleHValue(hThis, args, 2);
HValueToUTF8String(argThree, threeString);
}
- FX_INT32 iSrcLen = oneString.GetLength();
- FX_INT32 iFindLen = twoString.GetLength();
+ int32_t iSrcLen = oneString.GetLength();
+ int32_t iFindLen = twoString.GetLength();
CFX_ByteTextBuf resultString;
- FX_INT32 iFindIndex = 0;
- FX_BYTE ch = 0;
- for (FX_INT32 u = 0; u < iSrcLen; ++u) {
+ int32_t iFindIndex = 0;
+ uint8_t ch = 0;
+ for (int32_t u = 0; u < iSrcLen; ++u) {
ch = oneString.GetAt(u);
if (ch == twoString.GetAt(iFindIndex)) {
- FX_INT32 iTemp = u + 1;
+ int32_t iTemp = u + 1;
++iFindIndex;
- FX_BYTE chTemp = 0;
+ uint8_t chTemp = 0;
while (iFindIndex < iFindLen) {
chTemp = oneString.GetAt(iTemp);
if (chTemp == twoString.GetAt(iFindIndex)) {
@@ -4708,7 +4708,7 @@ void CXFA_FM2JSContext::Right(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
} else {
CFX_ByteString sourceString;
HValueToUTF8String(argOne, sourceString);
- FX_INT32 count = HValueToInteger(hThis, argTwo);
+ int32_t count = HValueToInteger(hThis, argTwo);
if (count < 0) {
count = 0;
}
@@ -4748,11 +4748,11 @@ void CXFA_FM2JSContext::Space(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
if (FXJSE_Value_IsNull(argOne)) {
FXJSE_Value_SetNull(args.GetReturnValue());
} else {
- FX_INT32 count = 0;
+ int32_t count = 0;
count = HValueToInteger(hThis, argOne);
count = (count < 0) ? 0 : count;
CFX_ByteTextBuf spaceString;
- FX_INT32 index = 0;
+ int32_t index = 0;
while (index < count) {
spaceString.AppendByte(' ');
index++;
@@ -4767,12 +4767,12 @@ void CXFA_FM2JSContext::Space(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
}
void CXFA_FM2JSContext::Str(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 4)) {
FX_BOOL bFlags = FALSE;
FX_FLOAT fNumber;
- FX_INT32 iWidth = 10;
- FX_INT32 iPrecision = 0;
+ int32_t iWidth = 10;
+ int32_t iPrecision = 0;
FXJSE_HVALUE numberValue = GetSimpleHValue(hThis, args, 0);
FXJSE_HVALUE widthValue = 0;
FXJSE_HVALUE precisionValue = 0;
@@ -4783,11 +4783,11 @@ void CXFA_FM2JSContext::Str(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
}
if(argc > 1) {
widthValue = GetSimpleHValue(hThis, args, 1);
- iWidth = (FX_INT32)HValueToFloat(hThis, widthValue);
+ iWidth = (int32_t)HValueToFloat(hThis, widthValue);
}
if (argc == 3) {
precisionValue = GetSimpleHValue(hThis, args, 2);
- iPrecision = (FX_INT32)HValueToFloat(hThis, precisionValue);
+ iPrecision = (int32_t)HValueToFloat(hThis, precisionValue);
if (iPrecision < 0) {
iPrecision = 0;
}
@@ -4802,8 +4802,8 @@ void CXFA_FM2JSContext::Str(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
formatStr += "f";
numberString.Format(formatStr, fNumber);
FX_LPCSTR pData = numberString;
- FX_INT32 iLength = numberString.GetLength();
- FX_INT32 u = 0;
+ int32_t iLength = numberString.GetLength();
+ int32_t u = 0;
while (u < iLength) {
if (*(pData + u) == '.') {
break;
@@ -4812,7 +4812,7 @@ void CXFA_FM2JSContext::Str(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
}
CFX_ByteTextBuf resultBuf;
if (u > iWidth || (iPrecision + u) >= iWidth) {
- FX_INT32 i = 0;
+ int32_t i = 0;
while (i < iWidth) {
resultBuf.AppendChar('*');
++i;
@@ -4821,14 +4821,14 @@ void CXFA_FM2JSContext::Str(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
} else {
if (u == iLength) {
if (iLength > iWidth) {
- FX_INT32 i = 0;
+ int32_t i = 0;
while (i < iWidth) {
resultBuf.AppendChar('*');
++i;
}
} else {
- FX_INT32 i = 0;
- FX_INT32 iSpace = iWidth - iLength;
+ int32_t i = 0;
+ int32_t iSpace = iWidth - iLength;
while (i < iSpace) {
resultBuf.AppendChar(' ');
++i;
@@ -4836,13 +4836,13 @@ void CXFA_FM2JSContext::Str(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
resultBuf << pData;
}
} else {
- FX_INT32 iLeavingSpace = 0;
+ int32_t iLeavingSpace = 0;
if (iPrecision == 0) {
iLeavingSpace = iWidth - (u + iPrecision);
} else {
iLeavingSpace = iWidth - (u + iPrecision + 1);
}
- FX_INT32 i = 0;
+ int32_t i = 0;
while (i < iLeavingSpace) {
resultBuf.AppendChar(' ');
++i;
@@ -4890,14 +4890,14 @@ void CXFA_FM2JSContext::Str(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
}
void CXFA_FM2JSContext::Stuff(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if ((argc == 3) || (argc == 4)) {
FX_BOOL bFlags = FALSE;
CFX_ByteString sourceString;
CFX_ByteString insertString;
- FX_INT32 iLength = 0;
- FX_INT32 iStart = 0;
- FX_INT32 iDelete = 0;
+ int32_t iLength = 0;
+ int32_t iStart = 0;
+ int32_t iDelete = 0;
FXJSE_HVALUE sourceValue = GetSimpleHValue(hThis, args, 0);
FXJSE_HVALUE startValue = GetSimpleHValue(hThis, args, 1);
FXJSE_HVALUE deleteValue = GetSimpleHValue(hThis, args, 2);
@@ -4907,14 +4907,14 @@ void CXFA_FM2JSContext::Stuff(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
} else {
HValueToUTF8String(sourceValue, sourceString);
iLength = sourceString.GetLength();
- iStart = (FX_INT32)HValueToFloat(hThis, startValue);
+ iStart = (int32_t)HValueToFloat(hThis, startValue);
if (iStart < 1) {
iStart = 1;
}
if (iStart > iLength) {
iStart = iLength;
}
- iDelete = (FX_INT32)HValueToFloat(hThis, deleteValue);
+ iDelete = (int32_t)HValueToFloat(hThis, deleteValue);
if (iDelete <= 0) {
iDelete = 0;
}
@@ -4925,7 +4925,7 @@ void CXFA_FM2JSContext::Stuff(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
}
iStart -= 1;
CFX_ByteTextBuf resultString;
- FX_INT32 i = 0;
+ int32_t i = 0;
while (i < iStart) {
resultString.AppendChar(sourceString.GetAt(i));
++i;
@@ -4951,7 +4951,7 @@ void CXFA_FM2JSContext::Stuff(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
}
void CXFA_FM2JSContext::Substr(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if(argc == 3) {
FXJSE_HVALUE stringValue = GetSimpleHValue(hThis, args, 0);
FXJSE_HVALUE startValue = GetSimpleHValue(hThis, args, 1);
@@ -4960,15 +4960,15 @@ void CXFA_FM2JSContext::Substr(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
FXJSE_Value_SetNull(args.GetReturnValue());
} else {
CFX_ByteString szSourceStr;
- FX_INT32 iStart = 0;
- FX_INT32 iCount = 0;
+ int32_t iStart = 0;
+ int32_t iCount = 0;
HValueToUTF8String(stringValue, szSourceStr);
- FX_INT32 iLength = szSourceStr.GetLength();
+ int32_t iLength = szSourceStr.GetLength();
if (iLength == 0) {
FXJSE_Value_SetUTF8String(args.GetReturnValue(), FX_BSTRC(""));
} else {
- iStart = (FX_INT32)HValueToFloat(hThis, startValue);
- iCount = (FX_INT32)HValueToFloat(hThis, endValue);
+ iStart = (int32_t)HValueToFloat(hThis, startValue);
+ iCount = (int32_t)HValueToFloat(hThis, endValue);
if (iStart < 1) {
iStart = 1;
}
@@ -4992,13 +4992,13 @@ void CXFA_FM2JSContext::Substr(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_A
}
void CXFA_FM2JSContext::Uuid(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if((argc == 0) || (argc == 1)) {
- FX_INT32 iNum = 0;
+ int32_t iNum = 0;
FXJSE_HVALUE argOne = 0;
if(argc == 1) {
argOne = GetSimpleHValue(hThis, args, 0);
- iNum = (FX_INT32)HValueToFloat(hThis, argOne);
+ iNum = (int32_t)HValueToFloat(hThis, argOne);
}
FX_GUID guid;
FX_GUID_CreateV4(&guid);
@@ -5015,7 +5015,7 @@ void CXFA_FM2JSContext::Uuid(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
}
void CXFA_FM2JSContext::Upper(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 3)) {
CFX_ByteString argString;
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
@@ -5030,9 +5030,9 @@ void CXFA_FM2JSContext::Upper(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
CFX_WideTextBuf upperStringBuf;
CFX_WideString wsArgString = CFX_WideString::FromUTF8(argString, argString.GetLength());
FX_LPCWSTR pData = wsArgString;
- FX_INT32 iLen = wsArgString.GetLength();
- FX_INT32 i = 0;
- FX_INT32 ch = 0;
+ int32_t iLen = wsArgString.GetLength();
+ int32_t i = 0;
+ int32_t ch = 0;
while (i < iLen) {
ch = *(pData + i);
if (ch >= 0x61 && ch <= 0x7A) {
@@ -5059,11 +5059,11 @@ void CXFA_FM2JSContext::Upper(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Ar
}
void CXFA_FM2JSContext::WordNum(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if ((argc > 0) && (argc < 4)) {
FX_BOOL bFlags = FALSE;
FX_FLOAT fNumber;
- FX_INT32 iIdentifier = 0;
+ int32_t iIdentifier = 0;
CFX_ByteString localeString;
FXJSE_HVALUE numberValue = GetSimpleHValue(hThis, args, 0);
FXJSE_HVALUE identifierValue = 0;
@@ -5078,7 +5078,7 @@ void CXFA_FM2JSContext::WordNum(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_
if (FXJSE_Value_IsNull(identifierValue)) {
bFlags = TRUE;
} else {
- iIdentifier = (FX_INT32)HValueToFloat(hThis, identifierValue);
+ iIdentifier = (int32_t)HValueToFloat(hThis, identifierValue);
}
}
if (argc == 3) {
@@ -5121,9 +5121,9 @@ void CXFA_FM2JSContext::TrillionUS(FX_BSTR szData, CFX_ByteTextBuf &strBuf)
CFX_ByteStringC pTens[] = {"Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen"};
CFX_ByteStringC pLastTens[] = {"Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"};
CFX_ByteStringC pComm[] = {" Hundred ", " Thousand ", " Million ", " Billion ", "Trillion"};
- FX_INT32 iComm = 0;
+ int32_t iComm = 0;
FX_LPCSTR pData = szData.GetCStr();
- FX_INT32 iLength = szData.GetLength();
+ int32_t iLength = szData.GetLength();
if (iLength > 12) {
iComm = 4;
} else if (iLength > 9) {
@@ -5133,8 +5133,8 @@ void CXFA_FM2JSContext::TrillionUS(FX_BSTR szData, CFX_ByteTextBuf &strBuf)
} else if (iLength > 3) {
iComm = 1;
}
- FX_INT32 iIndex = 0;
- FX_INT32 iFirstCount = iLength % 3;
+ int32_t iIndex = 0;
+ int32_t iFirstCount = iLength % 3;
if (iFirstCount == 0) {
iFirstCount = 3;
}
@@ -5205,13 +5205,13 @@ void CXFA_FM2JSContext::TrillionUS(FX_BSTR szData, CFX_ByteTextBuf &strBuf)
iIndex += 3;
}
}
-void CXFA_FM2JSContext::WordUS(FX_BSTR szData, FX_INT32 iStyle, CFX_ByteTextBuf &strBuf)
+void CXFA_FM2JSContext::WordUS(FX_BSTR szData, int32_t iStyle, CFX_ByteTextBuf &strBuf)
{
FX_LPCSTR pData = szData.GetCStr();
- FX_INT32 iLength = szData.GetLength();
+ int32_t iLength = szData.GetLength();
switch (iStyle) {
case 0: {
- FX_INT32 iIndex = 0;
+ int32_t iIndex = 0;
while (iIndex < iLength) {
if (*(pData + iIndex) == '.') {
break;
@@ -5220,7 +5220,7 @@ void CXFA_FM2JSContext::WordUS(FX_BSTR szData, FX_INT32 iStyle, CFX_ByteTextBuf
}
iLength = iIndex;
iIndex = 0;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
while (iIndex < iLength) {
iCount = (iLength - iIndex) % 12;
if (!iCount && iLength - iIndex > 0) {
@@ -5235,7 +5235,7 @@ void CXFA_FM2JSContext::WordUS(FX_BSTR szData, FX_INT32 iStyle, CFX_ByteTextBuf
}
break;
case 1: {
- FX_INT32 iIndex = 0;
+ int32_t iIndex = 0;
while (iIndex < iLength) {
if (*(pData + iIndex) == '.') {
break;
@@ -5244,7 +5244,7 @@ void CXFA_FM2JSContext::WordUS(FX_BSTR szData, FX_INT32 iStyle, CFX_ByteTextBuf
}
iLength = iIndex;
iIndex = 0;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
while (iIndex < iLength) {
iCount = (iLength - iIndex) % 12;
if (!iCount && iLength - iIndex > 0) {
@@ -5260,16 +5260,16 @@ void CXFA_FM2JSContext::WordUS(FX_BSTR szData, FX_INT32 iStyle, CFX_ByteTextBuf
}
break;
case 2: {
- FX_INT32 iIndex = 0;
+ int32_t iIndex = 0;
while (iIndex < iLength) {
if (*(pData + iIndex) == '.') {
break;
}
++iIndex;
}
- FX_INT32 iInteger = iIndex;
+ int32_t iInteger = iIndex;
iIndex = 0;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
while (iIndex < iInteger) {
iCount = (iInteger - iIndex) % 12;
if (!iCount && iLength - iIndex > 0) {
@@ -5285,7 +5285,7 @@ void CXFA_FM2JSContext::WordUS(FX_BSTR szData, FX_INT32 iStyle, CFX_ByteTextBuf
if (iInteger < iLength) {
strBuf << FX_BSTRC(" And ");
iIndex = iInteger + 1;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
while (iIndex < iLength) {
iCount = (iLength - iIndex) % 12;
if (!iCount && iLength - iIndex > 0) {
@@ -5308,7 +5308,7 @@ void CXFA_FM2JSContext::WordUS(FX_BSTR szData, FX_INT32 iStyle, CFX_ByteTextBuf
void CXFA_FM2JSContext::Get(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if (argc == 1) {
CXFA_Document *pDoc = pContext->GetDocument();
if(!pDoc) {
@@ -5323,8 +5323,8 @@ void CXFA_FM2JSContext::Get(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
HValueToUTF8String(argOne, urlString);
IFX_FileRead* pFile = pAppProvider->DownloadURL(CFX_WideString::FromUTF8(urlString, urlString.GetLength()));
if (pFile) {
- FX_INT32 size = pFile->GetSize();
- FX_LPBYTE pData = FX_Alloc(FX_BYTE, size);
+ int32_t size = pFile->GetSize();
+ FX_LPBYTE pData = FX_Alloc(uint8_t, size);
if(pData) {
pFile->ReadBlock(pData, size);
FXJSE_Value_SetUTF8String(args.GetReturnValue(), CFX_ByteStringC(pData, size));
@@ -5340,7 +5340,7 @@ void CXFA_FM2JSContext::Get(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Argu
void CXFA_FM2JSContext::Post(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if((argc >= 2) && (argc <= 5)) {
CXFA_Document *pDoc = pContext->GetDocument();
if(!pDoc) {
@@ -5403,7 +5403,7 @@ void CXFA_FM2JSContext::Post(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arg
void CXFA_FM2JSContext::Put(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if((argc == 2) || (argc == 3)) {
CXFA_Document *pDoc = pContext->GetDocument();
if(!pDoc) {
@@ -5454,13 +5454,13 @@ void CXFA_FM2JSContext::assign_value_operator(FXJSE_HOBJECT hThis, FX_BSTR szFun
if (FXJSE_Value_IsArray(lValue)) {
FXJSE_HVALUE leftLengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(lValue, FX_BSTRC("length"), leftLengthValue);
- FX_INT32 iLeftLength = FXJSE_Value_ToInteger(leftLengthValue);
+ int32_t iLeftLength = FXJSE_Value_ToInteger(leftLengthValue);
FXJSE_Value_Release(leftLengthValue);
FXJSE_HVALUE jsObjectValue = FXJSE_Value_Create(hruntime);
FXJSE_HVALUE propertyValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectPropByIdx(lValue, 1, propertyValue);
if (FXJSE_Value_IsNull(propertyValue)) {
- for (FX_INT32 i = 2; i < iLeftLength; i++) {
+ for (int32_t i = 2; i < iLeftLength; i++) {
FXJSE_Value_GetObjectPropByIdx(lValue, i, jsObjectValue);
bSetStatus = SetObjectDefaultValue(jsObjectValue, rValue);
if (!bSetStatus) {
@@ -5471,7 +5471,7 @@ void CXFA_FM2JSContext::assign_value_operator(FXJSE_HOBJECT hThis, FX_BSTR szFun
} else {
CFX_ByteString propertyStr;
FXJSE_Value_ToUTF8String(propertyValue, propertyStr);
- for (FX_INT32 i = 2; i < iLeftLength; i++) {
+ for (int32_t i = 2; i < iLeftLength; i++) {
FXJSE_Value_GetObjectPropByIdx(lValue, i, jsObjectValue);
FXJSE_Value_SetObjectProp(jsObjectValue, propertyStr, rValue);
}
@@ -5799,7 +5799,7 @@ void CXFA_FM2JSContext::divide_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName,
}
void CXFA_FM2JSContext::positive_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 iLength = args.GetLength();
+ int32_t iLength = args.GetLength();
if (iLength == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
if (FXJSE_Value_IsNull(argOne)) {
@@ -5815,7 +5815,7 @@ void CXFA_FM2JSContext::positive_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncNam
}
void CXFA_FM2JSContext::negative_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 iLength = args.GetLength();
+ int32_t iLength = args.GetLength();
if (iLength == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
if (FXJSE_Value_IsNull(argOne)) {
@@ -5831,7 +5831,7 @@ void CXFA_FM2JSContext::negative_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncNam
}
void CXFA_FM2JSContext::logical_not_operator(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 iLength = args.GetLength();
+ int32_t iLength = args.GetLength();
if (iLength == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
if (FXJSE_Value_IsNull(argOne)) {
@@ -5850,14 +5850,14 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if((argc == 4) || (argc == 5)) {
FX_BOOL bIsStar = TRUE;
FXJSE_HVALUE argAccessor = args.GetValue(0);
CFX_ByteString bsAccessorName = args.GetUTF8String(1);
CFX_ByteString szName = args.GetUTF8String(2);
- FX_INT32 iIndexFlags = args.GetInt32(3);
- FX_INT32 iIndexValue = 0;
+ int32_t iIndexFlags = args.GetInt32(3);
+ int32_t iIndexValue = 0;
FXJSE_HVALUE argIndex = NULL;
if(argc == 5) {
bIsStar = FALSE;
@@ -5869,20 +5869,20 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
if(FXJSE_Value_IsArray(argAccessor)) {
FXJSE_HVALUE hLengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argAccessor, FX_BSTRC("length"), hLengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(hLengthValue);
+ int32_t iLength = FXJSE_Value_ToInteger(hLengthValue);
FXJSE_Value_Release(hLengthValue);
- FX_INT32 iCounter = 0;
+ int32_t iCounter = 0;
FXJSE_HVALUE **hResolveValues = FX_Alloc(FXJSE_HVALUE*, iLength - 2);
- FX_INT32 *iSizes = FX_Alloc(FX_INT32, iLength - 2);
- for (FX_INT32 i = 0; i < (iLength - 2); i++) {
+ int32_t *iSizes = FX_Alloc(int32_t, iLength - 2);
+ for (int32_t i = 0; i < (iLength - 2); i++) {
iSizes[i] = 0;
}
FXJSE_HVALUE hJSObjValue = FXJSE_Value_Create(hruntime);
FX_BOOL bAttribute = FALSE;
- for(FX_INT32 i = 2; i < iLength; i++) {
+ for(int32_t i = 2; i < iLength; i++) {
FXJSE_Value_GetObjectPropByIdx(argAccessor, i, hJSObjValue);
XFA_RESOLVENODE_RS resoveNodeRS;
- FX_INT32 iRet = ResolveObjects(hThis, hJSObjValue, szSomExp, resoveNodeRS, TRUE, szName.IsEmpty());
+ int32_t iRet = ResolveObjects(hThis, hJSObjValue, szSomExp, resoveNodeRS, TRUE, szName.IsEmpty());
if(iRet > 0) {
ParseResolveResult(hThis, resoveNodeRS, hJSObjValue, hResolveValues[i - 2], iSizes[i - 2], bAttribute);
iCounter += iSizes[i - 2];
@@ -5891,7 +5891,7 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
FXJSE_Value_Release(hJSObjValue);
if (iCounter > 0) {
FXJSE_HVALUE *rgValues = FX_Alloc(FXJSE_HVALUE, iCounter + 2);
- for(FX_INT32 i = 0; i < (iCounter + 2); i++) {
+ for(int32_t i = 0; i < (iCounter + 2); i++) {
rgValues[i] = FXJSE_Value_Create(hruntime);
}
FXJSE_Value_SetInteger(rgValues[0], 1);
@@ -5900,15 +5900,15 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
} else {
FXJSE_Value_SetNull(rgValues[1]);
}
- FX_INT32 iIndex = 2;
- for(FX_INT32 i = 0; i < iLength - 2; i++) {
- for(FX_INT32 j = 0; j < iSizes[i]; j++) {
+ int32_t iIndex = 2;
+ for(int32_t i = 0; i < iLength - 2; i++) {
+ for(int32_t j = 0; j < iSizes[i]; j++) {
FXJSE_Value_Set(rgValues[iIndex], hResolveValues[i][j]);
iIndex++;
}
}
FXJSE_Value_SetArray(args.GetReturnValue(), (iCounter + 2), rgValues);
- for(FX_INT32 i = 0; i < (iCounter + 2); i++) {
+ for(int32_t i = 0; i < (iCounter + 2); i++) {
FXJSE_Value_Release(rgValues[i]);
}
FX_Free(rgValues);
@@ -5917,8 +5917,8 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
CFX_WideString wsSomExpression = CFX_WideString::FromUTF8(szSomExp, szSomExp.GetLength());
pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT, (FX_LPCWSTR)wsPropertyName, (FX_LPCWSTR)wsSomExpression);
}
- for(FX_INT32 i = 0; i < iLength - 2; i++) {
- for(FX_INT32 j = 0; j < iSizes[i]; j++) {
+ for(int32_t i = 0; i < iLength - 2; i++) {
+ for(int32_t j = 0; j < iSizes[i]; j++) {
FXJSE_Value_Release(hResolveValues[i][j]);
}
if (iSizes[i] > 0) {
@@ -5929,7 +5929,7 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
FX_Free(iSizes);
} else {
XFA_RESOLVENODE_RS resoveNodeRS;
- FX_INT32 iRet = 0;
+ int32_t iRet = 0;
if (FXJSE_Value_IsObject(argAccessor) || (FXJSE_Value_IsNull(argAccessor) && bsAccessorName.IsEmpty())) {
iRet = ResolveObjects(hThis, argAccessor, szSomExp, resoveNodeRS, TRUE, szName.IsEmpty());
} else if (!FXJSE_Value_IsObject(argAccessor) && !bsAccessorName.IsEmpty()) {
@@ -5940,11 +5940,11 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
}
if(iRet > 0) {
FXJSE_HVALUE *hResolveValues;
- FX_INT32 iSize = 0;
+ int32_t iSize = 0;
FX_BOOL bAttribute = FALSE;
ParseResolveResult(hThis, resoveNodeRS, argAccessor, hResolveValues, iSize, bAttribute);
FXJSE_HVALUE *rgValues = FX_Alloc(FXJSE_HVALUE, iSize + 2);
- for(FX_INT32 i = 0; i < (iSize + 2); i++) {
+ for(int32_t i = 0; i < (iSize + 2); i++) {
rgValues[i] = FXJSE_Value_Create(hruntime);
}
FXJSE_Value_SetInteger(rgValues[0], 1);
@@ -5953,15 +5953,15 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
} else {
FXJSE_Value_SetNull(rgValues[1]);
}
- for(FX_INT32 i = 0; i < iSize; i++) {
+ for(int32_t i = 0; i < iSize; i++) {
FXJSE_Value_Set(rgValues[i + 2], hResolveValues[i]);
}
FXJSE_Value_SetArray(args.GetReturnValue(), (iSize + 2), rgValues);
- for(FX_INT32 i = 0; i < (iSize + 2); i++) {
+ for(int32_t i = 0; i < (iSize + 2); i++) {
FXJSE_Value_Release(rgValues[i]);
}
FX_Free(rgValues);
- for(FX_INT32 i = 0; i < iSize; i++) {
+ for(int32_t i = 0; i < iSize; i++) {
FXJSE_Value_Release(hResolveValues[i]);
}
FX_Free(hResolveValues);
@@ -5983,14 +5983,14 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName,
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if((argc == 4) || (argc == 5)) {
FX_BOOL bIsStar = TRUE;
FXJSE_HVALUE argAccessor = args.GetValue(0);
CFX_ByteString bsAccessorName = args.GetUTF8String(1);
CFX_ByteString szName = args.GetUTF8String(2);
- FX_INT32 iIndexFlags = args.GetInt32(3);
- FX_INT32 iIndexValue = 0;
+ int32_t iIndexFlags = args.GetInt32(3);
+ int32_t iIndexValue = 0;
FXJSE_HVALUE argIndex = NULL;
if(argc == 5) {
bIsStar = FALSE;
@@ -6002,16 +6002,16 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName,
if(FXJSE_Value_IsArray(argAccessor)) {
FXJSE_HVALUE hLengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argAccessor, FX_BSTRC("length"), hLengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(hLengthValue);
- FX_INT32 iCounter = 0;
+ int32_t iLength = FXJSE_Value_ToInteger(hLengthValue);
+ int32_t iCounter = 0;
FXJSE_HVALUE **hResolveValues = FX_Alloc(FXJSE_HVALUE*, iLength - 2);
- FX_INT32 *iSizes = FX_Alloc(FX_INT32, iLength - 2);
+ int32_t *iSizes = FX_Alloc(int32_t, iLength - 2);
FXJSE_HVALUE hJSObjValue = FXJSE_Value_Create(hruntime);
FX_BOOL bAttribute = FALSE;
- for(FX_INT32 i = 2; i < iLength; i++) {
+ for(int32_t i = 2; i < iLength; i++) {
FXJSE_Value_GetObjectPropByIdx(argAccessor, i, hJSObjValue);
XFA_RESOLVENODE_RS resoveNodeRS;
- FX_INT32 iRet = ResolveObjects(hThis, hJSObjValue, szSomExp, resoveNodeRS, FALSE);
+ int32_t iRet = ResolveObjects(hThis, hJSObjValue, szSomExp, resoveNodeRS, FALSE);
if(iRet > 0) {
ParseResolveResult(hThis, resoveNodeRS, hJSObjValue, hResolveValues[i - 2], iSizes[i - 2], bAttribute);
iCounter += iSizes[i - 2];
@@ -6020,7 +6020,7 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName,
FXJSE_Value_Release(hJSObjValue);
if (iCounter > 0) {
FXJSE_HVALUE *rgValues = FX_Alloc(FXJSE_HVALUE, iCounter + 2);
- for(FX_INT32 i = 0; i < (iCounter + 2); i++) {
+ for(int32_t i = 0; i < (iCounter + 2); i++) {
rgValues[i] = FXJSE_Value_Create(hruntime);
}
FXJSE_Value_SetInteger(rgValues[0], 1);
@@ -6029,15 +6029,15 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName,
} else {
FXJSE_Value_SetNull(rgValues[1]);
}
- FX_INT32 iIndex = 2;
- for(FX_INT32 i = 0; i < iLength - 2; i++) {
- for(FX_INT32 j = 0; j < iSizes[i]; j++) {
+ int32_t iIndex = 2;
+ for(int32_t i = 0; i < iLength - 2; i++) {
+ for(int32_t j = 0; j < iSizes[i]; j++) {
FXJSE_Value_Set(rgValues[iIndex], hResolveValues[i][j]);
iIndex++;
}
}
FXJSE_Value_SetArray(args.GetReturnValue(), (iCounter + 2), rgValues);
- for(FX_INT32 i = 0; i < (iCounter + 2); i++) {
+ for(int32_t i = 0; i < (iCounter + 2); i++) {
FXJSE_Value_Release(rgValues[i]);
}
FX_Free(rgValues);
@@ -6046,8 +6046,8 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName,
CFX_WideString wsSomExpression = CFX_WideString::FromUTF8(szSomExp, szSomExp.GetLength());
pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT, (FX_LPCWSTR)wsPropertyName, (FX_LPCWSTR)wsSomExpression);
}
- for(FX_INT32 i = 0; i < iLength - 2; i++) {
- for(FX_INT32 j = 0; j < iSizes[i]; j++) {
+ for(int32_t i = 0; i < iLength - 2; i++) {
+ for(int32_t j = 0; j < iSizes[i]; j++) {
FXJSE_Value_Release(hResolveValues[i][j]);
}
FX_Free(hResolveValues[i]);
@@ -6057,7 +6057,7 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName,
FXJSE_Value_Release(hLengthValue);
} else {
XFA_RESOLVENODE_RS resoveNodeRS;
- FX_INT32 iRet = 0;
+ int32_t iRet = 0;
if (FXJSE_Value_IsObject(argAccessor) || (FXJSE_Value_IsNull(argAccessor) && bsAccessorName.IsEmpty())) {
iRet = ResolveObjects(hThis, argAccessor, szSomExp, resoveNodeRS, FALSE);
} else if (!FXJSE_Value_IsObject(argAccessor) && !bsAccessorName.IsEmpty()) {
@@ -6068,11 +6068,11 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName,
}
if(iRet > 0) {
FXJSE_HVALUE *hResolveValues;
- FX_INT32 iSize = 0;
+ int32_t iSize = 0;
FX_BOOL bAttribute = FALSE;
ParseResolveResult(hThis, resoveNodeRS, argAccessor, hResolveValues, iSize, bAttribute);
FXJSE_HVALUE *rgValues = FX_Alloc(FXJSE_HVALUE, iSize + 2);
- for(FX_INT32 i = 0; i < (iSize + 2); i++) {
+ for(int32_t i = 0; i < (iSize + 2); i++) {
rgValues[i] = FXJSE_Value_Create(hruntime);
}
FXJSE_Value_SetInteger(rgValues[0], 1);
@@ -6081,15 +6081,15 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis, FX_BSTR szFuncName,
} else {
FXJSE_Value_SetNull(rgValues[1]);
}
- for(FX_INT32 i = 0; i < iSize; i++) {
+ for(int32_t i = 0; i < iSize; i++) {
FXJSE_Value_Set(rgValues[i + 2], hResolveValues[i]);
}
FXJSE_Value_SetArray(args.GetReturnValue(), (iSize + 2), rgValues);
- for(FX_INT32 i = 0; i < (iSize + 2); i++) {
+ for(int32_t i = 0; i < (iSize + 2); i++) {
FXJSE_Value_Release(rgValues[i]);
}
FX_Free(rgValues);
- for(FX_INT32 i = 0; i < iSize; i++) {
+ for(int32_t i = 0; i < iSize; i++) {
FXJSE_Value_Release(hResolveValues[i]);
}
FX_Free(hResolveValues);
@@ -6111,7 +6111,7 @@ void CXFA_FM2JSContext::eval_translation (FXJSE_HOBJECT hThis, FX_BSTR szFuncNam
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if (argc == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
CFX_ByteString argString;
@@ -6137,7 +6137,7 @@ void CXFA_FM2JSContext::eval_translation (FXJSE_HOBJECT hThis, FX_BSTR szFuncNam
}
void CXFA_FM2JSContext::is_fm_object(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 iLength = args.GetLength();
+ int32_t iLength = args.GetLength();
if (iLength == 1) {
FXJSE_HVALUE argOne = args.GetValue(0);
FXJSE_Value_SetBoolean(args.GetReturnValue(), FXJSE_Value_IsObject(argOne));
@@ -6148,7 +6148,7 @@ void CXFA_FM2JSContext::is_fm_object(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
}
void CXFA_FM2JSContext::is_fm_array(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args)
{
- FX_INT32 iLength = args.GetLength();
+ int32_t iLength = args.GetLength();
if (iLength == 1) {
FXJSE_HVALUE argOne = args.GetValue(0);
FX_BOOL bIsArray = FXJSE_Value_IsArray(argOne);
@@ -6162,7 +6162,7 @@ void CXFA_FM2JSContext::get_fm_value(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 iLength = args.GetLength();
+ int32_t iLength = args.GetLength();
if (iLength == 1) {
FXJSE_HVALUE argOne = args.GetValue(0);
if(FXJSE_Value_IsArray(argOne)) {
@@ -6193,13 +6193,13 @@ void CXFA_FM2JSContext::get_fm_jsobj(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CF
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if (argc == 1) {
FXJSE_HVALUE argOne = args.GetValue(0);
if(FXJSE_Value_IsArray(argOne)) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argOne, FX_BSTRC("length"), lengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(lengthValue);
+ int32_t iLength = FXJSE_Value_ToInteger(lengthValue);
FXSYS_assert(iLength >= 3);
FXJSE_Value_Release(lengthValue);
FXJSE_Value_GetObjectPropByIdx(argOne, 2, args.GetReturnValue());
@@ -6215,29 +6215,29 @@ void CXFA_FM2JSContext::fm_var_filter(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, C
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
if (argc == 1) {
FXJSE_HVALUE argOne = args.GetValue(0);
if(FXJSE_Value_IsArray(argOne)) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argOne, FX_BSTRC("length"), lengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(lengthValue);
+ int32_t iLength = FXJSE_Value_ToInteger(lengthValue);
FXSYS_assert(iLength >= 3);
FXJSE_Value_Release(lengthValue);
FXJSE_HVALUE flagsValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectPropByIdx(argOne, 0, flagsValue);
- FX_INT32 iFlags = FXJSE_Value_ToInteger(flagsValue);
+ int32_t iFlags = FXJSE_Value_ToInteger(flagsValue);
FXJSE_Value_Release(flagsValue);
if(iFlags == 4) {
FXJSE_HVALUE rgValues[3];
- for(FX_INT32 i = 0; i < 3; i++) {
+ for(int32_t i = 0; i < 3; i++) {
rgValues[i] = FXJSE_Value_Create(hruntime);
}
FXJSE_Value_SetInteger(rgValues[0], 3);
FXJSE_Value_SetNull(rgValues[1]);
FXJSE_Value_SetNull(rgValues[2]);
FXJSE_Value_SetArray(args.GetReturnValue(), 3, rgValues);
- for(FX_INT32 i = 0; i < 3; i++) {
+ for(int32_t i = 0; i < 3; i++) {
FXJSE_Value_Release(rgValues[i]);
}
} else if(iFlags == 3) {
@@ -6268,31 +6268,31 @@ void CXFA_FM2JSContext::concat_fm_object(FXJSE_HOBJECT hThis, FX_BSTR szFuncName
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_UINT32 iLength = 0;
- FX_INT32 argCount = args.GetLength();
+ uint32_t iLength = 0;
+ int32_t argCount = args.GetLength();
FXJSE_HVALUE *argValues = FX_Alloc(FXJSE_HVALUE, argCount);
- for(FX_INT32 i = 0; i < argCount; i++) {
+ for(int32_t i = 0; i < argCount; i++) {
argValues[i] = args.GetValue(i);
if(FXJSE_Value_IsArray(argValues[i])) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argValues[i], FX_BSTRC("length"), lengthValue);
- FX_INT32 length = FXJSE_Value_ToInteger(lengthValue);
+ int32_t length = FXJSE_Value_ToInteger(lengthValue);
iLength = iLength + ((length > 2) ? (length - 2) : 0);
FXJSE_Value_Release(lengthValue);
}
iLength += 1;
}
FXJSE_HVALUE *returnValues = FX_Alloc(FXJSE_HVALUE, iLength);
- for(FX_INT32 i = 0; i < (FX_INT32)iLength; i++) {
+ for(int32_t i = 0; i < (int32_t)iLength; i++) {
returnValues[i] = FXJSE_Value_Create(hruntime);
}
- FX_INT32 index = 0;
- for(FX_INT32 i = 0; i < argCount; i++) {
+ int32_t index = 0;
+ for(int32_t i = 0; i < argCount; i++) {
if(FXJSE_Value_IsArray(argValues[i])) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argValues[i], FX_BSTRC("length"), lengthValue);
- FX_INT32 length = FXJSE_Value_ToInteger(lengthValue);
- for(FX_INT32 j = 2; j < length; j++) {
+ int32_t length = FXJSE_Value_ToInteger(lengthValue);
+ for(int32_t j = 2; j < length; j++) {
FXJSE_Value_GetObjectPropByIdx(argValues[i], j, returnValues[index]);
index++;
}
@@ -6302,25 +6302,25 @@ void CXFA_FM2JSContext::concat_fm_object(FXJSE_HOBJECT hThis, FX_BSTR szFuncName
index++;
}
FXJSE_Value_SetArray(args.GetReturnValue(), iLength, returnValues);
- for(FX_INT32 i = 0; i < argCount; i++) {
+ for(int32_t i = 0; i < argCount; i++) {
FXJSE_Value_Release(argValues[i]);
}
FX_Free(argValues);
- for(FX_INT32 i = 0; i < (FX_INT32)iLength; i++) {
+ for(int32_t i = 0; i < (int32_t)iLength; i++) {
FXJSE_Value_Release(returnValues[i]);
}
FX_Free(returnValues);
}
-FXJSE_HVALUE CXFA_FM2JSContext::GetSimpleHValue(FXJSE_HOBJECT hThis, CFXJSE_Arguments &args, FX_UINT32 index)
+FXJSE_HVALUE CXFA_FM2JSContext::GetSimpleHValue(FXJSE_HOBJECT hThis, CFXJSE_Arguments &args, uint32_t index)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FXSYS_assert(index < (FX_UINT32)args.GetLength());
+ FXSYS_assert(index < (uint32_t)args.GetLength());
FXJSE_HVALUE argIndex = args.GetValue(index);
if (FXJSE_Value_IsArray(argIndex)) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argIndex, FX_BSTRC("length"), lengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(lengthValue);
+ int32_t iLength = FXJSE_Value_ToInteger(lengthValue);
FXJSE_Value_Release(lengthValue);
FXJSE_HVALUE simpleValue = FXJSE_Value_Create(hruntime);
if (iLength > 2) {
@@ -6359,7 +6359,7 @@ FX_BOOL CXFA_FM2JSContext::HValueIsNull(FXJSE_HOBJECT hThis, FXJSE_HVALUE arg)
if (FXJSE_Value_IsNull(arg)) {
isNull = TRUE;
} else if (FXJSE_Value_IsArray(arg)) {
- FX_INT32 iLength = hvalue_get_array_length(hThis, arg);
+ int32_t iLength = hvalue_get_array_length(hThis, arg);
if (iLength > 2) {
FXJSE_HVALUE propertyValue = FXJSE_Value_Create(hruntime);
FXJSE_HVALUE jsObjectValue = FXJSE_Value_Create(hruntime);
@@ -6397,11 +6397,11 @@ FX_BOOL CXFA_FM2JSContext::HValueIsNull(FXJSE_HOBJECT hThis, FXJSE_HVALUE arg)
}
return isNull;
}
-FX_INT32 CXFA_FM2JSContext::hvalue_get_array_length(FXJSE_HOBJECT hThis, FXJSE_HVALUE arg)
+int32_t CXFA_FM2JSContext::hvalue_get_array_length(FXJSE_HOBJECT hThis, FXJSE_HVALUE arg)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 iLength = 0;
+ int32_t iLength = 0;
if (FXJSE_Value_IsArray(arg)) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(arg, FX_BSTRC("length"), lengthValue);
@@ -6429,19 +6429,19 @@ FX_BOOL CXFA_FM2JSContext::simpleValueCompare(FXJSE_HOBJECT hThis, FXJSE_HVALUE
}
return bReturn;
}
-void CXFA_FM2JSContext::unfoldArgs(FXJSE_HOBJECT hThis, CFXJSE_Arguments &args, FXJSE_HVALUE *&resultValues, FX_INT32 &iCount, FX_INT32 iStart)
+void CXFA_FM2JSContext::unfoldArgs(FXJSE_HOBJECT hThis, CFXJSE_Arguments &args, FXJSE_HVALUE *&resultValues, int32_t &iCount, int32_t iStart)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
iCount = 0;
- FX_INT32 argc = args.GetLength();
+ int32_t argc = args.GetLength();
FXJSE_HVALUE *argsValue = FX_Alloc(FXJSE_HVALUE, argc);
- for (FX_INT32 i = iStart; i < argc; i++) {
+ for (int32_t i = iStart; i < argc; i++) {
argsValue[i] = args.GetValue(i);
if (FXJSE_Value_IsArray(argsValue[i])) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argsValue[i], FX_BSTRC("length"), lengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(lengthValue);
+ int32_t iLength = FXJSE_Value_ToInteger(lengthValue);
FXJSE_Value_Release(lengthValue);
iCount += ((iLength > 2) ? (iLength - 2) : 0);
} else {
@@ -6449,22 +6449,22 @@ void CXFA_FM2JSContext::unfoldArgs(FXJSE_HOBJECT hThis, CFXJSE_Arguments &args,
}
}
resultValues = FX_Alloc(FXJSE_HVALUE, iCount);
- for (FX_INT32 i = 0; i < iCount; i++) {
+ for (int32_t i = 0; i < iCount; i++) {
resultValues[i] = FXJSE_Value_Create(hruntime);
}
- FX_INT32 index = 0;
- for (FX_INT32 i = iStart; i < argc; i++) {
+ int32_t index = 0;
+ for (int32_t i = iStart; i < argc; i++) {
if (FXJSE_Value_IsArray(argsValue[i])) {
FXJSE_HVALUE lengthValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectProp(argsValue[i], FX_BSTRC("length"), lengthValue);
- FX_INT32 iLength = FXJSE_Value_ToInteger(lengthValue);
+ int32_t iLength = FXJSE_Value_ToInteger(lengthValue);
FXJSE_Value_Release(lengthValue);
if (iLength > 2) {
FXJSE_HVALUE propertyValue = FXJSE_Value_Create(hruntime);
FXJSE_HVALUE jsObjectValue = FXJSE_Value_Create(hruntime);
FXJSE_Value_GetObjectPropByIdx(argsValue[i], 1, propertyValue);
if (FXJSE_Value_IsNull(propertyValue)) {
- for (FX_INT32 j = 2; j < iLength; j++) {
+ for (int32_t j = 2; j < iLength; j++) {
FXJSE_Value_GetObjectPropByIdx(argsValue[i], j, jsObjectValue);
GetObjectDefaultValue(jsObjectValue, resultValues[index]);
index++;
@@ -6472,7 +6472,7 @@ void CXFA_FM2JSContext::unfoldArgs(FXJSE_HOBJECT hThis, CFXJSE_Arguments &args,
} else {
CFX_ByteString propertyString;
FXJSE_Value_ToUTF8String(propertyValue, propertyString);
- for (FX_INT32 j = 2; j < iLength; j++) {
+ for (int32_t j = 2; j < iLength; j++) {
FXJSE_Value_GetObjectPropByIdx(argsValue[i], j, jsObjectValue);
FXJSE_Value_GetObjectProp(jsObjectValue, propertyString, resultValues[index]);
index++;
@@ -6489,7 +6489,7 @@ void CXFA_FM2JSContext::unfoldArgs(FXJSE_HOBJECT hThis, CFXJSE_Arguments &args,
index++;
}
}
- for (FX_INT32 i = iStart; i < argc; i++) {
+ for (int32_t i = iStart; i < argc; i++) {
FXJSE_Value_Release(argsValue[i]);
}
FX_Free(argsValue);
@@ -6513,7 +6513,7 @@ FX_BOOL CXFA_FM2JSContext::SetObjectDefaultValue(FXJSE_HVALUE hObjectValue, FXJS
}
return bSuccess;
}
-void CXFA_FM2JSContext::GenerateSomExpression(FX_BSTR szName, FX_INT32 iIndexFlags, FX_INT32 iIndexValue, FX_BOOL bIsStar, CFX_ByteString& szSomExp)
+void CXFA_FM2JSContext::GenerateSomExpression(FX_BSTR szName, int32_t iIndexFlags, int32_t iIndexValue, FX_BOOL bIsStar, CFX_ByteString& szSomExp)
{
if(bIsStar) {
szSomExp = szName + FX_BSTRC("[*]");
@@ -6548,17 +6548,17 @@ FX_BOOL CXFA_FM2JSContext::GetObjectByName(FXJSE_HOBJECT hThis, FXJSE_HVALUE acc
IXFA_ScriptContext* pScriptContext = pDoc->GetScriptContext();
XFA_RESOLVENODE_RS resoveNodeRS;
FX_DWORD dwFlags = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent;
- FX_INT32 iRet = pScriptContext->ResolveObjects(pScriptContext->GetThisObject(), CFX_WideString::FromUTF8(szAccessorName.GetCStr(), szAccessorName.GetLength()), resoveNodeRS, dwFlags);
+ int32_t iRet = pScriptContext->ResolveObjects(pScriptContext->GetThisObject(), CFX_WideString::FromUTF8(szAccessorName.GetCStr(), szAccessorName.GetLength()), resoveNodeRS, dwFlags);
if (iRet >= 1 && resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) {
FXJSE_Value_Set(accessorValue, pScriptContext->GetJSValueFromMap(resoveNodeRS.nodes.GetAt(0)));
bFlags = TRUE;
}
return bFlags;
}
-FX_INT32 CXFA_FM2JSContext::ResolveObjects(FXJSE_HOBJECT hThis, FXJSE_HVALUE hRefValue, FX_BSTR bsSomExp, XFA_RESOLVENODE_RS &resoveNodeRS, FX_BOOL bdotAccessor , FX_BOOL bHasNoResolveName )
+int32_t CXFA_FM2JSContext::ResolveObjects(FXJSE_HOBJECT hThis, FXJSE_HVALUE hRefValue, FX_BSTR bsSomExp, XFA_RESOLVENODE_RS &resoveNodeRS, FX_BOOL bdotAccessor , FX_BOOL bHasNoResolveName )
{
CFX_WideString wsSomExpression = CFX_WideString::FromUTF8(bsSomExp.GetCStr(), bsSomExp.GetLength());
- FX_INT32 iRet = -1;
+ int32_t iRet = -1;
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
CXFA_Document *pDoc = pContext->GetDocument();
if(!pDoc) {
@@ -6598,7 +6598,7 @@ FX_INT32 CXFA_FM2JSContext::ResolveObjects(FXJSE_HOBJECT hThis, FXJSE_HVALUE hRe
iRet = pScriptContext->ResolveObjects(pNode, wsSomExpression, resoveNodeRS, dFlags);
return iRet;
}
-void CXFA_FM2JSContext::ParseResolveResult(FXJSE_HOBJECT hThis, const XFA_RESOLVENODE_RS &resoveNodeRS, FXJSE_HVALUE hParentValue, FXJSE_HVALUE *&resultValues, FX_INT32 &iSize, FX_BOOL &bAttribute)
+void CXFA_FM2JSContext::ParseResolveResult(FXJSE_HOBJECT hThis, const XFA_RESOLVENODE_RS &resoveNodeRS, FXJSE_HVALUE hParentValue, FXJSE_HVALUE *&resultValues, int32_t &iSize, FX_BOOL &bAttribute)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hRuntime = pContext->GetScriptRuntime();
@@ -6608,13 +6608,13 @@ void CXFA_FM2JSContext::ParseResolveResult(FXJSE_HOBJECT hThis, const XFA_RESOLV
bAttribute = FALSE;
iSize = resoveNodeRS.nodes.GetSize();
resultValues = FX_Alloc(FXJSE_HVALUE, iSize);
- for (FX_INT32 i = 0; i < iSize; i++) {
+ for (int32_t i = 0; i < iSize; i++) {
resultValues[i] = FXJSE_Value_Create(hRuntime);
FXJSE_Value_Set(resultValues[i], pContext->GetDocument()->GetScriptContext()->GetJSValueFromMap(resoveNodeRS.nodes.GetAt(i)));
}
} else {
CXFA_HVALUEArray objectProperties(hRuntime);
- FX_INT32 iRet = resoveNodeRS.GetAttributeResult(objectProperties);
+ int32_t iRet = resoveNodeRS.GetAttributeResult(objectProperties);
bAttribute = (iRet == 0);
if (bAttribute) {
if (FXJSE_Value_IsObject(hParentValue)) {
@@ -6626,18 +6626,18 @@ void CXFA_FM2JSContext::ParseResolveResult(FXJSE_HOBJECT hThis, const XFA_RESOLV
} else {
iSize = iRet;
resultValues = FX_Alloc(FXJSE_HVALUE, iSize);
- for (FX_INT32 i = 0; i < iSize; i++) {
+ for (int32_t i = 0; i < iSize; i++) {
resultValues[i] = FXJSE_Value_Create(hRuntime);
FXJSE_Value_Set(resultValues[i], objectProperties[i]);
}
}
}
}
-FX_INT32 CXFA_FM2JSContext::HValueToInteger(FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue)
+int32_t CXFA_FM2JSContext::HValueToInteger(FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue)
{
CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
FXJSE_HRUNTIME hruntime = pContext->GetScriptRuntime();
- FX_INT32 iValue = 0;
+ int32_t iValue = 0;
if(FXJSE_Value_IsArray(hValue)) {
FXJSE_HVALUE propertyValue = FXJSE_Value_Create(hruntime);
FXJSE_HVALUE jsobjectValue = FXJSE_Value_Create(hruntime);
@@ -7170,7 +7170,7 @@ void CXFA_FM2JSContext::Release()
{
delete this;
}
-void CXFA_FM2JSContext::ThrowScriptErrorMessage(FX_INT32 iStringID, ...)
+void CXFA_FM2JSContext::ThrowScriptErrorMessage(int32_t iStringID, ...)
{
IXFA_AppProvider* pAppProvider = m_pDocument->GetNotify()->GetAppProvider();
FXSYS_assert(pAppProvider);
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.h b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.h
index 466050d662..923401b901 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.h
@@ -33,22 +33,22 @@ public:
static void Time2Num (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
static void TimeFmt (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static FX_BOOL IsIsoDateFormat (FX_LPCSTR pData, FX_INT32 iLength, FX_INT32 &iStyle, FX_INT32 &iYear, FX_INT32 &iMonth, FX_INT32 &iDay);
- static FX_BOOL IsIsoTimeFormat (FX_LPCSTR pData, FX_INT32 iLength, FX_INT32 &iHour, FX_INT32 &iMinute, FX_INT32 &iSecond, FX_INT32 &iMilliSecond, FX_INT32 &iZoneHour, FX_INT32 &iZoneMinute);
- static FX_BOOL IsIsoDateTimeFormat (FX_LPCSTR pData, FX_INT32 iLength, FX_INT32 &iYear, FX_INT32 &iMonth, FX_INT32 &iDay, FX_INT32 &iHour, FX_INT32 &iMinute, FX_INT32 &iSecond, FX_INT32 &iMillionSecond, FX_INT32 &iZoneHour, FX_INT32 &iZoneMinute);
+ static FX_BOOL IsIsoDateFormat (FX_LPCSTR pData, int32_t iLength, int32_t &iStyle, int32_t &iYear, int32_t &iMonth, int32_t &iDay);
+ static FX_BOOL IsIsoTimeFormat (FX_LPCSTR pData, int32_t iLength, int32_t &iHour, int32_t &iMinute, int32_t &iSecond, int32_t &iMilliSecond, int32_t &iZoneHour, int32_t &iZoneMinute);
+ static FX_BOOL IsIsoDateTimeFormat (FX_LPCSTR pData, int32_t iLength, int32_t &iYear, int32_t &iMonth, int32_t &iDay, int32_t &iHour, int32_t &iMinute, int32_t &iSecond, int32_t &iMillionSecond, int32_t &iZoneHour, int32_t &iZoneMinute);
static FX_BOOL Local2IsoDate (FXJSE_HOBJECT hThis, FX_BSTR szDate, FX_BSTR szFormat, FX_BSTR szLocale, CFX_ByteString &strIsoDate);
static FX_BOOL Local2IsoTime (FXJSE_HOBJECT hThis, FX_BSTR szTime, FX_BSTR szFormat, FX_BSTR szLocale, CFX_ByteString &strIsoTime);
static FX_BOOL IsoDate2Local (FXJSE_HOBJECT hThis, FX_BSTR szDate, FX_BSTR szFormat, FX_BSTR szLocale, CFX_ByteString &strLocalDate);
static FX_BOOL IsoTime2Local (FXJSE_HOBJECT hThis, FX_BSTR szTime, FX_BSTR szFormat, FX_BSTR szLocale, CFX_ByteString &strLocalTime);
static FX_BOOL GetGMTTime (FXJSE_HOBJECT hThis, FX_BSTR szTime, FX_BSTR szFormat, FX_BSTR szLocale, CFX_ByteString &strGMTTime);
- static FX_INT32 DateString2Num (FX_BSTR szDateString);
- static void GetLocalDateFormat (FXJSE_HOBJECT hThis, FX_INT32 iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard);
- static void GetLocalTimeFormat (FXJSE_HOBJECT hThis, FX_INT32 iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard);
- static void GetStandardDateFormat (FXJSE_HOBJECT hThis, FX_INT32 iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat);
- static void GetStandardTimeFormat (FXJSE_HOBJECT hThis, FX_INT32 iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat);
+ static int32_t DateString2Num (FX_BSTR szDateString);
+ static void GetLocalDateFormat (FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard);
+ static void GetLocalTimeFormat (FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat, FX_BOOL bStandard);
+ static void GetStandardDateFormat (FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat);
+ static void GetStandardTimeFormat (FXJSE_HOBJECT hThis, int32_t iStyle, FX_BSTR szLocalStr, CFX_ByteString &strFormat);
- static void Num2AllTime (FXJSE_HOBJECT hThis, FX_INT32 iTime, FX_BSTR szFormat, FX_BSTR szLocale, FX_BOOL bGM, CFX_ByteString &strTime);
- static void GetLocalTimeZone (FX_INT32 &iHour, FX_INT32 &iMin, FX_INT32 &iSec);
+ static void Num2AllTime (FXJSE_HOBJECT hThis, int32_t iTime, FX_BSTR szFormat, FX_BSTR szLocale, FX_BOOL bGM, CFX_ByteString &strTime);
+ static void GetLocalTimeZone (int32_t &iHour, int32_t &iMin, int32_t &iSec);
static void Apr (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
static void CTerm (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
@@ -81,8 +81,8 @@ public:
static void EncodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResultBuf);
static void EncodeHTML (FX_BSTR szHTMLString, CFX_ByteTextBuf &szResultBuf);
static void EncodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResultBuf);
- static FX_BOOL HTMLSTR2Code (FX_WSTR pData, FX_UINT32 &iCode);
- static FX_BOOL HTMLCode2STR (FX_UINT32 iCode, CFX_WideString &wsHTMLReserve);
+ static FX_BOOL HTMLSTR2Code (FX_WSTR pData, uint32_t &iCode);
+ static FX_BOOL HTMLCode2STR (uint32_t iCode, CFX_WideString &wsHTMLReserve);
static void Format (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
static void Left (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
static void Len (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
@@ -100,7 +100,7 @@ public:
static void Upper (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
static void WordNum (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
static void TrillionUS (FX_BSTR szData, CFX_ByteTextBuf &strBuf);
- static void WordUS (FX_BSTR szData, FX_INT32 iStyle, CFX_ByteTextBuf &strBuf);
+ static void WordUS (FX_BSTR szData, int32_t iStyle, CFX_ByteTextBuf &strBuf);
static void Get (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
static void Post (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
@@ -132,19 +132,19 @@ public:
static void fm_var_filter (FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
static void concat_fm_object(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static FX_INT32 hvalue_get_array_length (FXJSE_HOBJECT hThis, FXJSE_HVALUE arg);
+ static int32_t hvalue_get_array_length (FXJSE_HOBJECT hThis, FXJSE_HVALUE arg);
static FX_BOOL simpleValueCompare (FXJSE_HOBJECT hThis, FXJSE_HVALUE firstValue, FXJSE_HVALUE secondValue);
- static void unfoldArgs (FXJSE_HOBJECT hThis, CFXJSE_Arguments &args, FXJSE_HVALUE *&resultValues, FX_INT32 &iCount, FX_INT32 iStart = 0);
+ static void unfoldArgs (FXJSE_HOBJECT hThis, CFXJSE_Arguments &args, FXJSE_HVALUE *&resultValues, int32_t &iCount, int32_t iStart = 0);
static void GetObjectDefaultValue(FXJSE_HVALUE hObjectValue, FXJSE_HVALUE hDefaultValue);
static FX_BOOL SetObjectDefaultValue(FXJSE_HVALUE hObjectValue, FXJSE_HVALUE hNewValue);
- static void GenerateSomExpression(FX_BSTR szName, FX_INT32 iIndexFlags, FX_INT32 iIndexValue, FX_BOOL bIsStar, CFX_ByteString& szSomExp);
+ static void GenerateSomExpression(FX_BSTR szName, int32_t iIndexFlags, int32_t iIndexValue, FX_BOOL bIsStar, CFX_ByteString& szSomExp);
static FX_BOOL GetObjectByName(FXJSE_HOBJECT hThis, FXJSE_HVALUE accessorValue, FX_BSTR szAccessorName);
- static FX_INT32 ResolveObjects(FXJSE_HOBJECT hThis, FXJSE_HVALUE hParentValue, FX_BSTR bsSomExp, XFA_RESOLVENODE_RS &resoveNodeRS, FX_BOOL bdotAccessor = TRUE, FX_BOOL bHasNoResolveName = FALSE);
- static void ParseResolveResult(FXJSE_HOBJECT hThis, const XFA_RESOLVENODE_RS& resoveNodeRS, FXJSE_HVALUE hParentValue, FXJSE_HVALUE *&resultValues, FX_INT32 &iSize, FX_BOOL &bAttribute);
+ static int32_t ResolveObjects(FXJSE_HOBJECT hThis, FXJSE_HVALUE hParentValue, FX_BSTR bsSomExp, XFA_RESOLVENODE_RS &resoveNodeRS, FX_BOOL bdotAccessor = TRUE, FX_BOOL bHasNoResolveName = FALSE);
+ static void ParseResolveResult(FXJSE_HOBJECT hThis, const XFA_RESOLVENODE_RS& resoveNodeRS, FXJSE_HVALUE hParentValue, FXJSE_HVALUE *&resultValues, int32_t &iSize, FX_BOOL &bAttribute);
- static FXJSE_HVALUE GetSimpleHValue (FXJSE_HOBJECT hThis, CFXJSE_Arguments &args, FX_UINT32 index);
+ static FXJSE_HVALUE GetSimpleHValue (FXJSE_HOBJECT hThis, CFXJSE_Arguments &args, uint32_t index);
static FX_BOOL HValueIsNull (FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue);
- static FX_INT32 HValueToInteger (FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue);
+ static int32_t HValueToInteger (FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue);
static FX_DOUBLE StringToDouble(FX_BSTR szStringVal);
static FX_FLOAT HValueToFloat (FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue);
static FX_DOUBLE HValueToDouble (FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue);
@@ -163,7 +163,7 @@ public:
{
return m_pDocument;
}
- void ThrowScriptErrorMessage(FX_INT32 iStringID, ...);
+ void ThrowScriptErrorMessage(int32_t iStringID, ...);
private:
FXJSE_HRUNTIME m_hScriptRuntime;
FXJSE_CLASS m_fmClass;
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp b/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp
index 5bc76c21e8..a3e127f3c6 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp
@@ -23,7 +23,7 @@ CXFA_FMParse::~CXFA_FMParse()
m_pScript = 0;
m_pToken = 0;
}
-FX_INT32 CXFA_FMParse::Init(FX_WSTR wsFormcalc, CXFA_FMErrorInfo *pErrorInfo)
+int32_t CXFA_FMParse::Init(FX_WSTR wsFormcalc, CXFA_FMErrorInfo *pErrorInfo)
{
m_pScript = wsFormcalc.GetPtr();
m_uLength = wsFormcalc.GetLength();
@@ -153,8 +153,8 @@ CXFA_FMExpression * CXFA_FMParse::ParseFunction()
if (m_pErrorInfo->message.IsEmpty()) {
e = FX_NEW CXFA_FMFunctionDefinition(line, 0, ident, pArguments, pExpressions);
} else {
- FX_INT32 size = 0;
- FX_INT32 index = 0;
+ int32_t size = 0;
+ int32_t index = 0;
if (pArguments) {
pArguments->RemoveAll();
delete pArguments;
@@ -622,8 +622,8 @@ CXFA_FMSimpleExpression *CXFA_FMParse::ParsePostExpression(CXFA_FMSimpleExpressi
e = 0;
}
} else {
- FX_INT32 iSize = pArray->GetSize();
- for (FX_INT32 i = 0; i < iSize; ++i) {
+ int32_t iSize = pArray->GetSize();
+ for (int32_t i = 0; i < iSize; ++i) {
CXFA_FMSimpleExpression *pTemp = (CXFA_FMSimpleExpression *)pArray->GetAt(i);
delete pTemp;
}
@@ -677,8 +677,8 @@ CXFA_FMSimpleExpression *CXFA_FMParse::ParsePostExpression(CXFA_FMSimpleExpressi
e = 0;
}
} else {
- FX_INT32 iSize = pArray->GetSize();
- for (FX_INT32 i = 0; i < iSize; ++i) {
+ int32_t iSize = pArray->GetSize();
+ for (int32_t i = 0; i < iSize; ++i) {
CXFA_FMSimpleExpression *pTemp = (CXFA_FMSimpleExpression *)pArray->GetAt(i);
delete pTemp;
}
@@ -882,8 +882,8 @@ CXFA_FMExpression * CXFA_FMParse::ParseBlockExpression()
if (m_pErrorInfo->message.IsEmpty()) {
pExp = FX_NEW CXFA_FMBlockExpression(line, expression);
} else {
- FX_INT32 size = expression->GetSize();
- FX_INT32 index = 0;
+ int32_t size = expression->GetSize();
+ int32_t index = 0;
while(index < size) {
e = (CXFA_FMExpression *)expression->GetAt(index);
delete e;
@@ -1033,7 +1033,7 @@ CXFA_FMExpression * CXFA_FMParse::ParseForExpression()
CFX_WideString ws_TempString = m_pToken->m_wstring;
Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, XFA_FM_KeywordToString(m_pToken->m_type), FX_LPCWSTR(ws_TempString));
}
- FX_INT32 iDirection = 0;
+ int32_t iDirection = 0;
if (m_pToken->m_type == TOKupto) {
iDirection = 1;
} else if (m_pToken->m_type == TOKdownto) {
@@ -1112,8 +1112,8 @@ CXFA_FMExpression * CXFA_FMParse::ParseForeachExpression()
} else {
if (pAccessors) {
CXFA_FMSimpleExpression *s = 0;
- FX_INT32 size = pAccessors->GetSize();
- FX_INT32 index = 0;
+ int32_t size = pAccessors->GetSize();
+ int32_t index = 0;
while(index < size) {
s = (CXFA_FMSimpleExpression *)pAccessors->GetAt(index);
delete s;
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fmparse.h b/xfa/src/fxfa/src/fm2js/xfa_fmparse.h
index d3adca7075..496a3dfa6e 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_fmparse.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_fmparse.h
@@ -11,7 +11,7 @@ class CXFA_FMParse
public:
CXFA_FMParse();
~CXFA_FMParse();
- FX_INT32 Init(FX_WSTR wsFormcalc, CXFA_FMErrorInfo *pErrorInfo);
+ int32_t Init(FX_WSTR wsFormcalc, CXFA_FMErrorInfo *pErrorInfo);
void NextToken();
void Check(XFA_FM_TOKEN op);
void Error(FX_DWORD lineNum, XFA_FM_ERRMSG msg, ...);
diff --git a/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp b/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp
index 29594c760b..7ce3355861 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp
@@ -16,7 +16,7 @@ struct XFA_FMDChar {
--p;
return p;
}
- static FX_UINT16 get(FX_LPCWSTR p)
+ static uint16_t get(FX_LPCWSTR p)
{
return *p;
}
@@ -50,7 +50,7 @@ struct XFA_FMDChar {
}
static FX_BOOL isAvalid(FX_LPCWSTR p, FX_BOOL flag = 0);
static FX_BOOL string2number(FX_LPCWSTR s, FX_DOUBLE *pValue, FX_LPCWSTR &pEnd);
- static FX_BOOL isUnicodeAlpha(FX_UINT16 ch);
+ static FX_BOOL isUnicodeAlpha(uint16_t ch);
};
inline FX_BOOL XFA_FMDChar::isAvalid(FX_LPCWSTR p, FX_BOOL flag)
{
@@ -74,7 +74,7 @@ inline FX_BOOL XFA_FMDChar::string2number(FX_LPCWSTR s, FX_DOUBLE *pValue, FX_LP
}
return 0;
}
-inline FX_BOOL XFA_FMDChar::isUnicodeAlpha(FX_UINT16 ch)
+inline FX_BOOL XFA_FMDChar::isUnicodeAlpha(uint16_t ch)
{
if (ch == 0 || ch == 0x0A || ch == 0x0D || ch == 0x09 || ch == 0x0B || ch == 0x0C || ch == 0x20 || ch == '.'
|| ch == ';' || ch == '"' || ch == '=' || ch == '<' || ch == '>' || ch == ',' || ch == '(' || ch == ')'
@@ -195,7 +195,7 @@ CXFA_FMToken *CXFA_FMLexer::NextToken()
}
CXFA_FMToken * CXFA_FMLexer::Scan()
{
- FX_UINT16 ch = 0;
+ uint16_t ch = 0;
CXFA_FMToken * p = FX_NEW CXFA_FMToken(m_uCurrentLine);
if (!XFA_FMDChar::isAvalid(m_ptr)) {
ch = XFA_FMDChar::get(m_ptr);
@@ -444,7 +444,7 @@ FX_DWORD CXFA_FMLexer::Number(CXFA_FMToken *t, FX_LPCWSTR p, FX_LPCWSTR &pEnd)
FX_DWORD CXFA_FMLexer::String(CXFA_FMToken *t, FX_LPCWSTR p, FX_LPCWSTR &pEnd)
{
FX_LPCWSTR pStart = p;
- FX_UINT16 ch = 0;
+ uint16_t ch = 0;
XFA_FMDChar::inc(p);
ch = XFA_FMDChar::get(p);
while (ch) {
@@ -482,7 +482,7 @@ NEXT:
FX_DWORD CXFA_FMLexer::Identifiers(CXFA_FMToken *t, FX_LPCWSTR p, FX_LPCWSTR &pEnd)
{
FX_LPCWSTR pStart = p;
- FX_UINT16 ch = 0;
+ uint16_t ch = 0;
ch = XFA_FMDChar::get(p);
XFA_FMDChar::inc(p);
if (!XFA_FMDChar::isAvalid(p)) {
@@ -536,10 +536,10 @@ void CXFA_FMLexer::Comment( FX_LPCWSTR p, FX_LPCWSTR &pEnd )
}
XFA_FM_TOKEN CXFA_FMLexer::IsKeyword(FX_WSTR str)
{
- FX_INT32 iLength = str.GetLength();
- FX_UINT32 uHash = FX_HashCode_String_GetW(str.GetPtr(), iLength, TRUE);
- FX_INT32 iStart = KEYWORD_START, iEnd = KEYWORD_END;
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iLength = str.GetLength();
+ uint32_t uHash = FX_HashCode_String_GetW(str.GetPtr(), iLength, TRUE);
+ int32_t iStart = KEYWORD_START, iEnd = KEYWORD_END;
+ int32_t iMid = (iStart + iEnd) / 2;
XFA_FMKeyword keyword;
do {
iMid = (iStart + iEnd) / 2;
diff --git a/xfa/src/fxfa/src/fm2js/xfa_lexer.h b/xfa/src/fxfa/src/fm2js/xfa_lexer.h
index 3047a5028d..709307046b 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_lexer.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_lexer.h
@@ -23,7 +23,7 @@ enum XFA_FM_TOKEN {
};
struct XFA_FMKeyword {
XFA_FM_TOKEN m_type;
- FX_UINT32 m_uHash;
+ uint32_t m_uHash;
FX_LPCWSTR m_keword;
};
FX_LPCWSTR XFA_FM_KeywordToString(XFA_FM_TOKEN op);
diff --git a/xfa/src/fxfa/src/fm2js/xfa_program.cpp b/xfa/src/fxfa/src/fm2js/xfa_program.cpp
index d291e7a614..51faea0e91 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_program.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_program.cpp
@@ -16,11 +16,11 @@ CXFA_FMProgram::~CXFA_FMProgram()
m_globalFunction = 0;
}
}
-FX_INT32 CXFA_FMProgram::Init(FX_WSTR wsFormcalc)
+int32_t CXFA_FMProgram::Init(FX_WSTR wsFormcalc)
{
return m_parse.Init(wsFormcalc, &m_pErrorInfo);
}
-FX_INT32 CXFA_FMProgram::ParseProgram()
+int32_t CXFA_FMProgram::ParseProgram()
{
CFX_PtrArray * expressions = 0;
m_parse.NextToken();
@@ -30,7 +30,7 @@ FX_INT32 CXFA_FMProgram::ParseProgram()
expressions = m_parse.ParseTopExpression();
if (!m_pErrorInfo.message.IsEmpty()) {
CXFA_FMExpression *e = 0;
- for (FX_INT32 u = 0; u < expressions->GetSize(); ++u) {
+ for (int32_t u = 0; u < expressions->GetSize(); ++u) {
e = (CXFA_FMExpression *)expressions->GetAt(u);
if (e) {
delete e;
@@ -42,7 +42,7 @@ FX_INT32 CXFA_FMProgram::ParseProgram()
m_globalFunction = FX_NEW CXFA_FMFunctionDefinition(1, 1, FX_WSTRC(L""), 0, expressions);
return 0;
}
-FX_INT32 CXFA_FMProgram::TranslateProgram(CFX_WideTextBuf &wsJavaScript)
+int32_t CXFA_FMProgram::TranslateProgram(CFX_WideTextBuf &wsJavaScript)
{
m_globalFunction->ToJavaScript(wsJavaScript);
wsJavaScript.AppendChar(0);
diff --git a/xfa/src/fxfa/src/fm2js/xfa_program.h b/xfa/src/fxfa/src/fm2js/xfa_program.h
index 157d1e1faa..a7453d4d1d 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_program.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_program.h
@@ -11,9 +11,9 @@ class CXFA_FMProgram
public:
CXFA_FMProgram();
~CXFA_FMProgram();
- FX_INT32 Init(FX_WSTR wsFormcalc);
- FX_INT32 ParseProgram();
- FX_INT32 TranslateProgram(CFX_WideTextBuf &wsJavaScript);
+ int32_t Init(FX_WSTR wsFormcalc);
+ int32_t ParseProgram();
+ int32_t TranslateProgram(CFX_WideTextBuf &wsJavaScript);
CXFA_FMErrorInfo& GetError()
{
return m_pErrorInfo;
diff --git a/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp b/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp
index dc4f24449b..d52ab7c076 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp
@@ -168,7 +168,7 @@ void CXFA_FMStringExpression::ToJavaScript(CFX_WideTextBuf& javascript)
if (tempStr.GetLength() > 2) {
javascript.AppendChar(L'\"');
FX_WCHAR oneChar;
- for (FX_INT16 i = 1; i < tempStr.GetLength() - 1; i++) {
+ for (int16_t i = 1; i < tempStr.GetLength() - 1; i++) {
oneChar = tempStr[i];
switch (oneChar) {
case L'\"': {
@@ -489,8 +489,8 @@ CXFA_FMCallExpression::CXFA_FMCallExpression(FX_DWORD line, CXFA_FMSimpleExpress
CXFA_FMCallExpression::~CXFA_FMCallExpression()
{
if (m_pArguments) {
- FX_INT32 argc = m_pArguments->GetSize();
- FX_INT32 index = 0;
+ int32_t argc = m_pArguments->GetSize();
+ int32_t index = 0;
CXFA_FMSimpleExpression *e = 0;
while (index < argc) {
e = (CXFA_FMSimpleExpression *)m_pArguments->GetAt(index);
@@ -504,11 +504,11 @@ CXFA_FMCallExpression::~CXFA_FMCallExpression()
}
FX_BOOL CXFA_FMCallExpression::IsBuildInFunc(CFX_WideTextBuf& funcName)
{
- FX_INT32 iLength = funcName.GetLength();
- FX_UINT32 uHash = FX_HashCode_String_GetW(funcName.GetBuffer(), iLength, TRUE);
+ int32_t iLength = funcName.GetLength();
+ uint32_t uHash = FX_HashCode_String_GetW(funcName.GetBuffer(), iLength, TRUE);
XFA_FMBuildInFunc buildinfunction;
- FX_INT32 iStart = 0, iEnd = (sizeof(buildInFuncs) / sizeof(buildInFuncs[0])) - 1;
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iStart = 0, iEnd = (sizeof(buildInFuncs) / sizeof(buildInFuncs[0])) - 1;
+ int32_t iMid = (iStart + iEnd) / 2;
do {
iMid = (iStart + iEnd) / 2;
buildinfunction = buildInFuncs[iMid];
@@ -526,12 +526,12 @@ FX_BOOL CXFA_FMCallExpression::IsBuildInFunc(CFX_WideTextBuf& funcName)
}
FX_DWORD CXFA_FMCallExpression::IsSomMethodWithObjPara(FX_WSTR methodName)
{
- FX_INT32 iLength = methodName.GetLength();
- FX_UINT32 uHash = FX_HashCode_String_GetW(methodName.GetPtr(), iLength);
+ int32_t iLength = methodName.GetLength();
+ uint32_t uHash = FX_HashCode_String_GetW(methodName.GetPtr(), iLength);
XFA_FMSOMMethod somMethodWithObjPara;
FX_DWORD parameters = 0x00;
- FX_INT32 iStart = 0, iEnd = (sizeof(gs_FMSomMethods) / sizeof(gs_FMSomMethods[0])) - 1;
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iStart = 0, iEnd = (sizeof(gs_FMSomMethods) / sizeof(gs_FMSomMethods[0])) - 1;
+ int32_t iMid = (iStart + iEnd) / 2;
do {
iMid = (iStart + iEnd) / 2;
somMethodWithObjPara = gs_FMSomMethods[iMid];
@@ -554,8 +554,8 @@ void CXFA_FMCallExpression::ToJavaScript(CFX_WideTextBuf& javascript)
javascript << funcName;
javascript << FX_WSTRC(L"(");
if (m_pArguments) {
- FX_INT32 argc = m_pArguments->GetSize();
- FX_INT32 index = 0;
+ int32_t argc = m_pArguments->GetSize();
+ int32_t index = 0;
FX_DWORD methodPara = IsSomMethodWithObjPara(funcName.GetWideString());
if (methodPara > 0) {
CXFA_FMSimpleExpression *e = 0;
@@ -623,8 +623,8 @@ void CXFA_FMCallExpression::ToJavaScript(CFX_WideTextBuf& javascript)
}
javascript << FX_WSTRC(L"catch(accessExceptions)\n{\nreturn 0;\n}\n}\n).call(this)\n");
} else if (m_pArguments) {
- FX_INT32 argc = m_pArguments->GetSize();
- FX_INT32 index = 0;
+ int32_t argc = m_pArguments->GetSize();
+ int32_t index = 0;
CXFA_FMSimpleExpression *e = 0;
while (index < argc) {
e = (CXFA_FMSimpleExpression *)m_pArguments->GetAt(index);
diff --git a/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.h b/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.h
index b492b80e04..7d9f9d5f79 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.h
+++ b/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.h
@@ -35,11 +35,11 @@ enum XFA_FM_SimpleExpressionType {
};
CFX_WideStringC XFA_FM_EXPTypeToString(XFA_FM_SimpleExpressionType simpleExpType);
struct XFA_FMBuildInFunc {
- FX_UINT32 m_uHash;
+ uint32_t m_uHash;
FX_LPCWSTR m_buildinfunc;
};
struct XFA_FMSOMMethod {
- FX_UINT32 m_uHash;
+ uint32_t m_uHash;
FX_LPCWSTR m_wsSomMethodName;
FX_DWORD m_dParameters;
};
diff --git a/xfa/src/fxfa/src/parser/xfa_basic_data.cpp b/xfa/src/fxfa/src/parser/xfa_basic_data.cpp
index fa452b57fb..c061b80a34 100644
--- a/xfa/src/fxfa/src/parser/xfa_basic_data.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_basic_data.cpp
@@ -291,7 +291,7 @@ extern const XFA_ATTRIBUTEENUMINFO g_XFAEnumData[] = {
{0xfefc4885, L"urlencoded", XFA_ATTRIBUTEENUM_Urlencoded},
{0xff795ad2, L"lowered", XFA_ATTRIBUTEENUM_Lowered},
};
-extern const FX_INT32 g_iXFAEnumCount = sizeof(g_XFAEnumData) / sizeof(XFA_ATTRIBUTEENUMINFO);
+extern const int32_t g_iXFAEnumCount = sizeof(g_XFAEnumData) / sizeof(XFA_ATTRIBUTEENUMINFO);
static const CXFA_Measurement g_XFAMeasurementData[] = {
CXFA_Measurement(0, XFA_UNIT_In),
CXFA_Measurement(0, XFA_UNIT_Pt),
@@ -548,7 +548,7 @@ extern const XFA_ATTRIBUTEINFO g_XFAAttributeData[] = {
{0xf889e747, L"xdpContent", XFA_ATTRIBUTE_XdpContent, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
{0xfea53ec6, L"decipherOnly", XFA_ATTRIBUTE_DecipherOnly, XFA_ATTRIBUTETYPE_Cdata, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, (FX_LPVOID)NULL},
};
-extern const FX_INT32 g_iXFAAttributeCount = sizeof(g_XFAAttributeData) / sizeof(XFA_ATTRIBUTEINFO);
+extern const int32_t g_iXFAAttributeCount = sizeof(g_XFAAttributeData) / sizeof(XFA_ATTRIBUTEINFO);
extern const XFA_NOTSUREATTRIBUTE g_XFANotsureAttributes[] = {
{XFA_ELEMENT_SubformSet, XFA_ATTRIBUTE_Relation, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Ordered},
{XFA_ELEMENT_NumberPattern, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Numeric},
@@ -599,7 +599,7 @@ extern const XFA_NOTSUREATTRIBUTE g_XFANotsureAttributes[] = {
{XFA_ELEMENT_Occur, XFA_ATTRIBUTE_Max, XFA_ATTRIBUTETYPE_Integer, (FX_LPVOID)1},
{XFA_ELEMENT_NumberSymbol, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (FX_LPVOID)XFA_ATTRIBUTEENUM_Decimal},
};
-extern const FX_INT32 g_iXFANotsureCount = sizeof(g_XFANotsureAttributes) / sizeof(XFA_NOTSUREATTRIBUTE);
+extern const int32_t g_iXFANotsureCount = sizeof(g_XFANotsureAttributes) / sizeof(XFA_NOTSUREATTRIBUTE);
extern const XFA_ELEMENTINFO g_XFAElementData[] = {
{0x23ee3, L"ps", XFA_ELEMENT_Ps, XFA_XDPPACKET_Config, XFA_OBJECTTYPE_Node},
{0x25363, L"to", XFA_ELEMENT_To, XFA_XDPPACKET_Config, XFA_OBJECTTYPE_ContentNode},
@@ -914,7 +914,7 @@ extern const XFA_ELEMENTINFO g_XFAElementData[] = {
{0xfcbd606c, L"tagged", XFA_ELEMENT_Tagged, XFA_XDPPACKET_Config, XFA_OBJECTTYPE_ContentNode},
{0xff063802, L"items", XFA_ELEMENT_Items, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_OBJECTTYPE_Node},
};
-extern const FX_INT32 g_iXFAElementCount = sizeof(g_XFAElementData) / sizeof(XFA_ELEMENTINFO);
+extern const int32_t g_iXFAElementCount = sizeof(g_XFAElementData) / sizeof(XFA_ELEMENTINFO);
extern const XFA_ELEMENTHIERARCHY g_XFAElementPropertyIndex[] = {
{0, 8}, {8, 0}, {8, 14}, {22, 0}, {22, 0}, {22, 6}, {28, 0}, {28, 0}, {28, 1}, {29, 3}, {32, 0}, {32, 0}, {32, 0}, {32, 3}, {35, 1}, {36, 0}, {36, 0}, {36, 2}, {38, 0}, {38, 0},
{38, 0}, {38, 4}, {42, 0}, {42, 0}, {42, 1}, {43, 0}, {43, 8}, {51, 19}, {70, 0}, {70, 0}, {70, 2}, {72, 1}, {73, 0}, {73, 2}, {75, 4}, {79, 1}, {80, 1}, {81, 0}, {81, 0}, {81, 3},
@@ -1040,7 +1040,7 @@ extern const XFA_ELEMENTHIERARCHY g_XFAElementAttributeIndex[] = {
{1037, 2}, {1039, 0}, {1039, 4}, {1043, 2}, {1045, 0}, {1045, 2}, {1047, 3}, {1050, 2}, {1052, 5}, {1057, 2}, {1059, 2}, {1061, 4}, {1065, 3}, {1068, 0}, {1068, 4}, {1072, 2}, {1074, 2}, {1076, 3}, {1079, 4}, {1083, 8},
{1091, 5}, {1096, 0}, {1096, 4}, {1100, 6}, {1106, 2}, {1108, 1}, {1109, 2}, {1111, 2}, {1113, 2}, {1115, 1}, {1116, 2}, {1118, 7},
};
-extern const FX_BYTE g_XFAElementAttributeData[] = {
+extern const uint8_t g_XFAElementAttributeData[] = {
XFA_ATTRIBUTE_Name, XFA_ATTRIBUTE_Desc, XFA_ATTRIBUTE_Lock, XFA_ATTRIBUTE_Desc, XFA_ATTRIBUTE_Lock, XFA_ATTRIBUTE_Id, XFA_ATTRIBUTE_Use, XFA_ATTRIBUTE_Usehref, XFA_ATTRIBUTE_Id, XFA_ATTRIBUTE_Name,
XFA_ATTRIBUTE_Max, XFA_ATTRIBUTE_Use, XFA_ATTRIBUTE_EofAction, XFA_ATTRIBUTE_CursorType, XFA_ATTRIBUTE_LockType, XFA_ATTRIBUTE_BofAction, XFA_ATTRIBUTE_Usehref, XFA_ATTRIBUTE_CursorLocation, XFA_ATTRIBUTE_Desc, XFA_ATTRIBUTE_Lock,
XFA_ATTRIBUTE_Id, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTE_Use, XFA_ATTRIBUTE_Relation, XFA_ATTRIBUTE_Relevant, XFA_ATTRIBUTE_Usehref, XFA_ATTRIBUTE_Desc, XFA_ATTRIBUTE_Lock, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTE_Id,
@@ -1172,7 +1172,7 @@ extern const XFA_PACKETINFO g_XFAPacketData[] = {
{0xcd309ff4, L"form", XFA_XDPPACKET_Form, L"http://www.xfa.org/schema/xfa-form/", XFA_XDPPACKET_FLAGS_NOMATCH | XFA_XDPPACKET_FLAGS_SUPPORTONE},
{0xe14c801c, L"connectionSet", XFA_XDPPACKET_ConnectionSet, L"http://www.xfa.org/schema/xfa-connection-set/", XFA_XDPPACKET_FLAGS_NOMATCH | XFA_XDPPACKET_FLAGS_SUPPORTONE},
};
-extern const FX_INT32 g_iXFAPacketCount = sizeof(g_XFAPacketData) / sizeof(XFA_PACKETINFO);
+extern const int32_t g_iXFAPacketCount = sizeof(g_XFAPacketData) / sizeof(XFA_PACKETINFO);
extern const XFA_SCRIPTHIERARCHY g_XFAScriptIndex[] = {
{0, 0, 0, 2, 316}, {0, 0, 2, 2, 316}, {0, 0, 4, 2, 316}, {0, 0, 6, 8, 316}, {0, 0, 14, 4, 316}, {0, 0, 18, 5, 317}, {0, 0, 23, 2, 316}, {0, 0, 25, 1, 316}, {0, 0, 26, 12, 316}, {0, 0, 38, 2, 316}, {0, 0, 40, 1, 316}, {0, 0, 41, 3, 316}, {0, 0, 44, 2, 316}, {0, 0, 46, 6, 316}, {0, 0, 52, 0, 316}, {0, 0, 52, 2, 319}, {0, 0, 54, 2, 316}, {0, 0, 56, 6, 316}, {0, 0, 62, 0, 316}, {0, 0, 62, 0, 316},
{0, 0, 62, 2, 316}, {0, 0, 64, 2, 316}, {0, 0, 66, 6, 316}, {0, 0, 72, 4, 316}, {0, 0, 76, 7, 316}, {0, 0, 83, 2, 320}, {0, 0, 85, 3, 316}, {0, 0, 88, 3, 316}, {0, 0, 91, 2, 320}, {0, 0, 93, 6, 320}, {0, 0, 99, 4, 316}, {0, 0, 103, 2, 316}, {0, 0, 105, 3, 319}, {0, 0, 108, 4, 316}, {0, 0, 112, 3, 316}, {0, 0, 115, 2, 316}, {0, 0, 117, 6, 316}, {0, 0, 123, 12, 316}, {0, 0, 135, 2, 316}, {0, 0, 137, 5, 316},
@@ -1240,7 +1240,7 @@ extern const XFA_METHODINFO g_SomMethodData[] = {
{0xe006a76b, L"assignNode", (XFA_METHOD_CALLBACK)&CXFA_Node::Script_NodeClass_AssignNode}, {0x7303fcea, L"getDelta", (XFA_METHOD_CALLBACK)&CXFA_Node::Script_ContainerClass_GetDelta}, {0xe7742c9d, L"getDeltas", (XFA_METHOD_CALLBACK)&CXFA_Node::Script_ContainerClass_GetDeltas},
{0x30ff6aad, L"clearErrorList", (XFA_METHOD_CALLBACK)&CXFA_Node::Script_ModelClass_ClearErrorList}, {0x712c6afa, L"createNode", (XFA_METHOD_CALLBACK)&CXFA_Node::Script_ModelClass_CreateNode}, {0x83a6411d, L"isCompatibleNS", (XFA_METHOD_CALLBACK)&CXFA_Node::Script_ModelClass_IsCompatibleNS},
};
-extern const FX_INT32 g_iSomMethodCount = sizeof(g_SomMethodData) / sizeof(XFA_METHODINFO);
+extern const int32_t g_iSomMethodCount = sizeof(g_SomMethodData) / sizeof(XFA_METHODINFO);
extern const _XFA_SCRIPTATTRIBUTEINFO g_SomAttributeData[] = {
{0xbe52dfbf, L"desc", (XFA_ATTRIBUTE_CALLBACK)&CXFA_Node::Script_Attribute_String, XFA_ATTRIBUTE_Desc, XFA_SCRIPT_Basic}, {0xf6b47749, L"lock", (XFA_ATTRIBUTE_CALLBACK)&CXFA_Node::Script_Attribute_BOOL, XFA_ATTRIBUTE_Lock, XFA_SCRIPT_Basic}, {0xbe52dfbf, L"desc", (XFA_ATTRIBUTE_CALLBACK)&CXFA_Node::Script_Attribute_String, XFA_ATTRIBUTE_Desc, XFA_SCRIPT_Basic},
{0xf6b47749, L"lock", (XFA_ATTRIBUTE_CALLBACK)&CXFA_Node::Script_Attribute_BOOL, XFA_ATTRIBUTE_Lock, XFA_SCRIPT_Basic}, {0xc0811ed, L"use", (XFA_ATTRIBUTE_CALLBACK)&CXFA_Node::Script_Attribute_String, XFA_ATTRIBUTE_Use, XFA_SCRIPT_Basic}, {0xbc254332, L"usehref", (XFA_ATTRIBUTE_CALLBACK)&CXFA_Node::Script_Attribute_String, XFA_ATTRIBUTE_Usehref, XFA_SCRIPT_Basic},
@@ -1603,4 +1603,4 @@ extern const _XFA_SCRIPTATTRIBUTEINFO g_SomAttributeData[] = {
{0x97c1c65, L"context", (XFA_ATTRIBUTE_CALLBACK)&CXFA_Node::Script_ModelClass_Context, -1, XFA_SCRIPT_Object}, {0x58be2870, L"aliasNode", (XFA_ATTRIBUTE_CALLBACK)&CXFA_Node::Script_ModelClass_AliasNode, -1, XFA_SCRIPT_Object}, {0xa52682bd, L"{default}", (XFA_ATTRIBUTE_CALLBACK)&CXFA_Node::Script_Som_DefaultValue, -1, XFA_SCRIPT_Basic},
{0xd6e27f1d, L"value", (XFA_ATTRIBUTE_CALLBACK)&CXFA_Node::Script_Som_DefaultValue, -1, XFA_SCRIPT_Basic},
};
-extern const FX_INT32 g_iSomAttributeCount = sizeof(g_SomAttributeData) / sizeof(XFA_ATTRIBUTEINFO);
+extern const int32_t g_iSomAttributeCount = sizeof(g_SomAttributeData) / sizeof(XFA_ATTRIBUTEINFO);
diff --git a/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp b/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp
index d97ec44fc8..618b7a2945 100644
--- a/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp
@@ -18,36 +18,36 @@
#include "xfa_debug_parser.h"
#include "xfa_basic_imp.h"
extern const XFA_PACKETINFO g_XFAPacketData[];
-extern const FX_INT32 g_iXFAPacketCount;
+extern const int32_t g_iXFAPacketCount;
extern const XFA_ATTRIBUTEENUMINFO g_XFAEnumData[];
-extern const FX_INT32 g_iXFAEnumCount;
+extern const int32_t g_iXFAEnumCount;
extern const XFA_ATTRIBUTEINFO g_XFAAttributeData[];
-extern const FX_INT32 g_iXFAAttributeCount;
+extern const int32_t g_iXFAAttributeCount;
extern const XFA_ELEMENTINFO g_XFAElementData[];
-extern const FX_INT32 g_iXFAElementCount;
+extern const int32_t g_iXFAElementCount;
extern const XFA_ELEMENTHIERARCHY g_XFAElementChildrenIndex[];
extern const FX_WORD g_XFAElementChildrenData[];
extern const XFA_ELEMENTHIERARCHY g_XFAElementAttributeIndex[];
-extern const FX_BYTE g_XFAElementAttributeData[];
+extern const uint8_t g_XFAElementAttributeData[];
extern const XFA_NOTSUREATTRIBUTE g_XFANotsureAttributes[];
-extern const FX_INT32 g_iXFANotsureCount;
+extern const int32_t g_iXFANotsureCount;
extern const XFA_ELEMENTHIERARCHY g_XFAElementPropertyIndex[];
extern const XFA_PROPERTY g_XFAElementPropertyData[];
extern const XFA_SCRIPTHIERARCHY g_XFAScriptIndex[];
extern const XFA_METHODINFO g_SomMethodData[];
-extern const FX_INT32 g_iSomMethodCount;
+extern const int32_t g_iSomMethodCount;
extern const XFA_SCRIPTATTRIBUTEINFO g_SomAttributeData[];
-extern const FX_INT32 g_iSomAttributeCount;
+extern const int32_t g_iSomAttributeCount;
XFA_LPCPACKETINFO XFA_GetPacketByName(FX_WSTR wsName)
{
- FX_INT32 iLength = wsName.GetLength();
+ int32_t iLength = wsName.GetLength();
if (iLength == 0) {
return NULL;
}
- FX_UINT32 uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength);
- FX_INT32 iStart = 0, iEnd = g_iXFAPacketCount - 1;
+ uint32_t uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength);
+ int32_t iStart = 0, iEnd = g_iXFAPacketCount - 1;
do {
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iMid = (iStart + iEnd) / 2;
XFA_LPCPACKETINFO pInfo = g_XFAPacketData + iMid;
if (uHash == pInfo->uHash) {
return pInfo;
@@ -61,9 +61,9 @@ XFA_LPCPACKETINFO XFA_GetPacketByName(FX_WSTR wsName)
}
XFA_LPCPACKETINFO XFA_GetPacketByID(FX_DWORD dwPacket)
{
- FX_INT32 iStart = 0, iEnd = g_iXFAPacketCount - 1;
+ int32_t iStart = 0, iEnd = g_iXFAPacketCount - 1;
do {
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iMid = (iStart + iEnd) / 2;
FX_DWORD dwFind = (g_XFAPacketData + iMid)->eName;
if (dwPacket == dwFind) {
return g_XFAPacketData + iMid;
@@ -77,14 +77,14 @@ XFA_LPCPACKETINFO XFA_GetPacketByID(FX_DWORD dwPacket)
}
XFA_LPCATTRIBUTEENUMINFO XFA_GetAttributeEnumByName(FX_WSTR wsName)
{
- FX_INT32 iLength = wsName.GetLength();
+ int32_t iLength = wsName.GetLength();
if (iLength == 0) {
return NULL;
}
- FX_UINT32 uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength);
- FX_INT32 iStart = 0, iEnd = g_iXFAEnumCount - 1;
+ uint32_t uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength);
+ int32_t iStart = 0, iEnd = g_iXFAEnumCount - 1;
do {
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iMid = (iStart + iEnd) / 2;
XFA_LPCATTRIBUTEENUMINFO pInfo = g_XFAEnumData + iMid;
if (uHash == pInfo->uHash) {
return pInfo;
@@ -100,20 +100,20 @@ XFA_LPCATTRIBUTEENUMINFO XFA_GetAttributeEnumByID(XFA_ATTRIBUTEENUM eName)
{
return g_XFAEnumData + eName;
}
-FX_INT32 XFA_GetAttributeCount()
+int32_t XFA_GetAttributeCount()
{
return g_iXFAAttributeCount;
}
XFA_LPCATTRIBUTEINFO XFA_GetAttributeByName(FX_WSTR wsName)
{
- FX_INT32 iLength = wsName.GetLength();
+ int32_t iLength = wsName.GetLength();
if (iLength == 0) {
return NULL;
}
- FX_UINT32 uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength);
- FX_INT32 iStart = 0, iEnd = g_iXFAAttributeCount - 1;
+ uint32_t uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength);
+ int32_t iStart = 0, iEnd = g_iXFAAttributeCount - 1;
do {
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iMid = (iStart + iEnd) / 2;
XFA_LPCATTRIBUTEINFO pInfo = g_XFAAttributeData + iMid;
if (uHash == pInfo->uHash) {
return pInfo;
@@ -154,7 +154,7 @@ XFA_ATTRIBUTEENUM XFA_GetAttributeDefaultValue_Enum(XFA_ELEMENT eElement, XFA_AT
{
FX_LPVOID pValue;
if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute, XFA_ATTRIBUTETYPE_Enum, dwPacket)) {
- return (XFA_ATTRIBUTEENUM)(FX_UINTPTR)pValue;
+ return (XFA_ATTRIBUTEENUM)(uintptr_t)pValue;
}
return XFA_ATTRIBUTEENUM_Unknown;
}
@@ -170,15 +170,15 @@ FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT eElement, XFA_ATTRIBUTE
{
FX_LPVOID pValue;
if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute, XFA_ATTRIBUTETYPE_Boolean, dwPacket)) {
- return (FX_BOOL)(FX_UINTPTR)pValue;
+ return (FX_BOOL)(uintptr_t)pValue;
}
return FALSE;
}
-FX_INT32 XFA_GetAttributeDefaultValue_Integer(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket)
+int32_t XFA_GetAttributeDefaultValue_Integer(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket)
{
FX_LPVOID pValue;
if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute, XFA_ATTRIBUTETYPE_Integer, dwPacket)) {
- return (FX_INT32)(FX_UINTPTR)pValue;
+ return (int32_t)(uintptr_t)pValue;
}
return 0;
}
@@ -190,20 +190,20 @@ CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_ELEMENT eElement, XFA_
}
return CXFA_Measurement();
}
-FX_INT32 XFA_GetElementCount()
+int32_t XFA_GetElementCount()
{
return g_iXFAElementCount;
}
XFA_LPCELEMENTINFO XFA_GetElementByName(FX_WSTR wsName)
{
- FX_INT32 iLength = wsName.GetLength();
+ int32_t iLength = wsName.GetLength();
if (iLength == 0) {
return NULL;
}
- FX_UINT32 uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength);
- FX_INT32 iStart = 0, iEnd = g_iXFAElementCount - 1;
+ uint32_t uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength);
+ int32_t iStart = 0, iEnd = g_iXFAElementCount - 1;
do {
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iMid = (iStart + iEnd) / 2;
XFA_LPCELEMENTINFO pInfo = g_XFAElementData + iMid;
if (uHash == pInfo->uHash) {
return pInfo;
@@ -219,7 +219,7 @@ XFA_LPCELEMENTINFO XFA_GetElementByID(XFA_ELEMENT eName)
{
return (eName < g_iXFAElementCount) ? (g_XFAElementData + eName) : NULL;
}
-FX_LPCWORD XFA_GetElementChildren(XFA_ELEMENT eElement, FX_INT32 &iCount)
+FX_LPCWORD XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t &iCount)
{
if (eElement >= g_iXFAElementCount) {
return NULL;
@@ -228,7 +228,7 @@ FX_LPCWORD XFA_GetElementChildren(XFA_ELEMENT eElement, FX_INT32 &iCount)
iCount = pElement->wCount;
return g_XFAElementChildrenData + pElement->wStart;
}
-FX_LPCBYTE XFA_GetElementAttributes(XFA_ELEMENT eElement, FX_INT32 &iCount)
+FX_LPCBYTE XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t &iCount)
{
if (eElement >= g_iXFAElementCount) {
return NULL;
@@ -239,13 +239,13 @@ FX_LPCBYTE XFA_GetElementAttributes(XFA_ELEMENT eElement, FX_INT32 &iCount)
}
XFA_LPCATTRIBUTEINFO XFA_GetAttributeOfElement(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, FX_DWORD dwPacket)
{
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
FX_LPCBYTE pAttr = XFA_GetElementAttributes(eElement, iCount);
if (pAttr == NULL || iCount < 1) {
return NULL;
}
- CFX_DSPATemplate<FX_BYTE> search;
- FX_INT32 index = search.Lookup(eAttribute, pAttr, iCount);
+ CFX_DSPATemplate<uint8_t> search;
+ int32_t index = search.Lookup(eAttribute, pAttr, iCount);
if (index < 0) {
return NULL;
}
@@ -258,13 +258,13 @@ XFA_LPCATTRIBUTEINFO XFA_GetAttributeOfElement(XFA_ELEMENT eElement, XFA_ATTRIBU
}
XFA_LPCELEMENTINFO XFA_GetChildOfElement(XFA_ELEMENT eElement, XFA_ELEMENT eChild, FX_DWORD dwPacket)
{
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
FX_LPCWORD pChild = XFA_GetElementChildren(eElement, iCount);
if (pChild == NULL || iCount < 1) {
return NULL;
}
CFX_DSPATemplate<FX_WORD> search;
- FX_INT32 index = search.Lookup(eChild, pChild, iCount);
+ int32_t index = search.Lookup(eChild, pChild, iCount);
if (index < 0) {
return NULL;
}
@@ -275,7 +275,7 @@ XFA_LPCELEMENTINFO XFA_GetChildOfElement(XFA_ELEMENT eElement, XFA_ELEMENT eChil
}
return (dwPacket & pInfo->dwPackets) ? pInfo : NULL;
}
-XFA_LPCPROPERTY XFA_GetElementProperties(XFA_ELEMENT eElement, FX_INT32 &iCount)
+XFA_LPCPROPERTY XFA_GetElementProperties(XFA_ELEMENT eElement, int32_t &iCount)
{
if (eElement >= g_iXFAElementCount) {
return NULL;
@@ -286,12 +286,12 @@ XFA_LPCPROPERTY XFA_GetElementProperties(XFA_ELEMENT eElement, FX_INT32 &iCount)
}
XFA_LPCPROPERTY XFA_GetPropertyOfElement(XFA_ELEMENT eElement, XFA_ELEMENT eProperty, FX_DWORD dwPacket)
{
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
XFA_LPCPROPERTY pProperty = XFA_GetElementProperties(eElement, iCount);
if (pProperty == NULL || iCount < 1) {
return NULL;
}
- FX_INT32 iStart = 0, iEnd = iCount - 1, iMid;
+ int32_t iStart = 0, iEnd = iCount - 1, iMid;
do {
iMid = (iStart + iEnd) / 2;
XFA_ELEMENT eName = (XFA_ELEMENT)pProperty[iMid].eName;
@@ -315,9 +315,9 @@ XFA_LPCPROPERTY XFA_GetPropertyOfElement(XFA_ELEMENT eElement, XFA_ELEMENT eProp
}
XFA_LPCNOTSUREATTRIBUTE XFA_GetNotsureAttribute(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, XFA_ATTRIBUTETYPE eType)
{
- FX_INT32 iStart = 0, iEnd = g_iXFANotsureCount - 1;
+ int32_t iStart = 0, iEnd = g_iXFANotsureCount - 1;
do {
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iMid = (iStart + iEnd) / 2;
XFA_LPCNOTSUREATTRIBUTE pAttr = g_XFANotsureAttributes + iMid;
if (eElement == pAttr->eElement) {
if (pAttr->eAttribute == eAttribute) {
@@ -326,7 +326,7 @@ XFA_LPCNOTSUREATTRIBUTE XFA_GetNotsureAttribute(XFA_ELEMENT eElement, XFA_ATTRIB
}
return NULL;
} else {
- FX_INT32 iBefore = iMid - 1;
+ int32_t iBefore = iMid - 1;
if(iBefore >= 0) {
pAttr = g_XFANotsureAttributes + iBefore;
while(eElement == pAttr->eElement) {
@@ -343,7 +343,7 @@ XFA_LPCNOTSUREATTRIBUTE XFA_GetNotsureAttribute(XFA_ELEMENT eElement, XFA_ATTRIB
pAttr = g_XFANotsureAttributes + iBefore;
}
}
- FX_INT32 iAfter = iMid + 1;
+ int32_t iAfter = iMid + 1;
if(iAfter <= g_iXFANotsureCount - 1) {
pAttr = g_XFANotsureAttributes + iAfter;
while(eElement == pAttr->eElement) {
@@ -370,28 +370,28 @@ XFA_LPCNOTSUREATTRIBUTE XFA_GetNotsureAttribute(XFA_ELEMENT eElement, XFA_ATTRIB
} while (iStart <= iEnd);
return NULL;
}
-FX_INT32 XFA_GetMethodCount()
+int32_t XFA_GetMethodCount()
{
return g_iSomMethodCount;
}
XFA_LPCMETHODINFO XFA_GetMethodByName(XFA_ELEMENT eElement, FX_WSTR wsMethodName)
{
- FX_INT32 iLength = wsMethodName.GetLength();
+ int32_t iLength = wsMethodName.GetLength();
if (iLength == 0) {
return NULL;
}
- FX_INT32 iElementIndex = eElement;
+ int32_t iElementIndex = eElement;
while(iElementIndex != -1) {
XFA_LPCSCRIPTHIERARCHY scriptIndex = g_XFAScriptIndex + iElementIndex;
- FX_INT32 icount = scriptIndex->wMethodCount;
+ int32_t icount = scriptIndex->wMethodCount;
if(icount == 0) {
iElementIndex = scriptIndex->wParentIndex;
continue;
}
- FX_UINT32 uHash = FX_HashCode_String_GetW(wsMethodName.GetPtr(), iLength);
- FX_INT32 iStart = scriptIndex->wMethodStart, iEnd = iStart + icount - 1;
+ uint32_t uHash = FX_HashCode_String_GetW(wsMethodName.GetPtr(), iLength);
+ int32_t iStart = scriptIndex->wMethodStart, iEnd = iStart + icount - 1;
do {
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iMid = (iStart + iEnd) / 2;
XFA_LPCMETHODINFO pInfo = g_SomMethodData + iMid;
if (uHash == pInfo->uHash) {
return pInfo;
@@ -407,22 +407,22 @@ XFA_LPCMETHODINFO XFA_GetMethodByName(XFA_ELEMENT eElement, FX_WSTR wsMethodName
}
XFA_LPCSCRIPTATTRIBUTEINFO XFA_GetScriptAttributeByName(XFA_ELEMENT eElement, FX_WSTR wsAttributeName)
{
- FX_INT32 iLength = wsAttributeName.GetLength();
+ int32_t iLength = wsAttributeName.GetLength();
if (iLength == 0) {
return NULL;
}
- FX_INT32 iElementIndex = eElement;
+ int32_t iElementIndex = eElement;
while(iElementIndex != -1) {
XFA_LPCSCRIPTHIERARCHY scriptIndex = g_XFAScriptIndex + iElementIndex;
- FX_INT32 icount = scriptIndex->wAttributeCount;
+ int32_t icount = scriptIndex->wAttributeCount;
if(icount == 0) {
iElementIndex = scriptIndex->wParentIndex;
continue;
}
- FX_UINT32 uHash = FX_HashCode_String_GetW(wsAttributeName.GetPtr(), iLength);
- FX_INT32 iStart = scriptIndex->wAttributeStart, iEnd = iStart + icount - 1;
+ uint32_t uHash = FX_HashCode_String_GetW(wsAttributeName.GetPtr(), iLength);
+ int32_t iStart = scriptIndex->wAttributeStart, iEnd = iStart + icount - 1;
do {
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iMid = (iStart + iEnd) / 2;
XFA_LPCSCRIPTATTRIBUTEINFO pInfo = g_SomAttributeData + iMid;
if (uHash == pInfo->uHash) {
return pInfo;
@@ -443,8 +443,8 @@ void CXFA_Measurement::Set(FX_WSTR wsMeasure)
m_eUnit = XFA_UNIT_Unknown;
return;
}
- FX_INT32 iUsedLen = 0;
- FX_INT32 iOffset = (wsMeasure.GetAt(0) == L'=') ? 1 : 0;
+ int32_t iUsedLen = 0;
+ int32_t iOffset = (wsMeasure.GetAt(0) == L'=') ? 1 : 0;
FX_FLOAT fValue = FX_wcstof(wsMeasure.GetPtr() + iOffset, wsMeasure.GetLength() - iOffset, &iUsedLen);
XFA_UNIT eUnit = GetUnit(wsMeasure.Mid(iOffset + iUsedLen));
Set(fValue, eUnit);
@@ -581,11 +581,11 @@ FX_DWORD CXFA_WideTextRead::GetAccessModes() const
{
return FX_STREAMACCESS_Read | FX_STREAMACCESS_Text;
}
-FX_INT32 CXFA_WideTextRead::GetLength() const
+int32_t CXFA_WideTextRead::GetLength() const
{
return m_wsBuffer.GetLength() * sizeof(FX_WCHAR);
}
-FX_INT32 CXFA_WideTextRead::Seek(FX_STREAMSEEK eSeek, FX_INT32 iOffset)
+int32_t CXFA_WideTextRead::Seek(FX_STREAMSEEK eSeek, int32_t iOffset)
{
switch (eSeek) {
case FX_STREAMSEEK_Begin:
@@ -606,7 +606,7 @@ FX_INT32 CXFA_WideTextRead::Seek(FX_STREAMSEEK eSeek, FX_INT32 iOffset)
}
return GetPosition();
}
-FX_INT32 CXFA_WideTextRead::GetPosition()
+int32_t CXFA_WideTextRead::GetPosition()
{
return m_iPosition * sizeof(FX_WCHAR);
}
@@ -614,7 +614,7 @@ FX_BOOL CXFA_WideTextRead::IsEOF() const
{
return m_iPosition >= m_wsBuffer.GetLength();
}
-FX_INT32 CXFA_WideTextRead::ReadString(FX_LPWSTR pStr, FX_INT32 iMaxLength, FX_BOOL &bEOS, FX_INT32 const *pByteSize )
+int32_t CXFA_WideTextRead::ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize )
{
if (iMaxLength > m_wsBuffer.GetLength() - m_iPosition) {
iMaxLength = m_wsBuffer.GetLength() - m_iPosition;
diff --git a/xfa/src/fxfa/src/parser/xfa_basic_imp.h b/xfa/src/fxfa/src/parser/xfa_basic_imp.h
index 71bcbb6167..cbffe4e635 100644
--- a/xfa/src/fxfa/src/parser/xfa_basic_imp.h
+++ b/xfa/src/fxfa/src/parser/xfa_basic_imp.h
@@ -22,31 +22,31 @@ public:
virtual IFX_Stream* Retain();
virtual FX_DWORD GetAccessModes() const;
- virtual FX_INT32 GetLength() const;
- virtual FX_INT32 Seek(FX_STREAMSEEK eSeek, FX_INT32 iOffset);
- virtual FX_INT32 GetPosition();
+ virtual int32_t GetLength() const;
+ virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset);
+ virtual int32_t GetPosition();
virtual FX_BOOL IsEOF() const;
- virtual FX_INT32 ReadData(FX_LPBYTE pBuffer, FX_INT32 iBufferSize)
+ virtual int32_t ReadData(FX_LPBYTE pBuffer, int32_t iBufferSize)
{
return 0;
}
- virtual FX_INT32 ReadString(FX_LPWSTR pStr, FX_INT32 iMaxLength, FX_BOOL &bEOS, FX_INT32 const *pByteSize = NULL);
- virtual FX_INT32 WriteData(FX_LPCBYTE pBuffer, FX_INT32 iBufferSize)
+ virtual int32_t ReadString(FX_LPWSTR pStr, int32_t iMaxLength, FX_BOOL &bEOS, int32_t const *pByteSize = NULL);
+ virtual int32_t WriteData(FX_LPCBYTE pBuffer, int32_t iBufferSize)
{
return 0;
}
- virtual FX_INT32 WriteString(FX_LPCWSTR pStr, FX_INT32 iLength)
+ virtual int32_t WriteString(FX_LPCWSTR pStr, int32_t iLength)
{
return 0;
}
virtual void Flush() {}
- virtual FX_BOOL SetLength(FX_INT32 iLength)
+ virtual FX_BOOL SetLength(int32_t iLength)
{
return FALSE;
}
- virtual FX_INT32 GetBOM(FX_BYTE bom[4]) const
+ virtual int32_t GetBOM(uint8_t bom[4]) const
{
return 0;
}
@@ -56,7 +56,7 @@ public:
virtual void Lock() {}
virtual void Unlock() {}
- virtual IFX_Stream* CreateSharedStream(FX_DWORD dwAccess, FX_INT32 iOffset, FX_INT32 iLength)
+ virtual IFX_Stream* CreateSharedStream(FX_DWORD dwAccess, int32_t iOffset, int32_t iLength)
{
return NULL;
}
@@ -67,7 +67,7 @@ public:
}
protected:
CFX_WideString m_wsBuffer;
- FX_INT32 m_iPosition;
- FX_INT32 m_iRefCount;
+ int32_t m_iPosition;
+ int32_t m_iRefCount;
};
#endif
diff --git a/xfa/src/fxfa/src/parser/xfa_document_datamerger_imp.cpp b/xfa/src/fxfa/src/parser/xfa_document_datamerger_imp.cpp
index f496e484ce..4e9e8eda30 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_document_datamerger_imp.cpp
@@ -21,7 +21,7 @@
#include "xfa_document_datadescription_imp.h"
#include "xfa_document_datamerger_imp.h"
#include "xfa_document_layout_imp.h"
-static FX_BOOL XFA_GetOccurInfo(CXFA_Node* pOccurNode, FX_INT32& iMin, FX_INT32& iMax, FX_INT32& iInit)
+static FX_BOOL XFA_GetOccurInfo(CXFA_Node* pOccurNode, int32_t& iMin, int32_t& iMax, int32_t& iInit)
{
if(!pOccurNode) {
return FALSE;
@@ -134,11 +134,11 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, CXFA_Node* pDa
if (pWidgetData->GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect) {
CFX_WideStringArray wsSelTextArray;
pWidgetData->GetSelectedItemsValue(wsSelTextArray);
- FX_INT32 iSize = wsSelTextArray.GetSize();
+ int32_t iSize = wsSelTextArray.GetSize();
if (iSize >= 1) {
CXFA_Node *pValue = NULL;
IFDE_XMLNode *pValueXMLNode = NULL;
- for (FX_INT32 i = 0; i < iSize; i++) {
+ for (int32_t i = 0; i < iSize; i++) {
pValue = pDataNode->CreateSamePacketNode(XFA_ELEMENT_DataValue);
pValue->SetCData(XFA_ATTRIBUTE_Name, FX_WSTRC(L"value"));
pValueXMLNode = pValue->CreateXMLMappingNode();
@@ -277,11 +277,11 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, CXFA_Node* pDa
if (pWidgetData->GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect) {
CXFA_NodeArray items;
pDataNode->GetNodeList(items);
- FX_INT32 iCounts = items.GetSize();
+ int32_t iCounts = items.GetSize();
if (iCounts > 0) {
wsNormailizeValue.Empty();
CFX_WideString wsItem;
- for (FX_INT32 i = 0; i < iCounts; i++) {
+ for (int32_t i = 0; i < iCounts; i++) {
items[i]->TryContent(wsItem);
wsItem = (iCounts == 1) ? wsItem : wsItem + FX_WSTRC(L"\n");
wsNormailizeValue += wsItem;
@@ -545,7 +545,7 @@ static CXFA_Node* XFA_DataMerge_FindMatchingDataNode(CXFA_Document* pDocument, C
continue;
}
CXFA_Node* pTemplateNodeOccur = pCurTemplateNode->GetFirstChildByClass(XFA_ELEMENT_Occur);
- FX_INT32 iMin, iMax, iInit;
+ int32_t iMin, iMax, iInit;
if(pTemplateNodeOccur && XFA_GetOccurInfo(pTemplateNodeOccur, iMin, iMax, iInit) && iMax == 0) {
pCurTemplateNode = pIterator->MoveToNext();
continue;
@@ -609,10 +609,10 @@ static CXFA_Node* XFA_DataMerge_FindMatchingDataNode(CXFA_Document* pDocument, C
}
static void XFA_DataMerge_SortRecurseRecord(CFX_ArrayTemplate<XFA_DataMerge_RecurseRecord>& rgRecords, CXFA_Node* pDataScope, FX_BOOL bChoiceMode = FALSE)
{
- FX_INT32 iCount = rgRecords.GetSize();
+ int32_t iCount = rgRecords.GetSize();
CFX_ArrayTemplate<XFA_DataMerge_RecurseRecord> rgResultRecord;
for (CXFA_Node* pChildNode = pDataScope->GetNodeItem(XFA_NODEITEM_FirstChild); pChildNode; pChildNode = pChildNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
- for(FX_INT32 i = 0; i < iCount; i ++) {
+ for(int32_t i = 0; i < iCount; i ++) {
CXFA_Node* pNode = rgRecords[i].pDataChild;
if (pChildNode == pNode) {
XFA_DataMerge_RecurseRecord sNewRecord = {rgRecords[i].pTemplateChild, pNode};
@@ -628,7 +628,7 @@ static void XFA_DataMerge_SortRecurseRecord(CFX_ArrayTemplate<XFA_DataMerge_Recu
}
if (rgResultRecord.GetSize() > 0) {
if (!bChoiceMode) {
- for (FX_INT32 i = 0; i < iCount; i++) {
+ for (int32_t i = 0; i < iCount; i++) {
XFA_DataMerge_RecurseRecord sNewRecord = {rgRecords[i].pTemplateChild, rgRecords[i].pDataChild};
rgResultRecord.Add(sNewRecord);
}
@@ -669,12 +669,12 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet(CXFA_Document* pDocumen
}
}
}
- FX_INT32 iMax = 1, iInit = 1, iMin = 1;
+ int32_t iMax = 1, iInit = 1, iMin = 1;
if(!bOneInstance) {
XFA_GetOccurInfo(pOccurNode, iMin, iMax, iInit);
}
XFA_ATTRIBUTEENUM eRelation = eElement == XFA_ELEMENT_SubformSet ? pTemplateNode->GetEnum(XFA_ATTRIBUTE_Relation) : XFA_ATTRIBUTEENUM_Ordered;
- FX_INT32 iCurRepeatIndex = 0;
+ int32_t iCurRepeatIndex = 0;
XFA_ATTRIBUTEENUM eParentBindMatch = XFA_ATTRIBUTEENUM_None;
if (bDataMerge) {
CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFAContainerNode> sNodeIterator(pTemplateNode);
@@ -702,7 +702,7 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet(CXFA_Document* pDocumen
subformArray.Add(pSubformNode);
}
FX_POSITION position = subformMapArray.GetStartPosition();
- for(FX_INT32 iIndex = 0; iIndex < subformArray.GetSize(); iIndex ++) {
+ for(int32_t iIndex = 0; iIndex < subformArray.GetSize(); iIndex ++) {
CXFA_Node* pSubform = subformArray[iIndex];
CXFA_Node* pDataNode = (CXFA_Node*)subformMapArray.GetValueAt(pSubform);
for (CXFA_Node *pTemplateChild = pTemplateNode->GetNodeItem(XFA_NODEITEM_FirstChild); pTemplateChild; pTemplateChild = pTemplateChild->GetNodeItem(XFA_NODEITEM_NextSibling)) {
@@ -762,11 +762,11 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet(CXFA_Document* pDocumen
case XFA_ATTRIBUTEENUM_Unordered: {
if(rgItemMatchList.GetSize()) {
XFA_DataMerge_SortRecurseRecord(rgItemMatchList, pDataScope);
- for(FX_INT32 i = 0, count = rgItemMatchList.GetSize(); i < count; i ++) {
+ for(int32_t i = 0, count = rgItemMatchList.GetSize(); i < count; i ++) {
pDocument->DataMerge_CopyContainer(rgItemMatchList[i].pTemplateChild, pSubformSetNode, pDataScope);
}
}
- for(FX_INT32 i = 0, count = rgItemUnmatchList.GetSize(); i < count; i ++) {
+ for(int32_t i = 0, count = rgItemUnmatchList.GetSize(); i < count; i ++) {
pDocument->DataMerge_CopyContainer(rgItemUnmatchList[i], pSubformSetNode, pDataScope);
}
}
@@ -790,7 +790,7 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet(CXFA_Document* pDocumen
}
}
if(iCurRepeatIndex == 0 && bAccessedDataDOM == FALSE) {
- FX_INT32 iLimit = iMax;
+ int32_t iLimit = iMax;
if (pInstMgrNode && pTemplateNode->GetNameHash() == 0) {
iLimit = subformArray.GetSize();
if (iLimit < iMin) {
@@ -823,7 +823,7 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet(CXFA_Document* pDocumen
}
}
}
- FX_INT32 iMinimalLimit = iCurRepeatIndex == 0 ? iInit : iMin;
+ int32_t iMinimalLimit = iCurRepeatIndex == 0 ? iInit : iMin;
for (; iCurRepeatIndex < iMinimalLimit; iCurRepeatIndex++) {
CXFA_Node* pSubformSetNode = XFA_NodeMerge_CloneOrMergeContainer(pDocument, pFormParentNode, pTemplateNode, FALSE, pSearchArray);
FXSYS_assert(pSubformSetNode);
@@ -1111,7 +1111,7 @@ void CXFA_Document::DataMerge_UpdateBindingRelations(CXFA_Node* pFormUpdateRoot)
}
CXFA_Node * CXFA_Document::GetNotBindNode(CXFA_ObjArray& arrayNodes)
{
- for(FX_INT32 i = 0; i < arrayNodes.GetSize(); i++) {
+ for(int32_t i = 0; i < arrayNodes.GetSize(); i++) {
CXFA_Object* pObject = arrayNodes[i];
if(!pObject->IsNode()) {
continue;
diff --git a/xfa/src/fxfa/src/parser/xfa_document_imp.cpp b/xfa/src/fxfa/src/parser/xfa_document_imp.cpp
index ad1ff99253..d634079f58 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_document_imp.cpp
@@ -282,9 +282,9 @@ XFA_VERSION CXFA_Document::RecognizeXFAVersionNumber(CFX_WideString& wsTemplateN
if(nDotPos == (FX_STRSIZE)-1) {
return XFA_VERSION_UNKNOWN;
}
- FX_INT8 iMajor = FXSYS_wtoi(wsTemplateNS.Mid(nPrefixLength, nDotPos - nPrefixLength));
- FX_INT8 iMinor = FXSYS_wtoi(wsTemplateNS.Mid(nDotPos + 1, wsTemplateNS.GetLength() - nDotPos - 2));
- XFA_VERSION eVersion = (XFA_VERSION)((FX_INT32)iMajor * 100 + iMinor);
+ int8_t iMajor = FXSYS_wtoi(wsTemplateNS.Mid(nPrefixLength, nDotPos - nPrefixLength));
+ int8_t iMinor = FXSYS_wtoi(wsTemplateNS.Mid(nDotPos + 1, wsTemplateNS.GetLength() - nDotPos - 2));
+ XFA_VERSION eVersion = (XFA_VERSION)((int32_t)iMajor * 100 + iMinor);
if(eVersion < XFA_VERSION_MIN || eVersion > XFA_VERSION_MAX) {
return XFA_VERSION_UNKNOWN;
}
@@ -401,7 +401,7 @@ void CXFA_Document::DoProtoMerge()
if(!wsSOM.IsEmpty()) {
FX_DWORD dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Attributes | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings;
XFA_RESOLVENODE_RS resoveNodeRS;
- FX_INT32 iRet = m_pScriptContext->ResolveObjects(pUseHrefNode, wsSOM, resoveNodeRS, dwFlag);
+ int32_t iRet = m_pScriptContext->ResolveObjects(pUseHrefNode, wsSOM, resoveNodeRS, dwFlag);
if(iRet > 0 && resoveNodeRS.nodes[0]->IsNode()) {
pProtoNode = (CXFA_Node*)resoveNodeRS.nodes[0];
}
diff --git a/xfa/src/fxfa/src/parser/xfa_document_layout_imp.cpp b/xfa/src/fxfa/src/parser/xfa_document_layout_imp.cpp
index 5ca9bb7a9b..03557dd548 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_layout_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_document_layout_imp.cpp
@@ -51,7 +51,7 @@ CXFA_Document* CXFA_LayoutProcessor::GetDocument() const
{
return m_pDocument;
}
-FX_INT32 CXFA_LayoutProcessor::StartLayout(FX_BOOL bForceRestart)
+int32_t CXFA_LayoutProcessor::StartLayout(FX_BOOL bForceRestart)
{
if (!bForceRestart && !IsNeedLayout()) {
return 100;
@@ -85,7 +85,7 @@ FX_INT32 CXFA_LayoutProcessor::StartLayout(FX_BOOL bForceRestart)
m_nProgressCounter = 1;
return 0;
}
-FX_INT32 CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause )
+int32_t CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause )
{
if (m_nProgressCounter < 1) {
return -1;
@@ -120,7 +120,7 @@ FX_BOOL CXFA_LayoutProcessor::IncrementLayout()
StartLayout(TRUE);
return DoLayout(NULL) == 100;
}
- for (FX_INT32 i = 0, c = m_rgChangedContainers.GetSize(); i < c; i++) {
+ for (int32_t i = 0, c = m_rgChangedContainers.GetSize(); i < c; i++) {
CXFA_Node *pNode = m_rgChangedContainers[i];
CXFA_Node *pParentNode = pNode->GetNodeItem(XFA_NODEITEM_Parent, XFA_OBJECTTYPE_ContainerNode);
if(!pParentNode) {
@@ -133,11 +133,11 @@ FX_BOOL CXFA_LayoutProcessor::IncrementLayout()
m_rgChangedContainers.RemoveAll();
return TRUE;
}
-FX_INT32 CXFA_LayoutProcessor::CountPages() const
+int32_t CXFA_LayoutProcessor::CountPages() const
{
return m_pLayoutPageMgr ? m_pLayoutPageMgr->GetPageCount() : 0;
}
-IXFA_LayoutPage* CXFA_LayoutProcessor::GetPage(FX_INT32 index) const
+IXFA_LayoutPage* CXFA_LayoutProcessor::GetPage(int32_t index) const
{
return m_pLayoutPageMgr ? m_pLayoutPageMgr->GetPage(index) : NULL;
}
diff --git a/xfa/src/fxfa/src/parser/xfa_document_layout_imp.h b/xfa/src/fxfa/src/parser/xfa_document_layout_imp.h
index b1c9e0bc14..0572b89dcc 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_layout_imp.h
+++ b/xfa/src/fxfa/src/parser/xfa_document_layout_imp.h
@@ -16,11 +16,11 @@ public:
CXFA_LayoutProcessor(CXFA_Document* pDocument);
~CXFA_LayoutProcessor();
virtual CXFA_Document* GetDocument() const;
- virtual FX_INT32 StartLayout(FX_BOOL bForceRestart = FALSE);
- virtual FX_INT32 DoLayout(IFX_Pause *pPause = NULL);
+ virtual int32_t StartLayout(FX_BOOL bForceRestart = FALSE);
+ virtual int32_t DoLayout(IFX_Pause *pPause = NULL);
virtual FX_BOOL IncrementLayout();
- virtual FX_INT32 CountPages() const;
- virtual IXFA_LayoutPage* GetPage(FX_INT32 index) const;
+ virtual int32_t CountPages() const;
+ virtual IXFA_LayoutPage* GetPage(int32_t index) const;
virtual CXFA_LayoutItem* GetLayoutItem(CXFA_Node *pFormItem);
void AddChangedContainer(CXFA_Node* pContainer);
@@ -46,7 +46,7 @@ protected:
CXFA_ItemLayoutProcessor* m_pRootItemLayoutProcessor;
CXFA_LayoutPageMgr* m_pLayoutPageMgr;
CXFA_NodeArray m_rgChangedContainers;
- FX_UINT32 m_nProgressCounter;
+ uint32_t m_nProgressCounter;
FX_BOOL m_bNeeLayout;
};
#endif
diff --git a/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp b/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp
index 6df2483a1e..f9c22e8149 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp
@@ -74,8 +74,8 @@ FX_BOOL CXFA_DataImporter::ImportData(IFX_FileRead* pDataDocument)
CFX_WideString XFA_ExportEncodeAttribute(const CFX_WideString& str)
{
CFX_WideTextBuf textBuf;
- FX_INT32 iLen = str.GetLength();
- for (FX_INT32 i = 0; i < iLen; i++) {
+ int32_t iLen = str.GetLength();
+ for (int32_t i = 0; i < iLen; i++) {
switch (str[i]) {
case '&':
textBuf << FX_WSTRC(L"&amp;");
@@ -101,8 +101,8 @@ CFX_WideString XFA_ExportEncodeAttribute(const CFX_WideString& str)
CFX_WideString XFA_ExportEncodeContent(FX_WSTR str)
{
CFX_WideTextBuf textBuf;
- FX_INT32 iLen = str.GetLength();
- for (FX_INT32 i = 0; i < iLen; i++) {
+ int32_t iLen = str.GetLength();
+ for (int32_t i = 0; i < iLen; i++) {
FX_WCHAR ch = str.GetAt(i);
if (!FDE_IsXMLValidChar(ch)) {
continue;
@@ -202,7 +202,7 @@ static void XFA_DataExporter_RecognizeXFAVersionNumber(CXFA_Node *pTemplateRoot,
static void XFA_DataExporter_RegenerateFormFile_Changed(CXFA_Node* pNode, CFX_WideTextBuf& buf, FX_BOOL bSaveXML = FALSE)
{
CFX_WideString wsAttrs;
- FX_INT32 iAttrs = 0;
+ int32_t iAttrs = 0;
FX_LPCBYTE pAttrs = XFA_GetElementAttributes(pNode->GetClassID(), iAttrs);
while (iAttrs--) {
XFA_LPCATTRIBUTEINFO pAttr = XFA_GetAttributeByID((XFA_ATTRIBUTE)pAttrs[iAttrs]);
@@ -251,8 +251,8 @@ static void XFA_DataExporter_RegenerateFormFile_Changed(CXFA_Node* pNode, CFX_Wi
break;
}
CFX_WideStringArray wsSelTextArray;
- FX_INT32 iStart = 0;
- FX_INT32 iEnd = wsRawValue.Find(L'\n', iStart);
+ int32_t iStart = 0;
+ int32_t iEnd = wsRawValue.Find(L'\n', iStart);
iEnd = (iEnd == -1) ? wsRawValue.GetLength() : iEnd;
while (iEnd >= iStart) {
wsSelTextArray.Add(wsRawValue.Mid(iStart, iEnd - iStart));
@@ -274,7 +274,7 @@ static void XFA_DataExporter_RegenerateFormFile_Changed(CXFA_Node* pNode, CFX_Wi
buf << FX_WSTRC(L"<");
buf << bodyTagName;
buf << FX_WSTRC(L" xmlns=\"\"\n>");
- for (FX_INT32 i = 0; i < wsSelTextArray.GetSize(); i++) {
+ for (int32_t i = 0; i < wsSelTextArray.GetSize(); i++) {
buf << FX_WSTRC(L"<value\n>");
buf << XFA_ExportEncodeContent(wsSelTextArray[i]);
buf << FX_WSTRC(L"</value\n>");
@@ -364,7 +364,7 @@ static void XFA_DataExporter_RegenerateFormFile_Container(CXFA_Node* pNode, IFX_
CFX_WideString wsOutput;
XFA_SaveAttribute(pNode, XFA_ATTRIBUTE_Name, FX_WSTRC(L"name"), TRUE, wsOutput);
CFX_WideString wsAttrs;
- FX_INT32 iAttrs = 0;
+ int32_t iAttrs = 0;
FX_LPCBYTE pAttrs = XFA_GetElementAttributes(pNode->GetClassID(), iAttrs);
while (iAttrs--) {
XFA_LPCATTRIBUTEINFO pAttr = XFA_GetAttributeByID((XFA_ATTRIBUTE)pAttrs[iAttrs]);
@@ -521,7 +521,7 @@ void XFA_DataExporter_DealWithDataGroupNode(CXFA_Node *pDataNode)
if (!pDataNode || pDataNode->GetClassID() == XFA_ELEMENT_DataValue) {
return;
}
- FX_INT32 iChildNum = 0;
+ int32_t iChildNum = 0;
for (CXFA_Node *pChildNode = pDataNode->GetNodeItem(XFA_NODEITEM_FirstChild); pChildNode; pChildNode = pChildNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
iChildNum++;
XFA_DataExporter_DealWithDataGroupNode(pChildNode);
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp b/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp
index fb592b4c97..b276abca30 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp
@@ -25,7 +25,7 @@ IXFA_DocLayout* IXFA_LayoutPage::GetLayout() const
CXFA_ContainerLayoutItemImpl* pThis = (CXFA_ContainerLayoutItemImpl*)this;
return pThis->m_pFormNode->GetDocument()->GetLayoutProcessor();
}
-FX_INT32 IXFA_LayoutPage::GetPageIndex() const
+int32_t IXFA_LayoutPage::GetPageIndex() const
{
CXFA_ContainerLayoutItemImpl* pThis = (CXFA_ContainerLayoutItemImpl*)this;
return pThis->m_pFormNode->GetDocument()->GetLayoutProcessor()->GetLayoutPageMgr()->GetPageIndex((IXFA_LayoutPage*)this);
@@ -120,10 +120,10 @@ CXFA_LayoutItem* CXFA_LayoutItem::GetLast() const
}
return (CXFA_LayoutItem*)pCurNode;
}
-FX_INT32 CXFA_LayoutItem::GetIndex() const
+int32_t CXFA_LayoutItem::GetIndex() const
{
CXFA_ContentLayoutItemImpl* pThis = (CXFA_ContentLayoutItemImpl*)this;
- FX_INT32 iIndex = 0;
+ int32_t iIndex = 0;
CXFA_ContentLayoutItemImpl* pCurNode = pThis;
while(pCurNode->m_pPrev) {
pCurNode = pCurNode->m_pPrev;
@@ -131,10 +131,10 @@ FX_INT32 CXFA_LayoutItem::GetIndex() const
}
return iIndex;
}
-FX_INT32 CXFA_LayoutItem::GetCount() const
+int32_t CXFA_LayoutItem::GetCount() const
{
CXFA_ContentLayoutItemImpl* pThis = (CXFA_ContentLayoutItemImpl*)this;
- FX_INT32 iCount = 1;
+ int32_t iCount = 1;
CXFA_ContentLayoutItemImpl* pCurNode = NULL;
pCurNode = pThis;
while(pCurNode->m_pPrev) {
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp
index 228086734b..4ebc248ec2 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp
@@ -274,7 +274,7 @@ void CXFA_ItemLayoutProcessor::SplitLayoutItem(CXFA_ContentLayoutItemImpl* pLayo
pSecondLayoutItem->AddChild(pChildItem);
} else {
if(lHeightForKeep < XFA_LAYOUT_FLOAT_PERCISION) {
- for(FX_INT32 iIndex = 0; iIndex < keepLayoutItems.GetSize(); iIndex ++) {
+ for(int32_t iIndex = 0; iIndex < keepLayoutItems.GetSize(); iIndex ++) {
CXFA_ContentLayoutItemImpl *pPreItem = keepLayoutItems[iIndex];
pLayoutItem->RemoveChild(pPreItem);
pPreItem->m_sPos.y -= fSplitPos;
@@ -713,7 +713,7 @@ static inline void XFA_ItemLayoutProcessor_CalculateContainerComponentSizeFromCo
void CXFA_ItemLayoutProcessor::CalculatePositionedContainerPos(CXFA_Node* pNode, FX_FLOAT fWidth, FX_FLOAT fHeight, FX_FLOAT& fAbsoluteX, FX_FLOAT& fAbsoluteY)
{
XFA_ATTRIBUTEENUM eAnchorType = pNode->GetEnum(XFA_ATTRIBUTE_AnchorType);
- FX_INT32 nAnchorType = 0;
+ int32_t nAnchorType = 0;
switch(eAnchorType) {
case XFA_ATTRIBUTEENUM_TopLeft:
nAnchorType = 0;
@@ -745,16 +745,16 @@ void CXFA_ItemLayoutProcessor::CalculatePositionedContainerPos(CXFA_Node* pNode,
default:
break;
}
- static const FX_UINT8 nNextPos[4][9] = { {0, 1, 2, 3, 4, 5, 6, 7, 8},
+ static const uint8_t nNextPos[4][9] = { {0, 1, 2, 3, 4, 5, 6, 7, 8},
{6, 3, 0, 7, 4, 1, 8, 5, 2},
{8, 7, 6, 5, 4, 3, 2, 1, 0},
{2, 5, 8, 1, 4, 7, 0, 3, 6} };
FX_FLOAT fAnchorX = pNode->GetMeasure(XFA_ATTRIBUTE_X).ToUnit(XFA_UNIT_Pt);
FX_FLOAT fAnchorY = pNode->GetMeasure(XFA_ATTRIBUTE_Y).ToUnit(XFA_UNIT_Pt);
- FX_INT32 nRotate = FXSYS_round(pNode->GetMeasure(XFA_ATTRIBUTE_Rotate).GetValue());
+ int32_t nRotate = FXSYS_round(pNode->GetMeasure(XFA_ATTRIBUTE_Rotate).GetValue());
nRotate = XFA_MapRotation(nRotate) / 90;
- FX_INT32 nAbsoluteAnchorType = nNextPos[nRotate][nAnchorType];
+ int32_t nAbsoluteAnchorType = nNextPos[nRotate][nAnchorType];
fAbsoluteX = fAnchorX;
fAbsoluteY = fAnchorY;
switch(nAbsoluteAnchorType / 3) {
@@ -867,7 +867,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutPositionedContainer(CXFA_LayoutContext* p
if(m_pCurChildNode == XFA_LAYOUT_INVALIDNODE) {
XFA_ItemLayoutProcessor_GotoNextContainerNode(m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, FALSE);
}
- FX_INT32 iColIndex = 0;
+ int32_t iColIndex = 0;
for(; m_pCurChildNode; XFA_ItemLayoutProcessor_GotoNextContainerNode(m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, FALSE)) {
if (m_nCurChildNodeStage != XFA_ItemLayoutProcessorStages_Container) {
continue;
@@ -880,14 +880,14 @@ void CXFA_ItemLayoutProcessor::DoLayoutPositionedContainer(CXFA_LayoutContext* p
pProcessor->m_pPageMgrCreateItem = m_pPageMgrCreateItem;
#endif
if (pContext && pContext->m_prgSpecifiedColumnWidths) {
- FX_INT32 iColSpan = m_pCurChildNode->GetInteger(XFA_ATTRIBUTE_ColSpan);
+ int32_t iColSpan = m_pCurChildNode->GetInteger(XFA_ATTRIBUTE_ColSpan);
if (iColSpan <= pContext->m_prgSpecifiedColumnWidths->GetSize() - iColIndex) {
pContext->m_fCurColumnWidth = 0;
pContext->m_bCurColumnWidthAvaiable = TRUE;
if(iColSpan == -1) {
iColSpan = pContext->m_prgSpecifiedColumnWidths->GetSize();
}
- for (FX_INT32 i = 0; i < iColSpan; i++) {
+ for (int32_t i = 0; i < iColSpan; i++) {
pContext->m_fCurColumnWidth += pContext->m_prgSpecifiedColumnWidths->GetAt(iColIndex + i);
}
if(pContext->m_fCurColumnWidth == 0) {
@@ -993,16 +993,16 @@ static inline void XFA_ItemLayoutProcessor_RelocateTableRowCells(CXFA_ContentLay
FX_FLOAT fContentCurrentHeight = pLayoutRow->m_sSize.y - fTopInset - fBottomInset;
FX_FLOAT fContentCalculatedWidth = 0, fContentCalculatedHeight = 0;
FX_FLOAT fCurrentColX = 0;
- FX_INT32 nCurrentColIdx = 0;
+ int32_t nCurrentColIdx = 0;
FX_BOOL bMetWholeRowCell = FALSE;
for(CXFA_ContentLayoutItemImpl* pLayoutChild = (CXFA_ContentLayoutItemImpl*)pLayoutRow->m_pFirstChild; pLayoutChild; pLayoutChild = (CXFA_ContentLayoutItemImpl*)pLayoutChild->m_pNextSibling) {
- FX_INT32 nOriginalColSpan = pLayoutChild->m_pFormNode->GetInteger(XFA_ATTRIBUTE_ColSpan);
- FX_INT32 nColSpan = nOriginalColSpan;
+ int32_t nOriginalColSpan = pLayoutChild->m_pFormNode->GetInteger(XFA_ATTRIBUTE_ColSpan);
+ int32_t nColSpan = nOriginalColSpan;
FX_FLOAT fColSpanWidth = 0;
if(nColSpan == -1 || nCurrentColIdx + nColSpan > rgSpecifiedColumnWidths.GetSize()) {
nColSpan = rgSpecifiedColumnWidths.GetSize() - nCurrentColIdx;
}
- for(FX_INT32 i = 0; i < nColSpan; i ++) {
+ for(int32_t i = 0; i < nColSpan; i ++) {
fColSpanWidth += rgSpecifiedColumnWidths[nCurrentColIdx + i];
}
if (nColSpan != nOriginalColSpan) {
@@ -1101,9 +1101,9 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode)
if (pLayoutNode->TryCData(XFA_ATTRIBUTE_ColumnWidths, wsColumnWidths)) {
CFX_WideStringArray widths;
if (FX_SeparateStringW(wsColumnWidths.GetPtr(), wsColumnWidths.GetLength(), L' ', widths) > 0) {
- FX_INT32 iCols = widths.GetSize();
+ int32_t iCols = widths.GetSize();
CFX_WideString wsWidth;
- for (FX_INT32 i = 0; i < iCols; i++) {
+ for (int32_t i = 0; i < iCols; i++) {
wsWidth = widths[i];
wsWidth.TrimLeft(L' ');
if (!wsWidth.IsEmpty()) {
@@ -1113,7 +1113,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode)
}
}
}
- FX_INT32 iSpecifiedColumnCount = m_rgSpecifiedColumnWidths.GetSize();
+ int32_t iSpecifiedColumnCount = m_rgSpecifiedColumnWidths.GetSize();
CXFA_LayoutContext layoutContext;
layoutContext.m_prgSpecifiedColumnWidths = &m_rgSpecifiedColumnWidths;
CXFA_LayoutContext* pLayoutContext = iSpecifiedColumnCount > 0 ? &layoutContext : NULL;
@@ -1138,10 +1138,10 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode)
m_pLayoutItem->AddChild(pProcessor->ExtractLayoutItem());
delete pProcessor;
}
- FX_INT32 iRowCount = 0, iColCount = 0;
+ int32_t iRowCount = 0, iColCount = 0;
{
CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*> rgRowItems;
- CFX_ArrayTemplate<FX_INT32> rgRowItemsSpan;
+ CFX_ArrayTemplate<int32_t> rgRowItemsSpan;
CFX_ArrayTemplate<FX_FLOAT> rgRowItemsWidth;
for(CXFA_ContentLayoutItemImpl* pLayoutChild = (CXFA_ContentLayoutItemImpl*)m_pLayoutItem->m_pFirstChild; pLayoutChild; pLayoutChild = (CXFA_ContentLayoutItemImpl*)pLayoutChild->m_pNextSibling) {
if(pLayoutChild->m_pFormNode->GetClassID() != XFA_ELEMENT_Subform) {
@@ -1156,7 +1156,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode)
}
if (CXFA_ContentLayoutItemImpl* pRowLayoutCell = (CXFA_ContentLayoutItemImpl*)pLayoutChild->m_pFirstChild) {
rgRowItems.Add(pRowLayoutCell);
- FX_INT32 iColSpan = pRowLayoutCell->m_pFormNode->GetInteger(XFA_ATTRIBUTE_ColSpan);
+ int32_t iColSpan = pRowLayoutCell->m_pFormNode->GetInteger(XFA_ATTRIBUTE_ColSpan);
rgRowItemsSpan.Add(iColSpan);
rgRowItemsWidth.Add(pRowLayoutCell->m_sSize.x);
}
@@ -1167,7 +1167,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode)
while(bMoreColumns) {
bMoreColumns = FALSE;
FX_BOOL bAutoCol = FALSE;
- for(FX_INT32 i = 0; i < iRowCount; i ++) {
+ for(int32_t i = 0; i < iRowCount; i ++) {
while(rgRowItems[i] != NULL && (rgRowItemsSpan[i] <= 0 || !XFA_ItemLayoutProcessor_IsTakingSpace(rgRowItems[i]->m_pFormNode))) {
CXFA_ContentLayoutItemImpl* pNewCell = (CXFA_ContentLayoutItemImpl*)rgRowItems[i]->m_pNextSibling;
if(rgRowItemsSpan[i] < 0 && XFA_ItemLayoutProcessor_IsTakingSpace(rgRowItems[i]->m_pFormNode)) {
@@ -1184,7 +1184,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode)
bMoreColumns = TRUE;
if (rgRowItemsSpan[i] == 1) {
if (iColCount >= iSpecifiedColumnCount) {
- for (FX_INT32 j = 0, c = iColCount + 1 - m_rgSpecifiedColumnWidths.GetSize(); j < c; j ++) {
+ for (int32_t j = 0, c = iColCount + 1 - m_rgSpecifiedColumnWidths.GetSize(); j < c; j ++) {
m_rgSpecifiedColumnWidths.Add(0);
}
}
@@ -1198,7 +1198,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode)
}
if(bMoreColumns) {
FX_FLOAT fFinalColumnWidth = m_rgSpecifiedColumnWidths[iColCount];
- for(FX_INT32 i = 0; i < iRowCount; i ++) {
+ for(int32_t i = 0; i < iRowCount; i ++) {
if(!rgRowItems[i]) {
continue;
}
@@ -1257,7 +1257,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode)
XFA_ItemLayoutProcessor_CalculateContainerComponentSizeFromContentSize(m_pFormNode, bContainerWidthAutoSize, fContentCalculatedWidth, fContainerWidth, bContainerHeightAutoSize, fContentCalculatedHeight, fContainerHeight);
SetCurrentComponentSize(fContainerWidth, fContainerHeight);
}
-static FX_UINT8 XFA_ItemLayoutProcessor_HAlignEnumToInt(XFA_ATTRIBUTEENUM eHAlign)
+static uint8_t XFA_ItemLayoutProcessor_HAlignEnumToInt(XFA_ATTRIBUTEENUM eHAlign)
{
switch(eHAlign) {
case XFA_ATTRIBUTEENUM_Center:
@@ -1427,7 +1427,7 @@ FX_FLOAT CXFA_ItemLayoutProcessor::InsertKeepLayoutItems()
m_pLayoutItem = CreateContentLayoutItem(m_pFormNode);
m_pLayoutItem->m_sSize.Set(0, 0);
}
- for(FX_INT32 iIndex = m_arrayKeepItems.GetSize() - 1; iIndex >= 0 ; iIndex --) {
+ for(int32_t iIndex = m_arrayKeepItems.GetSize() - 1; iIndex >= 0 ; iIndex --) {
XFA_ItemLayoutProcessor_AddLeaderAfterSplit(this, m_arrayKeepItems[iIndex]);
fTotalHeight += m_arrayKeepItems[iIndex]->m_sSize.y;
}
@@ -1449,7 +1449,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::ProcessKeepForSplite(CXFA_ItemLayoutProcessor*
CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*> keepLayoutItems;
if(pParentProcessor->JudgePutNextPage(pParentProcessor->m_pLayoutItem, fChildHeight, keepLayoutItems)) {
m_arrayKeepItems.RemoveAll();
- for(FX_INT32 iIndex = 0; iIndex < keepLayoutItems.GetSize(); iIndex++) {
+ for(int32_t iIndex = 0; iIndex < keepLayoutItems.GetSize(); iIndex++) {
CXFA_ContentLayoutItemImpl* pItem = keepLayoutItems.GetAt(iIndex);
pParentProcessor->m_pLayoutItem->RemoveChild(pItem);
fContentCurRowY -= pItem->m_sSize.y;
@@ -1531,12 +1531,12 @@ void CXFA_ItemLayoutProcessor::ProcessUnUseOverFlow(CXFA_Node* pLeaderNode, CXFA
}
}
static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(CXFA_ItemLayoutProcessor* pThis, CXFA_ItemLayoutProcessor*& pProcessor,
- FX_BOOL bContainerWidthAutoSize, FX_BOOL bContainerHeightAutoSize, FX_FLOAT fContainerHeight, XFA_ATTRIBUTEENUM eFlowStrategy, FX_UINT8& uCurHAlignState, CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*> (&rgCurLineLayoutItems)[3],
+ FX_BOOL bContainerWidthAutoSize, FX_BOOL bContainerHeightAutoSize, FX_FLOAT fContainerHeight, XFA_ATTRIBUTEENUM eFlowStrategy, uint8_t& uCurHAlignState, CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*> (&rgCurLineLayoutItems)[3],
FX_BOOL bUseBreakControl, FX_FLOAT fAvailHeight, FX_FLOAT fRealHeight, FX_FLOAT& fContentCurRowY, FX_FLOAT& fContentWidthLimit, FX_FLOAT& fContentCurRowAvailWidth,
FX_FLOAT& fContentCurRowHeight, FX_BOOL& bAddedItemInRow, FX_BOOL& bForceEndPage, CXFA_LayoutContext* pLayoutContext = NULL, FX_BOOL bNewRow = FALSE)
{
FX_BOOL bTakeSpace = XFA_ItemLayoutProcessor_IsTakingSpace(pProcessor->m_pFormNode);
- FX_UINT8 uHAlign = XFA_ItemLayoutProcessor_HAlignEnumToInt(pThis->m_pCurChildNode->GetEnum(XFA_ATTRIBUTE_HAlign));
+ uint8_t uHAlign = XFA_ItemLayoutProcessor_HAlignEnumToInt(pThis->m_pCurChildNode->GetEnum(XFA_ATTRIBUTE_HAlign));
if(bContainerWidthAutoSize) {
uHAlign = 0;
}
@@ -1883,7 +1883,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
FX_FLOAT fContentCurRowAvailWidth = fContentWidthLimit;
m_fWidthLimite = fContentCurRowAvailWidth;
CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*> rgCurLineLayoutItems[3];
- FX_UINT8 uCurHAlignState = (eFlowStrategy != XFA_ATTRIBUTEENUM_Rl_tb ? 0 : 2);
+ uint8_t uCurHAlignState = (eFlowStrategy != XFA_ATTRIBUTEENUM_Rl_tb ? 0 : 2);
if (pLayoutChild) {
for (CXFA_ContentLayoutItemImpl* pLayoutNext = pLayoutChild; pLayoutNext; pLayoutNext = (CXFA_ContentLayoutItemImpl*)pLayoutNext->m_pNextSibling) {
if (pLayoutNext->m_pNextSibling == NULL && m_pCurChildPreprocessor && m_pCurChildPreprocessor->m_pFormNode == pLayoutNext->m_pFormNode) {
@@ -1891,7 +1891,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
m_pCurChildPreprocessor->m_pLayoutItem = pLayoutNext;
break;
}
- FX_UINT8 uHAlign = XFA_ItemLayoutProcessor_HAlignEnumToInt(pLayoutNext->m_pFormNode->GetEnum(XFA_ATTRIBUTE_HAlign));
+ uint8_t uHAlign = XFA_ItemLayoutProcessor_HAlignEnumToInt(pLayoutNext->m_pFormNode->GetEnum(XFA_ATTRIBUTE_HAlign));
rgCurLineLayoutItems[uHAlign].Add(pLayoutNext);
if (eFlowStrategy == XFA_ATTRIBUTEENUM_Lr_tb) {
if (uHAlign > uCurHAlignState) {
@@ -1936,7 +1936,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
case XFA_ItemLayoutProcessorStages_None:
break;
case XFA_ItemLayoutProcessorStages_BreakBefore: {
- for(FX_INT32 iIndex = 0; iIndex < m_arrayKeepItems.GetSize(); iIndex++) {
+ for(int32_t iIndex = 0; iIndex < m_arrayKeepItems.GetSize(); iIndex++) {
CXFA_ContentLayoutItemImpl* pItem = m_arrayKeepItems.GetAt(iIndex);
m_pLayoutItem->RemoveChild(pItem);
fContentCalculatedHeight -= pItem->m_sSize.y;
@@ -2152,12 +2152,12 @@ SuspendAndCreateNewRow:
FX_BOOL CXFA_ItemLayoutProcessor::CalculateRowChildPosition(CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*>(&rgCurLineLayoutItems)[3], XFA_ATTRIBUTEENUM eFlowStrategy, FX_BOOL bContainerHeightAutoSize,
FX_BOOL bContainerWidthAutoSize, FX_FLOAT& fContentCalculatedWidth, FX_FLOAT& fContentCalculatedHeight, FX_FLOAT& fContentCurRowY, FX_FLOAT fContentCurRowHeight, FX_FLOAT fContentWidthLimit, FX_BOOL bRootForceTb)
{
- FX_INT32 nGroupLengths[3] = {0, 0, 0};
+ int32_t nGroupLengths[3] = {0, 0, 0};
FX_FLOAT fGroupWidths[3] = {0, 0, 0};
- FX_INT32 nTotalLength = 0;
- for(FX_INT32 i = 0; i < 3; i ++) {
+ int32_t nTotalLength = 0;
+ for(int32_t i = 0; i < 3; i ++) {
nGroupLengths[i] = rgCurLineLayoutItems[i].GetSize();
- for(FX_INT32 c = nGroupLengths[i], j = 0; j < c; j++) {
+ for(int32_t c = nGroupLengths[i], j = 0; j < c; j++) {
nTotalLength++;
if(XFA_ItemLayoutProcessor_IsTakingSpace(rgCurLineLayoutItems[i][j]->m_pFormNode)) {
fGroupWidths[i] += rgCurLineLayoutItems[i][j]->m_sSize.x;
@@ -2179,7 +2179,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::CalculateRowChildPosition(CFX_ArrayTemplate
if (eFlowStrategy != XFA_ATTRIBUTEENUM_Rl_tb) {
FX_FLOAT fCurPos;
fCurPos = 0;
- for(FX_INT32 c = nGroupLengths[0], j = 0; j < c; j++) {
+ for(int32_t c = nGroupLengths[0], j = 0; j < c; j++) {
if(bRootForceTb) {
FX_FLOAT fAbsoluteX, fAbsoluteY;
CalculatePositionedContainerPos(rgCurLineLayoutItems[0][j]->m_pFormNode, rgCurLineLayoutItems[0][j]->m_sSize.x, rgCurLineLayoutItems[0][j]->m_sSize.y, fAbsoluteX, fAbsoluteY);
@@ -2194,7 +2194,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::CalculateRowChildPosition(CFX_ArrayTemplate
m_fLastRowWidth = fCurPos;
}
fCurPos = (fContentWidthLimit + fGroupWidths[0] - fGroupWidths[1] - fGroupWidths[2]) / 2;
- for(FX_INT32 c = nGroupLengths[1], j = 0; j < c; j++) {
+ for(int32_t c = nGroupLengths[1], j = 0; j < c; j++) {
if(bRootForceTb) {
FX_FLOAT fAbsoluteX, fAbsoluteY;
CalculatePositionedContainerPos(rgCurLineLayoutItems[1][j]->m_pFormNode, rgCurLineLayoutItems[1][j]->m_sSize.x, rgCurLineLayoutItems[1][j]->m_sSize.y, fAbsoluteX, fAbsoluteY);
@@ -2209,7 +2209,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::CalculateRowChildPosition(CFX_ArrayTemplate
m_fLastRowWidth = fCurPos;
}
fCurPos = fContentWidthLimit - fGroupWidths[2];
- for(FX_INT32 c = nGroupLengths[2], j = 0; j < c; j++) {
+ for(int32_t c = nGroupLengths[2], j = 0; j < c; j++) {
if(bRootForceTb) {
FX_FLOAT fAbsoluteX, fAbsoluteY;
CalculatePositionedContainerPos(rgCurLineLayoutItems[2][j]->m_pFormNode, rgCurLineLayoutItems[2][j]->m_sSize.x, rgCurLineLayoutItems[2][j]->m_sSize.y, fAbsoluteX, fAbsoluteY);
@@ -2226,7 +2226,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::CalculateRowChildPosition(CFX_ArrayTemplate
} else {
FX_FLOAT fCurPos;
fCurPos = fGroupWidths[0];
- for(FX_INT32 c = nGroupLengths[0], j = 0; j < c; j++) {
+ for(int32_t c = nGroupLengths[0], j = 0; j < c; j++) {
if(XFA_ItemLayoutProcessor_IsTakingSpace(rgCurLineLayoutItems[0][j]->m_pFormNode)) {
fCurPos -= rgCurLineLayoutItems[0][j]->m_sSize.x;
}
@@ -2235,7 +2235,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::CalculateRowChildPosition(CFX_ArrayTemplate
m_fLastRowWidth = fCurPos;
}
fCurPos = (fContentWidthLimit + fGroupWidths[0] + fGroupWidths[1] - fGroupWidths[2]) / 2;
- for(FX_INT32 c = nGroupLengths[1], j = 0; j < c; j++) {
+ for(int32_t c = nGroupLengths[1], j = 0; j < c; j++) {
if(XFA_ItemLayoutProcessor_IsTakingSpace(rgCurLineLayoutItems[1][j]->m_pFormNode)) {
fCurPos -= rgCurLineLayoutItems[1][j]->m_sSize.x;
}
@@ -2244,7 +2244,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::CalculateRowChildPosition(CFX_ArrayTemplate
m_fLastRowWidth = fCurPos;
}
fCurPos = fContentWidthLimit;
- for(FX_INT32 c = nGroupLengths[2], j = 0; j < c; j++) {
+ for(int32_t c = nGroupLengths[2], j = 0; j < c; j++) {
if(XFA_ItemLayoutProcessor_IsTakingSpace(rgCurLineLayoutItems[2][j]->m_pFormNode)) {
fCurPos -= rgCurLineLayoutItems[2][j]->m_sSize.x;
}
@@ -2300,7 +2300,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutField()
FX_FLOAT fHeight = -1;
FX_FLOAT fWidth = -1;
pNotify->StartFieldDrawLayout(m_pFormNode, fWidth, fHeight);
- FX_INT32 nRotate = FXSYS_round(m_pFormNode->GetMeasure(XFA_ATTRIBUTE_Rotate).GetValue());
+ int32_t nRotate = FXSYS_round(m_pFormNode->GetMeasure(XFA_ATTRIBUTE_Rotate).GetValue());
nRotate = XFA_MapRotation(nRotate);
if(nRotate == 90 || nRotate == 270) {
FX_FLOAT fTmp = fWidth;
@@ -2381,14 +2381,14 @@ FX_BOOL CXFA_ItemLayoutProcessor::JudgeLeaderOrTrailerForOccur(CXFA_Node* pFormN
pTemplate = pFormNode;
}
CXFA_Occur NodeOccur = pTemplate->GetFirstChildByClass(XFA_ELEMENT_Occur);
- FX_INT32 iMax = NodeOccur.GetMax();
+ int32_t iMax = NodeOccur.GetMax();
if (iMax > -1) {
- FX_INT32 iCount = (FX_INT32)(FX_UINTPTR)m_PendingNodesCount.GetValueAt(pTemplate);
+ int32_t iCount = (int32_t)(uintptr_t)m_PendingNodesCount.GetValueAt(pTemplate);
if (iCount >= iMax) {
return FALSE;
}
iCount++;
- m_PendingNodesCount.SetAt(pTemplate, (FX_LPVOID)(FX_UINTPTR)(iCount));
+ m_PendingNodesCount.SetAt(pTemplate, (FX_LPVOID)(uintptr_t)(iCount));
return TRUE;
}
return TRUE;
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h
index 68bd59910e..27cb5b2c2e 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h
+++ b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h
@@ -6,7 +6,7 @@
#ifndef _XFA_LAYOUT_ITEMLAYOUT_H_
#define _XFA_LAYOUT_ITEMLAYOUT_H_
-#define XFA_LAYOUT_INVALIDNODE ((CXFA_Node*)(FX_INTPTR)-1)
+#define XFA_LAYOUT_INVALIDNODE ((CXFA_Node*)(intptr_t)-1)
#define XFA_LAYOUT_FLOAT_PERCISION (0.0005f)
#include "float.h"
#define XFA_LAYOUT_FLOAT_MAX FLT_MAX
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
index bc2d8104fd..d5814b921b 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
@@ -69,7 +69,7 @@ FX_BOOL CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode)
}
InitPageSetMap();
CXFA_Node* pPageArea = NULL;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
for (pPageArea = m_pTemplatePageSetRoot->GetNodeItem(XFA_NODEITEM_FirstChild); pPageArea; pPageArea = pPageArea->GetNodeItem(XFA_NODEITEM_NextSibling)) {
if (pPageArea->GetClassID() == XFA_ELEMENT_PageArea) {
iCount++;
@@ -251,11 +251,11 @@ static CXFA_Node* XFA_ResolveBreakTarget(CXFA_Node* pPageSetRoot, FX_BOOL bNewEx
CFX_WideString wsTargetAll = wsTargetExpr;
wsTargetAll.TrimLeft();
wsTargetAll.TrimRight();
- FX_INT32 iSpliteIndex = 0;
+ int32_t iSpliteIndex = 0;
FX_BOOL bTargetAllFind = TRUE;
while(iSpliteIndex != -1) {
CFX_WideString wsTargetExpr;
- FX_INT32 iSpliteNextIndex = 0;
+ int32_t iSpliteNextIndex = 0;
if(!bTargetAllFind) {
iSpliteNextIndex = wsTargetAll.Find(' ', iSpliteIndex);
wsTargetExpr = wsTargetAll.Mid(iSpliteIndex, iSpliteNextIndex - iSpliteIndex);
@@ -277,7 +277,7 @@ static CXFA_Node* XFA_ResolveBreakTarget(CXFA_Node* pPageSetRoot, FX_BOOL bNewEx
wsProcessedTarget = wsTargetExpr.Mid(4, wsTargetExpr.GetLength() - 5);
}
XFA_RESOLVENODE_RS rs;
- FX_INT32 iCount = pDocument->GetScriptContext()->ResolveObjects(pPageSetRoot, wsProcessedTarget, rs, XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Attributes | XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent);
+ int32_t iCount = pDocument->GetScriptContext()->ResolveObjects(pPageSetRoot, wsProcessedTarget, rs, XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Attributes | XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent);
if(iCount > 0 && rs.nodes[0]->IsNode()) {
return (CXFA_Node*)rs.nodes[0];
}
@@ -368,7 +368,7 @@ void CXFA_LayoutPageMgr::AddPageAreaLayoutItem(CXFA_ContainerRecord* pNewRecord,
CXFA_ContainerLayoutItemImpl* pContainerItem = (CXFA_ContainerLayoutItemImpl*)pNotify->OnCreateLayoutItem(pNewPageArea);
m_PageArray.Add(pContainerItem);
m_nAvailPages++;
- pNotify->OnPageEvent((IXFA_LayoutPage*)pContainerItem, XFA_PAGEEVENT_PageAdded, (FX_LPVOID)(FX_UINTPTR)m_nAvailPages);
+ pNotify->OnPageEvent((IXFA_LayoutPage*)pContainerItem, XFA_PAGEEVENT_PageAdded, (FX_LPVOID)(uintptr_t)m_nAvailPages);
pNewPageAreaLayoutItem = pContainerItem;
}
pNewRecord->pCurPageSet->AddChild(pNewPageAreaLayoutItem);
@@ -429,7 +429,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets()
case XFA_ATTRIBUTEENUM_SimplexPaginated:
case XFA_ATTRIBUTEENUM_DuplexPaginated: {
CXFA_LayoutItemImpl* pLastPageAreaLayoutItem = NULL;
- FX_INT32 nPageAreaCount = 0;
+ int32_t nPageAreaCount = 0;
for(CXFA_LayoutItemImpl* pPageAreaLayoutItem = pPageSetLayoutItem->m_pFirstChild; pPageAreaLayoutItem; pPageAreaLayoutItem = pPageAreaLayoutItem->m_pNextSibling) {
if(pPageAreaLayoutItem->m_pFormNode->GetClassID() != XFA_ELEMENT_PageArea) {
continue;
@@ -471,7 +471,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets()
}
rgUsedHeights.Add(fUsedHeight);
}
- FX_INT32 iCurContentAreaIndex = -1;
+ int32_t iCurContentAreaIndex = -1;
for(CXFA_Node* pContentAreaNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild); pContentAreaNode; pContentAreaNode = pContentAreaNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
if(pContentAreaNode->GetClassID() != XFA_ELEMENT_ContentArea) {
continue;
@@ -509,18 +509,18 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets()
}
}
}
-FX_INT32 CXFA_LayoutPageMgr::GetPageCount() const
+int32_t CXFA_LayoutPageMgr::GetPageCount() const
{
return m_PageArray.GetSize();
}
-IXFA_LayoutPage* CXFA_LayoutPageMgr::GetPage(FX_INT32 index) const
+IXFA_LayoutPage* CXFA_LayoutPageMgr::GetPage(int32_t index) const
{
if (m_PageArray.GetSize() > index) {
return (IXFA_LayoutPage*)m_PageArray[index];
}
return NULL;
}
-FX_INT32 CXFA_LayoutPageMgr::GetPageIndex(IXFA_LayoutPage* pPage) const
+int32_t CXFA_LayoutPageMgr::GetPageIndex(IXFA_LayoutPage* pPage) const
{
return m_PageArray.Find((CXFA_ContainerLayoutItemImpl*)pPage);
}
@@ -807,7 +807,7 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet(CXFA_Node* pPageSet, CXFA_No
if(pPageSet == NULL && pStartChild == NULL) {
return FALSE;
}
- FX_INT32 iPageSetCount = 0;
+ int32_t iPageSetCount = 0;
if(IsPageSetRootOrderedOccurrence()) {
return FindPageAreaFromPageSet_Ordered(pPageSet, pStartChild, pTargetPageArea, pTargetContentArea, bNewPage, bQuery);
}
@@ -816,10 +816,10 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet(CXFA_Node* pPageSet, CXFA_No
}
FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_Ordered(CXFA_Node* pPageSet, CXFA_Node* pStartChild, CXFA_Node* pTargetPageArea, CXFA_Node* pTargetContentArea, FX_BOOL bNewPage, FX_BOOL bQuery)
{
- FX_INT32 iPageSetCount = 0;
+ int32_t iPageSetCount = 0;
if(!pStartChild && !bQuery) {
m_pPageSetMap.Lookup(pPageSet, iPageSetCount);
- FX_INT32 iMax = -1;
+ int32_t iMax = -1;
CXFA_Node* pOccurNode = pPageSet->GetFirstChildByClass(XFA_ELEMENT_Occur);
if(pOccurNode) {
pOccurNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, FALSE);
@@ -965,7 +965,7 @@ FX_BOOL CXFA_LayoutPageMgr::MatchPageAreaOddOrEven(CXFA_Node* pPageArea, FX_BOOL
XFA_ATTRIBUTEENUM eOddOrEven = XFA_ATTRIBUTEENUM_Any;
pPageArea->TryEnum(XFA_ATTRIBUTE_OddOrEven, eOddOrEven);
if (eOddOrEven != XFA_ATTRIBUTEENUM_Any) {
- FX_INT32 iPageCount = GetPageCount();
+ int32_t iPageCount = GetPageCount();
if (bLastMatch) {
return eOddOrEven == XFA_ATTRIBUTEENUM_Odd ? iPageCount % 2 == 1 : iPageCount % 2 == 0;
}
@@ -985,7 +985,7 @@ CXFA_Node* CXFA_LayoutPageMgr::GetNextAvailPageArea(CXFA_Node* pTargetPageArea,
return m_pCurPageArea;
}
if(IsPageSetRootOrderedOccurrence()) {
- FX_INT32 iMax = -1;
+ int32_t iMax = -1;
CXFA_Node* pOccurNode = m_pCurPageArea->GetFirstChildByClass(XFA_ELEMENT_Occur);
if(pOccurNode) {
pOccurNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, FALSE);
@@ -1086,19 +1086,19 @@ void CXFA_LayoutPageMgr::InitPageSetMap()
}
}
}
-FX_INT32 CXFA_LayoutPageMgr::CreateMinPageRecord(CXFA_Node* pPageArea, FX_BOOL bTargetPageArea, FX_BOOL bCreateLast)
+int32_t CXFA_LayoutPageMgr::CreateMinPageRecord(CXFA_Node* pPageArea, FX_BOOL bTargetPageArea, FX_BOOL bCreateLast)
{
if(pPageArea == NULL) {
return 0;
}
CXFA_Node* pOccurNode = pPageArea->GetFirstChildByClass(XFA_ELEMENT_Occur);
- FX_INT32 iMin = 0;
+ int32_t iMin = 0;
if((pOccurNode && pOccurNode->TryInteger(XFA_ATTRIBUTE_Min, iMin, FALSE)) || bTargetPageArea) {
CXFA_Node* pContentArea = pPageArea->GetFirstChildByClass(XFA_ELEMENT_ContentArea);
if (iMin < 1 && bTargetPageArea && !pContentArea) {
iMin = 1;
}
- FX_INT32 i = 0;
+ int32_t i = 0;
if(bCreateLast) {
i = m_nCurPageCount;
}
@@ -1115,7 +1115,7 @@ void CXFA_LayoutPageMgr::CreateMinPageSetRecord(CXFA_Node* pPageSet, FX_BOOL bCr
if(pPageSet == NULL) {
return;
}
- FX_INT32 iCurSetCount = 0;
+ int32_t iCurSetCount = 0;
if(!m_pPageSetMap.Lookup(pPageSet, iCurSetCount)) {
return;
}
@@ -1123,10 +1123,10 @@ void CXFA_LayoutPageMgr::CreateMinPageSetRecord(CXFA_Node* pPageSet, FX_BOOL bCr
iCurSetCount = 0;
}
CXFA_Node* pOccurNode = pPageSet->GetFirstChildByClass(XFA_ELEMENT_Occur);
- FX_INT32 iMin = 0;
+ int32_t iMin = 0;
if(pOccurNode && pOccurNode->TryInteger(XFA_ATTRIBUTE_Min, iMin, FALSE)) {
if(iCurSetCount < iMin) {
- for(FX_INT32 i = 0; i < iMin - iCurSetCount; i++) {
+ for(int32_t i = 0; i < iMin - iCurSetCount; i++) {
for(CXFA_Node *pCurrentPageNode = pPageSet->GetNodeItem(XFA_NODEITEM_FirstChild); pCurrentPageNode; pCurrentPageNode = pCurrentPageNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
if(pCurrentPageNode->GetClassID() == XFA_ELEMENT_PageArea) {
CreateMinPageRecord(pCurrentPageNode, FALSE);
@@ -1179,11 +1179,11 @@ FX_BOOL CXFA_LayoutPageMgr::GetNextAvailContentHeight(FX_FLOAT fChildHeight)
}
CXFA_Node* pPageNode = GetCurrentContainerRecord()->pCurPageArea->m_pFormNode;
CXFA_Node* pOccurNode = pPageNode->GetFirstChildByClass(XFA_ELEMENT_Occur);
- FX_INT32 iMax = 0;
+ int32_t iMax = 0;
if(pOccurNode && pOccurNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, FALSE)) {
if(m_nCurPageCount == iMax) {
CXFA_Node* pSrcPage = m_pCurPageArea;
- FX_INT32 nSrcPageCount = m_nCurPageCount;
+ int32_t nSrcPageCount = m_nCurPageCount;
FX_POSITION psSrcRecord = m_rgProposedContainerRecord.GetTailPosition();
CXFA_Node* pNextPage = GetNextAvailPageArea(NULL, NULL, FALSE, TRUE);
m_pCurPageArea = pSrcPage;
@@ -1367,7 +1367,7 @@ void CXFA_LayoutPageMgr::MergePageSetContents()
IXFA_DocLayout* pDocLayout = pDocument->GetDocLayout();
CXFA_ContainerLayoutItemImpl* pRootLayout = this->GetRootLayoutItem();
{
- for(FX_INT32 iIndex = 0; iIndex < pDocument->m_pPendingPageSet.GetSize(); iIndex ++) {
+ for(int32_t iIndex = 0; iIndex < pDocument->m_pPendingPageSet.GetSize(); iIndex ++) {
CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFANode> sIterator(pDocument->m_pPendingPageSet.GetAt(iIndex));
for(CXFA_Node *pNode = sIterator.GetCurrent(); pNode; pNode = sIterator.MoveToNext()) {
if(pNode->IsContainerNode()) {
@@ -1381,7 +1381,7 @@ void CXFA_LayoutPageMgr::MergePageSetContents()
}
}
}
- FX_INT32 iIndex = 0;
+ int32_t iIndex = 0;
CXFA_Node* pPendingPageSet = NULL;
for(; pRootLayout; pRootLayout = (CXFA_ContainerLayoutItemImpl* )pRootLayout->m_pNextSibling) {
pPendingPageSet = NULL;
@@ -1419,7 +1419,7 @@ void CXFA_LayoutPageMgr::MergePageSetContents()
CXFA_ContainerLayoutItemImpl* pFormLayout = pContainerItem;
CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode;
FX_BOOL bIsExistForm = TRUE;
- for(FX_INT32 iLevel = 0; iLevel < 3; iLevel ++) {
+ for(int32_t iLevel = 0; iLevel < 3; iLevel ++) {
pFormLayout = (CXFA_ContainerLayoutItemImpl*)pFormLayout->m_pFirstChild;
if(iLevel == 2) {
while(pFormLayout && !XFA_ItemLayoutProcessor_IsTakingSpace(pFormLayout->m_pFormNode)) {
@@ -1535,7 +1535,7 @@ void CXFA_LayoutPageMgr::LayoutPageSetContents()
}
}
}
-void XFA_SyncContainer(IXFA_Notify* pNotify, IXFA_DocLayout* pDocLayout, CXFA_LayoutItemImpl* pContainerItem, FX_DWORD dwRelevant, FX_BOOL bVisible, FX_INT32 nPageIndex)
+void XFA_SyncContainer(IXFA_Notify* pNotify, IXFA_DocLayout* pDocLayout, CXFA_LayoutItemImpl* pContainerItem, FX_DWORD dwRelevant, FX_BOOL bVisible, int32_t nPageIndex)
{
FX_BOOL bVisibleItem = FALSE;
FX_DWORD dwStatus = 0;
@@ -1548,7 +1548,7 @@ void XFA_SyncContainer(IXFA_Notify* pNotify, IXFA_DocLayout* pDocLayout, CXFA_La
dwRelevantContainer = XFA_GetRelevant(pContainerItem->m_pFormNode, dwRelevant);
dwStatus = (bVisibleItem ? XFA_LAYOUTSTATUS_Visible : 0) | dwRelevantContainer;
}
- pNotify->OnLayoutEvent(pDocLayout, (CXFA_LayoutItem*)pContainerItem, XFA_LAYOUTEVENT_ItemAdded, (FX_LPVOID)(FX_UINTPTR)nPageIndex, (FX_LPVOID)(FX_UINTPTR)dwStatus);
+ pNotify->OnLayoutEvent(pDocLayout, (CXFA_LayoutItem*)pContainerItem, XFA_LAYOUTEVENT_ItemAdded, (FX_LPVOID)(uintptr_t)nPageIndex, (FX_LPVOID)(uintptr_t)dwStatus);
CXFA_LayoutItemImpl *pChild = pContainerItem->m_pFirstChild;
while (pChild) {
if (!pChild->IsContentLayoutItem()) {
@@ -1564,7 +1564,7 @@ void CXFA_LayoutPageMgr::SyncLayoutData()
MergePageSetContents();
LayoutPageSetContents();
IXFA_Notify* pNotify = m_pTemplatePageSetRoot->GetDocument()->GetParser()->GetNotify();
- FX_INT32 nPageIdx = -1;
+ int32_t nPageIdx = -1;
CXFA_ContainerLayoutItemImpl* pRootLayoutItem = this->GetRootLayoutItem();
for(; pRootLayoutItem; pRootLayoutItem = (CXFA_ContainerLayoutItemImpl*)pRootLayoutItem->m_pNextSibling) {
CXFA_NodeIteratorTemplate<CXFA_ContainerLayoutItemImpl, CXFA_TraverseStrategy_ContentAreaContainerLayoutItem> iteratorParent(pRootLayoutItem);
@@ -1592,8 +1592,8 @@ void CXFA_LayoutPageMgr::SyncLayoutData()
}
}
}
- FX_INT32 nPage = m_PageArray.GetSize();
- for (FX_INT32 i = nPage - 1; i >= m_nAvailPages; i--) {
+ int32_t nPage = m_PageArray.GetSize();
+ for (int32_t i = nPage - 1; i >= m_nAvailPages; i--) {
CXFA_ContainerLayoutItemImpl* pPage = m_PageArray[i];
m_PageArray.RemoveAt(i);
pNotify->OnPageEvent((IXFA_LayoutPage*)pPage, XFA_PAGEEVENT_PageRemoved);
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.h b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.h
index 4faf9e30db..bf82a35323 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.h
+++ b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.h
@@ -29,9 +29,9 @@ public:
void SubmitContentItem(CXFA_ContentLayoutItemImpl* pContentLayoutItem, XFA_ItemLayoutProcessorResult eStatus);
void FinishPaginatedPageSets();
void SyncLayoutData();
- FX_INT32 GetPageCount() const;
- IXFA_LayoutPage* GetPage(FX_INT32 index) const;
- FX_INT32 GetPageIndex(IXFA_LayoutPage* pPage) const;
+ int32_t GetPageCount() const;
+ IXFA_LayoutPage* GetPage(int32_t index) const;
+ int32_t GetPageIndex(IXFA_LayoutPage* pPage) const;
inline CXFA_ContainerLayoutItemImpl* GetRootLayoutItem() const
{
return m_pPageSetLayoutItemRoot;
@@ -59,7 +59,7 @@ protected:
FX_BOOL ResolveBookendLeaderOrTrailer(CXFA_Node* pBookendNode, FX_BOOL bLeader, CXFA_Node* &pBookendAppendTemplate);
FX_BOOL ExecuteBreakBeforeOrAfter(CXFA_Node* pCurNode, FX_BOOL bBefore, CXFA_Node* &pBreakLeaderTemplate, CXFA_Node* &pBreakTrailerTemplate);
- FX_INT32 CreateMinPageRecord(CXFA_Node* pPageArea, FX_BOOL bTargetPageArea, FX_BOOL bCreateLast = FALSE);
+ int32_t CreateMinPageRecord(CXFA_Node* pPageArea, FX_BOOL bTargetPageArea, FX_BOOL bCreateLast = FALSE);
void CreateMinPageSetRecord(CXFA_Node* pPageSet, FX_BOOL bCreateAll = FALSE);
void CreateNextMinRecord(CXFA_Node* pRecordNode);
FX_BOOL FindPageAreaFromPageSet(CXFA_Node* pPageSet, CXFA_Node* pStartChild, CXFA_Node* pTargetPageArea = NULL, CXFA_Node* pTargetContentArea = NULL, FX_BOOL bNewPage = FALSE, FX_BOOL bQuery = FALSE);
@@ -86,11 +86,11 @@ protected:
FX_POSITION m_pCurrentContainerRecord;
CFX_PtrList m_rgProposedContainerRecord;
CXFA_Node* m_pCurPageArea;
- FX_INT32 m_nAvailPages;
- FX_INT32 m_nCurPageCount;
+ int32_t m_nAvailPages;
+ int32_t m_nCurPageCount;
XFA_ATTRIBUTEENUM m_ePageSetMode;
FX_BOOL m_bCreateOverFlowPage;
- CFX_MapPtrTemplate<CXFA_Node*, FX_INT32> m_pPageSetMap;
+ CFX_MapPtrTemplate<CXFA_Node*, int32_t> m_pPageSetMap;
#ifdef _XFA_LAYOUTITEM_MAPCACHE_
void SaveLayoutItem(CXFA_LayoutItemImpl* pParentLayoutItem);
CFX_MapPtrToPtr m_NodeToContent;
diff --git a/xfa/src/fxfa/src/parser/xfa_locale.cpp b/xfa/src/fxfa/src/parser/xfa_locale.cpp
index 52a1b4c265..83c61d1a72 100644
--- a/xfa/src/fxfa/src/parser/xfa_locale.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_locale.cpp
@@ -93,11 +93,11 @@ void CXFA_XMLLocale::GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const
}
wsDtSymbol = pNumberSymbols->GetContent(0);
}
-void CXFA_XMLLocale::GetMonthName(FX_INT32 nMonth, CFX_WideString& wsMonthName, FX_BOOL bAbbr ) const
+void CXFA_XMLLocale::GetMonthName(int32_t nMonth, CFX_WideString& wsMonthName, FX_BOOL bAbbr ) const
{
wsMonthName = GetCalendarSymbol(FX_BSTRC("month"), nMonth, bAbbr);
}
-void CXFA_XMLLocale::GetDayName(FX_INT32 nWeek, CFX_WideString& wsDayName, FX_BOOL bAbbr ) const
+void CXFA_XMLLocale::GetDayName(int32_t nWeek, CFX_WideString& wsDayName, FX_BOOL bAbbr ) const
{
wsDayName = GetCalendarSymbol(FX_BSTRC("day"), nWeek, bAbbr);
}
@@ -208,8 +208,8 @@ void CXFA_XMLLocale::GetNumPattern(FX_LOCALENUMSUBCATEGORY eType, CFX_WideString
}
void CXFA_XMLLocale::GetPattern(CXML_Element* pElement, FX_BSTR bsTag, FX_WSTR wsName, CFX_WideString& wsPattern) const
{
- FX_INT32 iCount = pElement->CountElements(FX_BSTRC(""), bsTag);
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = pElement->CountElements(FX_BSTRC(""), bsTag);
+ for (int32_t i = 0; i < iCount; i++) {
CXML_Element* pChild = pElement->GetElement(FX_BSTRC(""), bsTag, i);
if (pChild->GetAttrValue(FX_BSTRC("name")) == wsName) {
wsPattern = pChild->GetContent(0);
@@ -263,11 +263,11 @@ void CXFA_NodeLocale::GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const
CXFA_Node *pSymbols = m_pLocale ? m_pLocale->GetChild(0, XFA_ELEMENT_DateTimeSymbols) : NULL;
wsDtSymbol = pSymbols ? pSymbols->GetContent() : CFX_WideString();
}
-void CXFA_NodeLocale::GetMonthName(FX_INT32 nMonth, CFX_WideString& wsMonthName, FX_BOOL bAbbr ) const
+void CXFA_NodeLocale::GetMonthName(int32_t nMonth, CFX_WideString& wsMonthName, FX_BOOL bAbbr ) const
{
wsMonthName = GetCalendarSymbol(XFA_ELEMENT_MonthNames, nMonth, bAbbr);
}
-void CXFA_NodeLocale::GetDayName(FX_INT32 nWeek, CFX_WideString& wsDayName, FX_BOOL bAbbr ) const
+void CXFA_NodeLocale::GetDayName(int32_t nWeek, CFX_WideString& wsDayName, FX_BOOL bAbbr ) const
{
wsDayName = GetCalendarSymbol(XFA_ELEMENT_DayNames, nWeek, bAbbr);
}
diff --git a/xfa/src/fxfa/src/parser/xfa_locale.h b/xfa/src/fxfa/src/parser/xfa_locale.h
index ccea088741..2df6201c56 100644
--- a/xfa/src/fxfa/src/parser/xfa_locale.h
+++ b/xfa/src/fxfa/src/parser/xfa_locale.h
@@ -15,8 +15,8 @@ public:
virtual void GetNumbericSymbol(FX_LOCALENUMSYMBOL eType, CFX_WideString& wsNumSymbol) const;
virtual void GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const;
- virtual void GetMonthName(FX_INT32 nMonth, CFX_WideString& wsMonthName, FX_BOOL bAbbr = TRUE) const;
- virtual void GetDayName(FX_INT32 nWeek, CFX_WideString& wsDayName, FX_BOOL bAbbr = TRUE) const;
+ virtual void GetMonthName(int32_t nMonth, CFX_WideString& wsMonthName, FX_BOOL bAbbr = TRUE) const;
+ virtual void GetDayName(int32_t nWeek, CFX_WideString& wsDayName, FX_BOOL bAbbr = TRUE) const;
virtual void GetMeridiemName(CFX_WideString& wsMeridiemName, FX_BOOL bAM = TRUE) const;
virtual void GetTimeZone(FX_TIMEZONE& tz) const;
virtual void GetEraName(CFX_WideString& wsEraName, FX_BOOL bAD = TRUE) const;
@@ -41,8 +41,8 @@ public:
virtual void GetNumbericSymbol(FX_LOCALENUMSYMBOL eType, CFX_WideString& wsNumSymbol) const;
virtual void GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const;
- virtual void GetMonthName(FX_INT32 nMonth, CFX_WideString& wsMonthName, FX_BOOL bAbbr = TRUE) const;
- virtual void GetDayName(FX_INT32 nWeek, CFX_WideString& wsDayName, FX_BOOL bAbbr = TRUE) const;
+ virtual void GetMonthName(int32_t nMonth, CFX_WideString& wsMonthName, FX_BOOL bAbbr = TRUE) const;
+ virtual void GetDayName(int32_t nWeek, CFX_WideString& wsDayName, FX_BOOL bAbbr = TRUE) const;
virtual void GetMeridiemName(CFX_WideString& wsMeridiemName, FX_BOOL bAM = TRUE) const;
virtual void GetTimeZone(FX_TIMEZONE& tz) const;
virtual void GetEraName(CFX_WideString& wsEraName, FX_BOOL bAD = TRUE) const;
diff --git a/xfa/src/fxfa/src/parser/xfa_localemgr.cpp b/xfa/src/fxfa/src/parser/xfa_localemgr.cpp
index 8c56c95dc9..cc136ae2ac 100644
--- a/xfa/src/fxfa/src/parser/xfa_localemgr.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_localemgr.cpp
@@ -17,7 +17,7 @@
#include "../common/xfa_fm2jsapi.h"
#include "xfa_debug_parser.h"
#include "xfa_locale.h"
-const FX_BYTE g_enUS_Locale[] = {
+const uint8_t g_enUS_Locale[] = {
0x78, 0x9C, 0x95, 0x56, 0xD1, 0x6E, 0x9B, 0x30, 0x14, 0x7D, 0x9F, 0xB4, 0x7F, 0x40, 0xD6, 0x2A, 0xB5, 0x52, 0x56, 0x6F,
0x8F, 0xA9, 0x88, 0xA5, 0x6C, 0x24, 0x9B, 0x3A, 0xD1, 0x55, 0x22, 0x55, 0xB5, 0xBE, 0x4C, 0x0E, 0xDC, 0x05, 0x34, 0xB0,
0x23, 0x83, 0x37, 0x05, 0xED, 0xE3, 0x67, 0x07, 0xC3, 0xC0, 0xF6, 0x24, 0xC2, 0x4B, 0x7C, 0xCF, 0x3D, 0xE7, 0xE6, 0xDE,
@@ -51,7 +51,7 @@ const FX_BYTE g_enUS_Locale[] = {
0x20, 0xF2, 0x94, 0x44, 0xB3, 0x45, 0x63, 0xCB, 0x5D, 0x09, 0xB6, 0x7B, 0xD5, 0x58, 0xF7, 0x55, 0xA4, 0x96, 0x7F, 0x01,
0x75, 0x37, 0x1B, 0x8B,
};
-const FX_BYTE g_enGB_Locale[] = {
+const uint8_t g_enGB_Locale[] = {
0x78, 0x9C, 0x95, 0x56, 0xD1, 0x6E, 0xD3, 0x30, 0x14, 0x7D, 0x47, 0xE2, 0x1F, 0xA2, 0x88, 0x49, 0x20, 0x6D, 0x33, 0x3C,
0x6E, 0xEA, 0x2C, 0x75, 0xEB, 0xD6, 0x32, 0xC8, 0xA8, 0x48, 0xC5, 0xC4, 0x5E, 0x90, 0x9B, 0x78, 0x8D, 0x59, 0x62, 0x57,
0x4E, 0xCC, 0x94, 0xFC, 0x02, 0x9F, 0xC0, 0x23, 0xCF, 0x08, 0xF1, 0x01, 0xBC, 0xF0, 0x2F, 0x48, 0xFB, 0x0C, 0x6E, 0x1A,
@@ -91,7 +91,7 @@ const FX_BYTE g_enGB_Locale[] = {
0xF7, 0x5B, 0x7E, 0x14, 0x98, 0xAB, 0x72, 0x32, 0xE7, 0xED, 0x16, 0x92, 0x2F, 0x06, 0x90, 0xBC, 0x5C, 0xF1, 0xD5, 0x67,
0xB1, 0xE1, 0xE9, 0xE6, 0xD0, 0xFD, 0x9E, 0x95, 0x51, 0xF5, 0x19, 0x0B, 0xCB, 0x7F, 0x8E, 0x69, 0xAC, 0xD0
};
-const FX_BYTE g_zhCN_Locale[] = {
+const uint8_t g_zhCN_Locale[] = {
0x78, 0x9C, 0xED, 0x56, 0x41, 0x4F, 0xD4, 0x40, 0x14, 0xBE, 0x9B, 0xF8, 0x1F, 0x9A, 0x46, 0x52, 0x4D, 0x58, 0x46, 0x8F,
0x90, 0xD2, 0x64, 0x03, 0x08, 0x06, 0xBB, 0x21, 0x96, 0x68, 0xE0, 0x62, 0xBA, 0xED, 0xB0, 0x2D, 0x6C, 0x3B, 0x64, 0xB6,
0x0D, 0x6E, 0x4F, 0x18, 0x82, 0x82, 0xC2, 0x45, 0x89, 0x9A, 0x80, 0xE1, 0x64, 0x3C, 0x28, 0x9E, 0x8C, 0x01, 0x22, 0xF1,
@@ -133,7 +133,7 @@ const FX_BYTE g_zhCN_Locale[] = {
0x43, 0x12, 0xEA, 0x93, 0x21, 0x9B, 0x02, 0x73, 0xD8, 0x68, 0x39, 0xA9, 0x1D, 0xFA, 0x8D, 0x55, 0xD2, 0xE3, 0xF1, 0x7D,
0xD1, 0xCD, 0x33, 0x63, 0x51, 0xFC, 0x15, 0x0D, 0xCB, 0xBF, 0xC0, 0xE4, 0x3D, 0x40
};
-const FX_BYTE g_zhTW_Locale[] = {
+const uint8_t g_zhTW_Locale[] = {
0x78, 0x9C, 0xED, 0x57, 0xCD, 0x4F, 0xD4, 0x40, 0x14, 0x3F, 0x63, 0xE2, 0xFF, 0x30, 0x69, 0x20, 0xD5, 0x04, 0xA8, 0x1E,
0x21, 0xA5, 0xC9, 0xC6, 0x45, 0x30, 0x58, 0x42, 0xEC, 0x46, 0x22, 0x17, 0x33, 0xDB, 0x0E, 0xDB, 0xC2, 0xB6, 0x43, 0x66,
0xDB, 0xC0, 0xF6, 0x24, 0x12, 0x14, 0x14, 0x62, 0xA2, 0xC4, 0x8F, 0x80, 0xE1, 0x64, 0x3C, 0x28, 0x89, 0x07, 0x0F, 0x2C,
@@ -176,7 +176,7 @@ const FX_BYTE g_zhTW_Locale[] = {
0xF0, 0x6A, 0x0D, 0x5F, 0x21, 0x77, 0xF4, 0x2A, 0x6D, 0xCF, 0x69, 0xAC, 0xE0, 0x00, 0x19, 0xDE, 0x1E, 0x2C, 0xB6, 0xD4,
0x7B, 0xCA, 0x52, 0xF8, 0x67, 0x41, 0xF9, 0x03, 0x11, 0xC2, 0x4A, 0xC9
};
-const FX_BYTE g_zhHK_Locale[] = {
+const uint8_t g_zhHK_Locale[] = {
0x78, 0x9C, 0xA5, 0x57, 0x4D, 0x4F, 0x13, 0x41, 0x18, 0x3E, 0x63, 0xE2, 0x7F, 0x98, 0x6C, 0x20, 0x0B, 0x09, 0x50, 0x8A,
0x9F, 0x25, 0xCB, 0x26, 0x44, 0x90, 0x9A, 0x5A, 0x43, 0x2C, 0xD1, 0xC8, 0xC5, 0x6C, 0x77, 0x87, 0xEE, 0x42, 0x77, 0x87,
0x4C, 0xB7, 0xC1, 0x6E, 0x3C, 0x88, 0x04, 0xA5, 0x5A, 0x2E, 0x4A, 0x54, 0x02, 0x86, 0x78, 0x50, 0x0F, 0x48, 0xBC, 0x78,
@@ -222,7 +222,7 @@ const FX_BYTE g_zhHK_Locale[] = {
0x52, 0xAB, 0x1A, 0xA5, 0x15, 0x64, 0x33, 0x9D, 0xDD, 0xED, 0x47, 0x2E, 0x70, 0x9E, 0x42, 0xCA, 0xF9, 0x27, 0x42, 0xFC,
0x0B, 0xD9, 0x0E, 0x4B, 0xED
};
-const FX_BYTE g_jaJP_Locale[] = {
+const uint8_t g_jaJP_Locale[] = {
0x78, 0x9C, 0xED, 0x56, 0xCB, 0x6E, 0xD3, 0x40, 0x14, 0x5D, 0x17, 0x89, 0x7F, 0x18, 0x59, 0x20, 0x83, 0xD4, 0xD6, 0x0D,
0xEF, 0x56, 0xAE, 0xA5, 0x8A, 0x96, 0x86, 0x16, 0xA3, 0x08, 0x57, 0xA0, 0x76, 0x83, 0x26, 0xF6, 0x34, 0x99, 0x36, 0x9E,
0xA9, 0x26, 0xB6, 0x4A, 0xBC, 0xE2, 0x21, 0x20, 0x48, 0x74, 0x01, 0x1B, 0x04, 0x44, 0x62, 0x55, 0x40, 0x02, 0x04, 0x8B,
@@ -264,7 +264,7 @@ const FX_BYTE g_jaJP_Locale[] = {
0xC6, 0xD2, 0x0C, 0x5A, 0x8A, 0xA6, 0x77, 0x5C, 0xD2, 0xD8, 0xA2, 0x3E, 0x33, 0x18, 0x89, 0x7F, 0xAA, 0x25, 0xE6, 0xA9,
0x2A, 0xC1, 0x87, 0xBD, 0xF6, 0x17, 0x6C, 0x42, 0x08, 0x21
};
-const FX_BYTE g_koKR_Locale[] = {
+const uint8_t g_koKR_Locale[] = {
0x78, 0x9C, 0xED, 0x56, 0x4D, 0x6B, 0xD4, 0x40, 0x18, 0x3E, 0x57, 0xF0, 0x3F, 0x0C, 0xC1, 0x12, 0x85, 0x76, 0xB7, 0xEB,
0x77, 0x4B, 0x1A, 0x28, 0x6E, 0x6D, 0x65, 0x8D, 0x94, 0xA6, 0x58, 0xEC, 0x45, 0x66, 0x93, 0xE9, 0x26, 0xED, 0x26, 0x53,
0x26, 0x09, 0x75, 0x73, 0xAE, 0x52, 0xF0, 0xE2, 0xA1, 0x87, 0xEA, 0x6E, 0xB1, 0x07, 0x11, 0x2A, 0x88, 0x22, 0x22, 0x1E,
@@ -307,7 +307,7 @@ const FX_BYTE g_koKR_Locale[] = {
0x3E, 0x9A, 0x72, 0x3B, 0x81, 0xDD, 0xF7, 0x47, 0xD2, 0x64, 0x9C, 0xA1, 0x05, 0x53, 0x2D, 0x75, 0x9E, 0x42, 0x3D, 0xFC,
0xFC, 0x17, 0xFF, 0x01, 0xDC, 0xF1, 0x18, 0xD3
};
-const FX_BYTE g_esES_Locale[] = {
+const uint8_t g_esES_Locale[] = {
0x78, 0x9C, 0x9D, 0x56, 0xCF, 0x6B, 0xD4, 0x40, 0x14, 0xBE, 0x0B, 0xFE, 0x0F, 0x21, 0x58, 0x56, 0xA1, 0xDD, 0xD1, 0x63,
0xCB, 0x36, 0x50, 0xDA, 0xDA, 0x95, 0x1A, 0x59, 0x9A, 0xAA, 0xD8, 0x8B, 0x4C, 0x92, 0xE9, 0xEE, 0xB4, 0xC9, 0xCC, 0x32,
0x49, 0x2C, 0x9B, 0xA3, 0xE0, 0x41, 0x10, 0x0B, 0xDE, 0x8A, 0x27, 0x0F, 0x1E, 0x04, 0x8B, 0x77, 0x51, 0x3C, 0xF4, 0x3F,
@@ -350,7 +350,7 @@ const FX_BYTE g_esES_Locale[] = {
0x43, 0x39, 0x99, 0xF1, 0x70, 0x01, 0xC9, 0xE1, 0x2D, 0x48, 0xF6, 0x24, 0x61, 0xC3, 0x23, 0x3E, 0xE5, 0xA9, 0xE6, 0xD0,
0x6C, 0xCF, 0x64, 0x94, 0xFD, 0xFC, 0xC2, 0xF2, 0x2F, 0x7C, 0xDC, 0xCC, 0x2F,
};
-const FX_BYTE g_esLA_Locale[] = {
+const uint8_t g_esLA_Locale[] = {
0x78, 0x9C, 0x9D, 0x56, 0xCD, 0x4E, 0xDC, 0x30, 0x10, 0x3E, 0x53, 0xA9, 0xEF, 0x60, 0x45, 0x45, 0x80, 0x04, 0x9B, 0xF6,
0xB8, 0x28, 0x44, 0x5A, 0x01, 0xA5, 0x15, 0x0D, 0x5A, 0x75, 0x51, 0x4B, 0xB9, 0x54, 0x4E, 0x62, 0x36, 0x86, 0xC4, 0x5E,
0x39, 0x09, 0x68, 0xA3, 0xBE, 0x40, 0x4F, 0x3D, 0xF4, 0xD4, 0x63, 0x2B, 0x21, 0xB5, 0x07, 0xD4, 0x47, 0xE8, 0x81, 0x67,
@@ -393,7 +393,7 @@ const FX_BYTE g_esLA_Locale[] = {
0xD6, 0x3C, 0x66, 0xD3, 0x73, 0x9E, 0x31, 0xF3, 0x22, 0xB3, 0x11, 0x57, 0x3B, 0x4F, 0x43, 0xCF, 0x3F, 0xEF, 0xCD, 0xBF,
0xC4, 0xB5, 0xD4, 0x04
};
-const FX_BYTE g_deDE_Loacale[] = {
+const uint8_t g_deDE_Loacale[] = {
0x78, 0x9C, 0x95, 0x56, 0x4D, 0x6F, 0xD4, 0x30, 0x10, 0xBD, 0x23, 0xF1, 0x1F, 0xAC, 0x88, 0xAA, 0x20, 0xB5, 0x1B, 0x38,
0xB6, 0xDA, 0x46, 0x5A, 0x75, 0xFB, 0x41, 0x4B, 0xCA, 0xAA, 0x69, 0x41, 0xF4, 0x82, 0xBC, 0x89, 0xBB, 0x71, 0x9B, 0xD8,
0x2B, 0xC7, 0x69, 0xB5, 0x39, 0xF2, 0x37, 0xB8, 0x72, 0x04, 0x71, 0xE4, 0x04, 0x17, 0xFE, 0x09, 0x52, 0x25, 0x7E, 0x06,
@@ -434,7 +434,7 @@ const FX_BYTE g_deDE_Loacale[] = {
0x0A, 0xCC, 0x59, 0x39, 0x19, 0x7A, 0xB3, 0x82, 0x04, 0x6F, 0xFA, 0xC7, 0x49, 0xFE, 0x22, 0x67, 0xB3, 0x2B, 0xBE, 0xE4,
0xA9, 0xE6, 0xDC, 0xFB, 0x3D, 0x2B, 0xA3, 0xEA, 0x73, 0x16, 0x96, 0xFF, 0x00, 0x29, 0x27, 0xAF, 0x17,
};
-const FX_BYTE g_frFR_Locale[] = {
+const uint8_t g_frFR_Locale[] = {
0x78, 0x9C, 0x95, 0x56, 0x4D, 0x6F, 0xD3, 0x40, 0x10, 0xBD, 0x23, 0xF1, 0x1F, 0x56, 0x16, 0x55, 0x41, 0x6A, 0xBD, 0x70,
0x4C, 0x95, 0x5A, 0xAA, 0xFA, 0x15, 0x28, 0x46, 0x51, 0x53, 0x40, 0xF4, 0x82, 0x36, 0xF6, 0x36, 0xDE, 0xD4, 0xDE, 0x8D,
0xD6, 0x76, 0x4A, 0x7C, 0xE4, 0x3F, 0x70, 0xE2, 0xC2, 0xB5, 0x12, 0x88, 0x03, 0x47, 0xC4, 0x85, 0xFE, 0x13, 0x24, 0x10,
@@ -476,7 +476,7 @@ const FX_BYTE g_frFR_Locale[] = {
0x7A, 0xBE, 0x86, 0x34, 0x12, 0x1D, 0x48, 0xEE, 0x22, 0xE5, 0x93, 0xA9, 0x58, 0xF2, 0x54, 0x73, 0xF8, 0x76, 0xCF, 0xF2,
0xA8, 0xF8, 0xD2, 0x85, 0xE5, 0x3F, 0x5D, 0x49, 0xBE, 0x1B
};
-const FX_BYTE g_itIT_Locale[] = {
+const uint8_t g_itIT_Locale[] = {
0x78, 0x9C, 0x95, 0x56, 0xD1, 0x6A, 0xD4, 0x40, 0x14, 0x7D, 0x17, 0xFC, 0x87, 0x21, 0x58, 0x50, 0x68, 0x3B, 0xFA, 0xD8,
0x92, 0x06, 0x4A, 0x5B, 0xBB, 0xA5, 0x46, 0x96, 0xEE, 0xAA, 0xD8, 0x17, 0x99, 0x64, 0xA6, 0xD9, 0xB1, 0xC9, 0xCC, 0x32,
0x49, 0x5A, 0x92, 0x47, 0xF1, 0xC1, 0x37, 0x7F, 0x42, 0x10, 0x41, 0xF1, 0x23, 0xFC, 0x13, 0xA1, 0xE2, 0x67, 0x78, 0xB3,
@@ -517,7 +517,7 @@ const FX_BYTE g_itIT_Locale[] = {
0x53, 0x60, 0x46, 0xD5, 0x64, 0xE8, 0xC5, 0x1A, 0xD2, 0x4C, 0x8E, 0x20, 0xF9, 0x45, 0x2E, 0xA2, 0xF7, 0x72, 0xC5, 0xD3,
0xCD, 0xE1, 0xDB, 0x3D, 0xAB, 0xA2, 0xFA, 0xD3, 0x16, 0x96, 0xFF, 0x00, 0x20, 0x8B, 0xBE, 0xF7
};
-const FX_BYTE g_ptBR_Locale[] = {
+const uint8_t g_ptBR_Locale[] = {
0x78, 0x9C, 0x9D, 0x56, 0x3D, 0x6F, 0xD4, 0x40, 0x10, 0xAD, 0x83, 0xC4, 0x7F, 0x58, 0x59, 0x89, 0x0E, 0xA4, 0x24, 0x86,
0x92, 0xC8, 0x67, 0xE9, 0x92, 0x0B, 0x39, 0x94, 0x18, 0x9D, 0xCE, 0x11, 0x88, 0x34, 0x68, 0x6D, 0xEF, 0xD9, 0x9B, 0xD8,
0xBB, 0xC7, 0xDA, 0x4E, 0xB0, 0x6B, 0x1A, 0x3A, 0x28, 0x29, 0x53, 0x20, 0x2A, 0x44, 0x83, 0x44, 0x49, 0x91, 0xDF, 0x82,
@@ -560,7 +560,7 @@ const FX_BYTE g_ptBR_Locale[] = {
0xD6, 0x4E, 0xAA, 0x04, 0x67, 0xBD, 0x30, 0x9D, 0x0E, 0x82, 0x69, 0x51, 0x48, 0xEC, 0x4B, 0x9A, 0x22, 0xB3, 0x24, 0xD3,
0xC1, 0x56, 0x39, 0x4F, 0x45, 0xCE, 0xFE, 0xF7, 0xD5, 0x3F, 0x30, 0xBB, 0xD9, 0x9B
};
-const FX_BYTE g_nlNL_Locale[] = {
+const uint8_t g_nlNL_Locale[] = {
0x78, 0x9C, 0x95, 0x56, 0x4D, 0x4F, 0xDC, 0x30, 0x10, 0x3D, 0x53, 0xA9, 0xFF, 0xC1, 0x8A, 0x8A, 0x68, 0x25, 0x96, 0x2D,
0x47, 0x50, 0x88, 0xB4, 0x05, 0x0A, 0x15, 0x04, 0xAD, 0x58, 0xDA, 0xAA, 0x5C, 0x2A, 0x6F, 0x62, 0x76, 0xBD, 0x24, 0xF6,
0xCA, 0x89, 0x41, 0xC9, 0xB1, 0x52, 0x8F, 0xFD, 0x27, 0xAD, 0xDA, 0x5B, 0xFF, 0x4F, 0xA5, 0x4A, 0xFC, 0x8C, 0x8E, 0xF3,
@@ -601,7 +601,7 @@ const FX_BYTE g_nlNL_Locale[] = {
0xF6, 0xFE, 0x34, 0x70, 0x17, 0xAA, 0x4B, 0x74, 0xDE, 0x4B, 0x9B, 0xF1, 0x41, 0x34, 0x37, 0x91, 0x6C, 0xB1, 0xE2, 0x19,
0x33, 0x2F, 0x32, 0x1B, 0x6D, 0xB5, 0xF3, 0xB4, 0xC7, 0xF9, 0xA7, 0xBA, 0xF3, 0x0F, 0xD5, 0xFA, 0xC0, 0xFA
};
-const FX_BYTE g_ruRU_Locale[] = {
+const uint8_t g_ruRU_Locale[] = {
0x78, 0x9C, 0xAD, 0x57, 0x4D, 0x4F, 0x13, 0x41, 0x18, 0x3E, 0x63, 0xE2, 0x7F, 0x98, 0x6C, 0x24, 0x68, 0x02, 0xAD, 0x1E,
0x25, 0x65, 0x13, 0x22, 0x0A, 0x06, 0xD7, 0x90, 0x16, 0x34, 0x72, 0x31, 0xDB, 0xDD, 0xA1, 0x5D, 0xE8, 0xEE, 0x90, 0xE9,
0x6E, 0xB0, 0x7B, 0x2A, 0x85, 0xE8, 0x05, 0x25, 0xE1, 0xA0, 0x47, 0xF4, 0xE4, 0xC9, 0x50, 0xBE, 0x12, 0x82, 0xB6, 0x24,
@@ -753,12 +753,12 @@ CXFA_LocaleMgr::CXFA_LocaleMgr(CXFA_Node* pLocaleSet, CFX_WideString wsDeflcid)
}
CXFA_LocaleMgr::~CXFA_LocaleMgr()
{
- FX_INT32 iCount = m_LocaleArray.GetSize();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = m_LocaleArray.GetSize();
+ for (int32_t i = 0; i < iCount; i++) {
((IFX_Locale*)m_LocaleArray[i])->Release();
}
- FX_INT32 iXmls = m_XMLLocaleArray.GetSize();
- for (FX_INT32 j = 0; j < iXmls; j++) {
+ int32_t iXmls = m_XMLLocaleArray.GetSize();
+ for (int32_t j = 0; j < iXmls; j++) {
((IFX_Locale*)m_XMLLocaleArray[j])->Release();
}
}
@@ -840,15 +840,15 @@ IFX_Locale* CXFA_LocaleMgr::GetLocale(FX_WORD lcid)
}
IFX_Locale* CXFA_LocaleMgr::GetLocaleByName(FX_WSTR wsLocaleName)
{
- FX_INT32 iCount = m_LocaleArray.GetSize();
- FX_INT32 i = 0;
+ int32_t iCount = m_LocaleArray.GetSize();
+ int32_t i = 0;
for (i = 0; i < iCount; i++) {
IFX_Locale* pLocale = ((IFX_Locale*)m_LocaleArray[i]);
if (pLocale->GetName() == wsLocaleName) {
return pLocale;
}
}
- FX_INT32 iLen = wsLocaleName.GetLength();
+ int32_t iLen = wsLocaleName.GetLength();
if (iLen < 2) {
return NULL;
}
@@ -913,12 +913,12 @@ CXFA_TimeZoneProvider::CXFA_TimeZoneProvider()
{
#if _FXM_PLATFORM_==_FXM_PLATFORM_WINDOWS_
_tzset();
- m_tz.tzHour = (FX_INT8)(_timezone / 3600 * -1);
- m_tz.tzMinute = (FX_INT8)((FXSYS_abs(_timezone) % 3600) / 60);
+ m_tz.tzHour = (int8_t)(_timezone / 3600 * -1);
+ m_tz.tzMinute = (int8_t)((FXSYS_abs(_timezone) % 3600) / 60);
#else
tzset();
- m_tz.tzHour = (FX_INT8)(timezone / 3600 * -1);
- m_tz.tzMinute = (FX_INT8)((FXSYS_abs((int)timezone) % 3600) / 60);
+ m_tz.tzHour = (int8_t)(timezone / 3600 * -1);
+ m_tz.tzMinute = (int8_t)((FXSYS_abs((int)timezone) % 3600) / 60);
#endif
}
CXFA_TimeZoneProvider::~CXFA_TimeZoneProvider()
diff --git a/xfa/src/fxfa/src/parser/xfa_localevalue.cpp b/xfa/src/fxfa/src/parser/xfa_localevalue.cpp
index 46ea47dc5d..3f9d066122 100644
--- a/xfa/src/fxfa/src/parser/xfa_localevalue.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_localevalue.cpp
@@ -100,8 +100,8 @@ FX_BOOL CXFA_LocaleValue::ValidateValue(const CFX_WideString& wsValue, const CFX
CFX_WideStringArray wsPatterns;
pFormat->SplitFormatString(wsPattern, wsPatterns);
FX_BOOL bRet = FALSE;
- FX_INT32 iCount = wsPatterns.GetSize();
- FX_INT32 i = 0;
+ int32_t iCount = wsPatterns.GetSize();
+ int32_t i = 0;
for (; i < iCount && !bRet; i++) {
CFX_WideString wsFormat = wsPatterns[i];
FX_LOCALECATEGORY eCategory = pFormat->GetCategory(wsFormat);
@@ -199,9 +199,9 @@ FX_FLOAT CXFA_LocaleValue::GetNum() const
{
if (m_bValid && (m_dwType == XFA_VT_BOOLEAN || m_dwType == XFA_VT_INTEGER ||
m_dwType == XFA_VT_DECIMAL || m_dwType == XFA_VT_FLOAT)) {
- FX_INT64 nIntegral = 0;
+ int64_t nIntegral = 0;
FX_DWORD dwFractional = 0;
- FX_INT32 nExponent = 0;
+ int32_t nExponent = 0;
int cc = 0;
FX_BOOL bNegative = FALSE, bExpSign = FALSE;
FX_LPCWSTR str = (FX_LPCWSTR)m_wsValue;
@@ -275,10 +275,10 @@ FX_DOUBLE CXFA_LocaleValue::GetDoubleNum() const
{
if (m_bValid && (m_dwType == XFA_VT_BOOLEAN || m_dwType == XFA_VT_INTEGER ||
m_dwType == XFA_VT_DECIMAL || m_dwType == XFA_VT_FLOAT)) {
- FX_INT64 nIntegral = 0;
+ int64_t nIntegral = 0;
FX_DWORD dwFractional = 0;
- FX_INT32 nExponent = 0;
- FX_INT32 cc = 0;
+ int32_t nExponent = 0;
+ int32_t cc = 0;
FX_BOOL bNegative = FALSE, bExpSign = FALSE;
FX_LPCWSTR str = (FX_LPCWSTR)m_wsValue;
int len = m_wsValue.GetLength();
@@ -294,7 +294,7 @@ FX_DOUBLE CXFA_LocaleValue::GetDoubleNum() const
bNegative = TRUE;
cc++;
}
- FX_INT32 nIntegralLen = 0;
+ int32_t nIntegralLen = 0;
while (cc < len) {
if (str[cc] == '.' || !XFA_IsDigit(str[cc]) || nIntegralLen > 17) {
break;
@@ -304,7 +304,7 @@ FX_DOUBLE CXFA_LocaleValue::GetDoubleNum() const
nIntegralLen++;
}
nIntegral = bNegative ? -nIntegral : nIntegral;
- FX_INT32 scale = 0;
+ int32_t scale = 0;
FX_DOUBLE fraction = 0.0;
if (cc < len && str[cc] == '.') {
cc ++;
@@ -369,7 +369,7 @@ CFX_Unitime CXFA_LocaleValue::GetTime() const
CFX_Unitime CXFA_LocaleValue::GetDateTime() const
{
if (m_bValid && m_dwType == XFA_VT_DATETIME) {
- FX_INT32 index = m_wsValue.Find('T');
+ int32_t index = m_wsValue.Find('T');
CFX_Unitime dt;
FX_DateFromCanonical(m_wsValue.Left(index), dt);
FXSYS_assert(m_pLocaleMgr);
@@ -454,8 +454,8 @@ FX_BOOL CXFA_LocaleValue::FormatPatterns(CFX_WideString& wsResult, const CFX_Wid
IFX_FormatString* pFormat = IFX_FormatString::Create(m_pLocaleMgr, FALSE);
CFX_WideStringArray wsPatterns;
pFormat->SplitFormatString(wsFormat, wsPatterns);
- FX_INT32 iCount = wsPatterns.GetSize();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = wsPatterns.GetSize();
+ for (int32_t i = 0; i < iCount; i++) {
bRet = FormatSinglePattern(wsResult, wsPatterns[i], pLocale, eValueType);
if (bRet) {
break;
@@ -650,7 +650,7 @@ FX_BOOL CXFA_LocaleValue::ValidateCanonicalDate(const CFX_WideString& wsDate, CF
return FALSE;
}
CFX_Unitime ut;
- ut.Set(wYear, static_cast<FX_BYTE>(wMonth), static_cast<FX_BYTE>(wDay));
+ ut.Set(wYear, static_cast<uint8_t>(wMonth), static_cast<uint8_t>(wDay));
unDate = unDate + ut;
return TRUE;
}
@@ -718,7 +718,7 @@ FX_BOOL CXFA_LocaleValue::ValidateCanonicalTime(const CFX_WideString& wsTime)
if (pTime[nIndex] == 'Z') {
nIndex++;
} else if (pTime[nIndex] == '-' || pTime[nIndex] == '+') {
- FX_SHORT nOffsetH = 0, nOffsetM = 0;
+ int16_t nOffsetH = 0, nOffsetM = 0;
nIndex++;
nStart = nIndex;
while (pTime[nIndex] != '\0' && nIndex - nStart < wCountH && nIndex < nLen) {
@@ -796,8 +796,8 @@ FX_BOOL CXFA_LocaleValue::ParsePatternValue(const CFX_WideString& wsValue, const
CFX_WideStringArray wsPatterns;
pFormat->SplitFormatString(wsPattern, wsPatterns);
FX_BOOL bRet = FALSE;
- FX_INT32 iCount = wsPatterns.GetSize();
- for (FX_INT32 i = 0; i < iCount && !bRet; i++) {
+ int32_t iCount = wsPatterns.GetSize();
+ for (int32_t i = 0; i < iCount && !bRet; i++) {
CFX_WideString wsFormat = wsPatterns[i];
FX_LOCALECATEGORY eCategory = pFormat->GetCategory(wsFormat);
eCategory = XFA_ValugeCategory(eCategory, m_dwType);
@@ -867,17 +867,17 @@ FX_BOOL CXFA_LocaleValue::ParsePatternValue(const CFX_WideString& wsValue, const
}
return bRet;
}
-void CXFA_LocaleValue::GetNumbericFormat(CFX_WideString &wsFormat, FX_INT32 nIntLen, FX_INT32 nDecLen, FX_BOOL bSign )
+void CXFA_LocaleValue::GetNumbericFormat(CFX_WideString &wsFormat, int32_t nIntLen, int32_t nDecLen, FX_BOOL bSign )
{
FXSYS_assert(wsFormat.IsEmpty());
FXSYS_assert(nIntLen >= -1 && nDecLen >= -1);
- FX_INT32 nTotalLen \
+ int32_t nTotalLen \
= (nIntLen >= 0 ? nIntLen : 2) \
+ (bSign ? 1 : 0) \
+ (nDecLen >= 0 ? nDecLen : 2) \
+ (nDecLen == 0 ? 0 : 1);
FX_LPWSTR lpBuf = wsFormat.GetBuffer(nTotalLen);
- FX_INT32 nPos = 0;
+ int32_t nPos = 0;
if (bSign) {
lpBuf[nPos++] = L's';
}
@@ -904,14 +904,14 @@ void CXFA_LocaleValue::GetNumbericFormat(CFX_WideString &wsFormat, FX_INT32 nInt
}
wsFormat.ReleaseBuffer(nTotalLen);
}
-FX_BOOL CXFA_LocaleValue::ValidateNumericTemp(CFX_WideString& wsNumeric, CFX_WideString& wsFormat, IFX_Locale* pLocale , FX_INT32* pos )
+FX_BOOL CXFA_LocaleValue::ValidateNumericTemp(CFX_WideString& wsNumeric, CFX_WideString& wsFormat, IFX_Locale* pLocale , int32_t* pos )
{
if (wsFormat.IsEmpty() || wsNumeric.IsEmpty()) {
return TRUE;
}
FX_LPCWSTR pNum = FX_LPCWSTR(wsNumeric);
FX_LPCWSTR pFmt = FX_LPCWSTR(wsFormat);
- FX_INT32 n = 0, nf = 0;
+ int32_t n = 0, nf = 0;
FX_WCHAR c = pNum[n];
FX_WCHAR cf = pFmt[nf];
if (cf == L's') {
@@ -921,8 +921,8 @@ FX_BOOL CXFA_LocaleValue::ValidateNumericTemp(CFX_WideString& wsNumeric, CFX_Wid
++nf;
}
FX_BOOL bLimit = TRUE;
- FX_INT32 nCount = wsNumeric.GetLength();
- FX_INT32 nCountFmt = wsFormat.GetLength();
+ int32_t nCount = wsNumeric.GetLength();
+ int32_t nCountFmt = wsFormat.GetLength();
while (n < nCount && (bLimit ? nf < nCountFmt : TRUE) && XFA_IsDigit(c = pNum[n])) {
if (bLimit == TRUE) {
if ((cf = pFmt[nf]) == L'*') {
diff --git a/xfa/src/fxfa/src/parser/xfa_object_imp.cpp b/xfa/src/fxfa/src/parser/xfa_object_imp.cpp
index f275780952..153110492f 100644
--- a/xfa/src/fxfa/src/parser/xfa_object_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_object_imp.cpp
@@ -29,7 +29,7 @@ void CXFA_Object::GetClassName(CFX_WideStringC &wsName) const
ASSERT(pElement != NULL);
wsName = pElement->pName;
}
-FX_UINT32 CXFA_Object::GetClassHashCode() const
+uint32_t CXFA_Object::GetClassHashCode() const
{
XFA_LPCELEMENTINFO pElement = XFA_GetElementByID(GetClassID());
ASSERT(pElement != NULL);
@@ -59,7 +59,7 @@ void CXFA_Object::Script_ObjectClass_ClassName(FXJSE_HVALUE hValue, FX_BOOL bSet
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
}
}
-void CXFA_Object::ThrowScriptErrorMessage(FX_INT32 iStringID, ...)
+void CXFA_Object::ThrowScriptErrorMessage(int32_t iStringID, ...)
{
IXFA_AppProvider* pAppProvider = m_pDocument->GetNotify()->GetAppProvider();
FXSYS_assert(pAppProvider);
@@ -225,7 +225,7 @@ CXFA_Node* CXFA_Node::GetNodeItem(XFA_NODEITEM eItem, XFA_OBJECTTYPE eType) cons
}
return pNode;
}
-FX_INT32 CXFA_Node::GetNodeList(CXFA_NodeArray &nodes, FX_DWORD dwTypeFilter , XFA_ELEMENT eElementFilter , FX_INT32 iLevel )
+int32_t CXFA_Node::GetNodeList(CXFA_NodeArray &nodes, FX_DWORD dwTypeFilter , XFA_ELEMENT eElementFilter , int32_t iLevel )
{
if (--iLevel < 0) {
return nodes.GetSize();
@@ -273,12 +273,12 @@ FX_INT32 CXFA_Node::GetNodeList(CXFA_NodeArray &nodes, FX_DWORD dwTypeFilter , X
pChild = pChild->m_pNext;
}
if (bFilterOneOfProperties && nodes.GetSize() < 1) {
- FX_INT32 iProperties = 0;
+ int32_t iProperties = 0;
XFA_LPCPROPERTY pProperty = XFA_GetElementProperties(GetClassID(), iProperties);
if (pProperty == NULL || iProperties < 1) {
return 0;
}
- for (FX_INT32 i = 0; i < iProperties; i++) {
+ for (int32_t i = 0; i < iProperties; i++) {
if (pProperty[i].uFlags & XFA_PROPERTYFLAG_DefaultOneOf) {
IXFA_ObjFactory *pFactory = m_pDocument->GetParser()->GetFactory();
XFA_LPCPACKETINFO pPacket = XFA_GetPacketByID(GetPacketID());
@@ -335,7 +335,7 @@ CXFA_Node* CXFA_Node::GetBindData()
ASSERT(GetPacketID() == XFA_XDPPACKET_Form);
return (CXFA_Node*)GetObject(XFA_ATTRIBUTE_BindingNode);
}
-FX_INT32 CXFA_Node::GetBindItems(CXFA_NodeArray& formItems)
+int32_t CXFA_Node::GetBindItems(CXFA_NodeArray& formItems)
{
if (m_uFlags & XFA_NODEFLAG_BindFormItems) {
CXFA_NodeArray* pItems = NULL;
@@ -356,7 +356,7 @@ static void XFA_DataNodeDeleteBindItem(FX_LPVOID pData)
}
}
static XFA_MAPDATABLOCKCALLBACKINFO deleteBindItemCallBack = {XFA_DataNodeDeleteBindItem, NULL};
-FX_INT32 CXFA_Node::AddBindItem(CXFA_Node* pFormNode)
+int32_t CXFA_Node::AddBindItem(CXFA_Node* pFormNode)
{
ASSERT(pFormNode);
if (m_uFlags & XFA_NODEFLAG_BindFormItems) {
@@ -382,14 +382,14 @@ FX_INT32 CXFA_Node::AddBindItem(CXFA_Node* pFormNode)
m_uFlags |= XFA_NODEFLAG_BindFormItems;
return 2;
}
-FX_INT32 CXFA_Node::RemoveBindItem(CXFA_Node* pFormNode)
+int32_t CXFA_Node::RemoveBindItem(CXFA_Node* pFormNode)
{
if (m_uFlags & XFA_NODEFLAG_BindFormItems) {
CXFA_NodeArray* pItems = NULL;
TryObject(XFA_ATTRIBUTE_BindingNode, (FX_LPVOID&)pItems);
ASSERT(pItems);
- FX_INT32 iIndex = pItems->Find(pFormNode);
- FX_INT32 iCount = pItems->GetSize();
+ int32_t iIndex = pItems->Find(pFormNode);
+ int32_t iCount = pItems->GetSize();
if (iIndex >= 0) {
if (iIndex != iCount - 1) {
pItems->SetAt(iIndex, pItems->GetAt(iCount - 1));
@@ -451,7 +451,7 @@ CXFA_WidgetData* CXFA_Node::GetContainerWidgetData()
pFieldWidgetData = NULL;
CXFA_NodeArray formNodes;
pDataNode->GetBindItems(formNodes);
- for (FX_INT32 i = 0; i < formNodes.GetSize(); i++) {
+ for (int32_t i = 0; i < formNodes.GetSize(); i++) {
CXFA_Node* pFormNode = formNodes.GetAt(i);
if (!pFormNode || pFormNode->HasFlag(XFA_NODEFLAG_HasRemoved)) {
continue;
@@ -600,7 +600,7 @@ void CXFA_Node::SetDataDescriptionNode(CXFA_Node* pDataDescriptionNode)
}
void CXFA_Node::Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"resolveNode");
return;
@@ -618,7 +618,7 @@ void CXFA_Node::Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments)
}
FX_DWORD dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Attributes | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings;
XFA_RESOLVENODE_RS resoveNodeRS;
- FX_INT32 iRet = pScriptContext->ResolveObjects(refNode, wsExpression, resoveNodeRS, dwFlag);
+ int32_t iRet = pScriptContext->ResolveObjects(refNode, wsExpression, resoveNodeRS, dwFlag);
if (iRet < 1) {
return FXJSE_Value_SetNull(pArguments->GetReturnValue());
}
@@ -641,7 +641,7 @@ void CXFA_Node::Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_TreeClass_ResolveNodes(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"resolveNodes");
return;
@@ -670,10 +670,10 @@ void CXFA_Node::Script_Som_ResolveNodeList(FXJSE_HVALUE hValue, CFX_WideString w
if(refNode == NULL) {
refNode = this;
}
- FX_INT32 iRet = pScriptContext->ResolveObjects(refNode, wsExpression, resoveNodeRS, dwFlag);
+ int32_t iRet = pScriptContext->ResolveObjects(refNode, wsExpression, resoveNodeRS, dwFlag);
CXFA_ArrayNodeList* pNodeList = FX_NEW CXFA_ArrayNodeList(m_pDocument);
if (resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) {
- for (FX_INT32 i = 0; i < resoveNodeRS.nodes.GetSize(); i++) {
+ for (int32_t i = 0; i < resoveNodeRS.nodes.GetSize(); i++) {
if (resoveNodeRS.nodes[i]->IsNode()) {
pNodeList->Append((CXFA_Node*)resoveNodeRS.nodes[i]);
}
@@ -683,7 +683,7 @@ void CXFA_Node::Script_Som_ResolveNodeList(FXJSE_HVALUE hValue, CFX_WideString w
if (resoveNodeRS.GetAttributeResult(hValueArray) > 0) {
CXFA_ObjArray objectArray;
hValueArray.GetAttributeObject(objectArray);
- for (FX_INT32 i = 0; i < objectArray.GetSize(); i++) {
+ for (int32_t i = 0; i < objectArray.GetSize(); i++) {
if (objectArray[i]->IsNode()) {
pNodeList->Append((CXFA_Node*)objectArray[i]);
}
@@ -774,7 +774,7 @@ void CXFA_Node::Script_TreeClass_SomExpression(FXJSE_HVALUE hValue, FX_BOOL bSet
}
void CXFA_Node::Script_NodeClass_ApplyXSL(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"applyXSL");
return;
@@ -785,14 +785,14 @@ void CXFA_Node::Script_NodeClass_ApplyXSL(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_NodeClass_AssignNode(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 3) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"assignNode");
return;
}
CFX_WideString wsExpression;
CFX_WideString wsValue;
- FX_INT32 iAction = 0;
+ int32_t iAction = 0;
if (iLength >= 1) {
CFX_ByteString bsExpression = pArguments->GetUTF8String(0);
wsExpression = CFX_WideString::FromUTF8(bsExpression, bsExpression.GetLength());
@@ -807,7 +807,7 @@ void CXFA_Node::Script_NodeClass_AssignNode(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_NodeClass_Clone(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"clone");
return;
@@ -819,7 +819,7 @@ void CXFA_Node::Script_NodeClass_Clone(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_NodeClass_GetAttribute(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"getAttribute");
return;
@@ -836,13 +836,13 @@ void CXFA_Node::Script_NodeClass_GetAttribute(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_NodeClass_GetElement(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 2) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"getElement");
return;
}
CFX_WideString wsExpression;
- FX_INT32 iValue = 0;
+ int32_t iValue = 0;
if (iLength >= 1) {
CFX_ByteString bsExpression = pArguments->GetUTF8String(0);
wsExpression = CFX_WideString::FromUTF8(bsExpression, bsExpression.GetLength());
@@ -856,14 +856,14 @@ void CXFA_Node::Script_NodeClass_GetElement(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_NodeClass_IsPropertySpecified(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 3) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"isPropertySpecified");
return;
}
CFX_WideString wsExpression;
FX_BOOL bParent = TRUE;
- FX_INT32 iIndex = 0;
+ int32_t iIndex = 0;
if (iLength >= 1) {
CFX_ByteString bsExpression = pArguments->GetUTF8String(0);
wsExpression = CFX_WideString::FromUTF8(bsExpression, bsExpression.GetLength());
@@ -891,7 +891,7 @@ void CXFA_Node::Script_NodeClass_IsPropertySpecified(CFXJSE_Arguments* pArgument
}
void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 3) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"loadXML");
return;
@@ -917,7 +917,7 @@ void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments)
return;
}
IFDE_XMLNode* pXMLNode = NULL;
- FX_INT32 iParserStatus = pParser->ParseXMLData(wsExpression, pXMLNode, NULL);
+ int32_t iParserStatus = pParser->ParseXMLData(wsExpression, pXMLNode, NULL);
if (iParserStatus != XFA_PARSESTATUS_Done || !pXMLNode) {
pParser->Release();
pParser = NULL;
@@ -962,7 +962,7 @@ void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments)
if (bOverwrite) {
CXFA_Node *pChild = this->GetNodeItem(XFA_NODEITEM_FirstChild);
CXFA_Node* pNewChild = pFakeRoot->GetNodeItem(XFA_NODEITEM_FirstChild);
- FX_INT32 index = 0;
+ int32_t index = 0;
while (pNewChild) {
CXFA_Node* pItem = pNewChild->GetNodeItem(XFA_NODEITEM_NextSibling);
pFakeRoot->RemoveChild(pNewChild);
@@ -1016,7 +1016,7 @@ void CXFA_Node::Script_NodeClass_SaveFilteredXML(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_NodeClass_SaveXML(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 0 || iLength > 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"saveXML");
return;
@@ -1090,7 +1090,7 @@ void CXFA_Node::Script_NodeClass_SaveXML(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_NodeClass_SetAttribute(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 2) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"setAttribute");
return;
@@ -1105,7 +1105,7 @@ void CXFA_Node::Script_NodeClass_SetAttribute(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_NodeClass_SetElement(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1 && iLength != 2) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"setElement");
return;
@@ -1165,7 +1165,7 @@ void CXFA_Node::Script_NodeClass_OneOfChild(FXJSE_HVALUE hValue, FX_BOOL bSettin
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
} else {
CXFA_NodeArray properts;
- FX_INT32 iSize = this->GetNodeList(properts, XFA_NODEFILTER_OneOfProperty);
+ int32_t iSize = this->GetNodeList(properts, XFA_NODEFILTER_OneOfProperty);
if (iSize > 0) {
FXJSE_Value_Set(hValue, m_pDocument->GetScriptContext()->GetJSValueFromMap(properts[0]));
}
@@ -1188,7 +1188,7 @@ void CXFA_Node::Script_ModelClass_CreateNode(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_ModelClass_IsCompatibleNS(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"isCompatibleNS");
return;
@@ -1412,7 +1412,7 @@ void CXFA_Node::Script_Attribute_String(FXJSE_HVALUE hValue, FX_BOOL bSetting, X
if(!wsSOM.IsEmpty()) {
FX_DWORD dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Attributes | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings;
XFA_RESOLVENODE_RS resoveNodeRS;
- FX_INT32 iRet = m_pDocument->GetScriptContext()->ResolveObjects(pProtoRoot, wsSOM, resoveNodeRS, dwFlag);
+ int32_t iRet = m_pDocument->GetScriptContext()->ResolveObjects(pProtoRoot, wsSOM, resoveNodeRS, dwFlag);
if(iRet > 0 && resoveNodeRS.nodes[0]->IsNode()) {
pProtoNode = (CXFA_Node*)resoveNodeRS.nodes[0];
}
@@ -1456,7 +1456,7 @@ void CXFA_Node::Script_Attribute_StringRead(FXJSE_HVALUE hValue, FX_BOOL bSettin
}
void CXFA_Node::Script_WsdlConnection_Execute(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if ((argc == 0) || (argc == 1)) {
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), FALSE);
} else {
@@ -1465,7 +1465,7 @@ void CXFA_Node::Script_WsdlConnection_Execute(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Delta_Restore(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"restore");
@@ -1575,7 +1575,7 @@ void CXFA_Node::Script_Som_DefaultValue(FXJSE_HVALUE hValue, FX_BOOL bSetting, X
CXFA_NodeArray formNodes;
this->GetBindItems(formNodes);
CFX_WideString wsPicture;
- for (FX_INT32 i = 0; i < formNodes.GetSize(); i++) {
+ for (int32_t i = 0; i < formNodes.GetSize(); i++) {
CXFA_Node* pFormNode = formNodes.GetAt(i);
if (!pFormNode || pFormNode->HasFlag(XFA_NODEFLAG_HasRemoved)) {
continue;
@@ -1630,7 +1630,7 @@ void CXFA_Node::Script_Boolean_Value(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_
if (!(FXJSE_Value_IsNull(hValue) || FXJSE_Value_IsUndefined(hValue))) {
FXJSE_Value_ToUTF8String(hValue, newValue);
}
- FX_INT32 iValue = FXSYS_atoi(newValue);
+ int32_t iValue = FXSYS_atoi(newValue);
CFX_WideString wsNewValue = (iValue == 0) ? FX_WSTRC(L"0") : FX_WSTRC(L"1");
CFX_WideString wsFormatValue(wsNewValue);
CXFA_WidgetData* pContainerWidgetData = GetContainerWidgetData();
@@ -1645,10 +1645,10 @@ void CXFA_Node::Script_Boolean_Value(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_
}
struct XFA_ExecEventParaInfo {
public:
- FX_UINT32 m_uHash;
+ uint32_t m_uHash;
FX_LPCWSTR m_lpcEventName;
XFA_EVENTTYPE m_eventType;
- FX_UINT32 m_validFlags;
+ uint32_t m_validFlags;
};
static const XFA_ExecEventParaInfo gs_eventParaInfos[] = {
{0x02a6c55a, L"postSubmit", XFA_EVENT_PostSubmit, 0},
@@ -1679,11 +1679,11 @@ static const XFA_ExecEventParaInfo gs_eventParaInfos[] = {
};
const XFA_ExecEventParaInfo* GetEventParaInfoByName(FX_WSTR wsEventName)
{
- FX_INT32 iLength = wsEventName.GetLength();
- FX_UINT32 uHash = FX_HashCode_String_GetW(wsEventName.GetPtr(), iLength);
+ int32_t iLength = wsEventName.GetLength();
+ uint32_t uHash = FX_HashCode_String_GetW(wsEventName.GetPtr(), iLength);
const XFA_ExecEventParaInfo* eventParaInfo = NULL;
- FX_INT32 iStart = 0, iEnd = (sizeof(gs_eventParaInfos) / sizeof(gs_eventParaInfos[0])) - 1;
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iStart = 0, iEnd = (sizeof(gs_eventParaInfos) / sizeof(gs_eventParaInfos[0])) - 1;
+ int32_t iMid = (iStart + iEnd) / 2;
do {
iMid = (iStart + iEnd) / 2;
eventParaInfo = &gs_eventParaInfos[iMid];
@@ -1697,15 +1697,15 @@ const XFA_ExecEventParaInfo* GetEventParaInfoByName(FX_WSTR wsEventName)
} while (iStart <= iEnd);
return NULL;
}
-void XFA_STRING_TO_RGB(CFX_WideString &strRGB, FX_INT32 &r, FX_INT32 &g, FX_INT32 &b)
+void XFA_STRING_TO_RGB(CFX_WideString &strRGB, int32_t &r, int32_t &g, int32_t &b)
{
r = 0;
g = 0;
b = 0;
FX_WCHAR zero = '0';
- FX_INT32 iIndex = 0;
- FX_INT32 iLen = strRGB.GetLength();
- for (FX_INT32 i = 0; i < iLen; ++i) {
+ int32_t iIndex = 0;
+ int32_t iLen = strRGB.GetLength();
+ for (int32_t i = 0; i < iLen; ++i) {
FX_WCHAR ch = strRGB.GetAt(i);
if (ch == L',') {
++iIndex;
@@ -1713,7 +1713,7 @@ void XFA_STRING_TO_RGB(CFX_WideString &strRGB, FX_INT32 &r, FX_INT32 &g, FX_INT3
if (iIndex > 2) {
break;
}
- FX_INT32 iValue = ch - zero;
+ int32_t iValue = ch - zero;
if (iValue >= 0 && iValue <= 9) {
switch (iIndex) {
case 0:
@@ -1736,23 +1736,23 @@ void CXFA_Node::Script_Som_BorderColor(FXJSE_HVALUE hValue, FX_BOOL bSetting, XF
return;
}
CXFA_Border border = pWidgetData->GetBorder(TRUE);
- FX_INT32 iSize = border.CountEdges();
+ int32_t iSize = border.CountEdges();
CFX_WideString strColor;
if (bSetting) {
CFX_ByteString bsValue;
FXJSE_Value_ToUTF8String(hValue, bsValue);
strColor = CFX_WideString::FromUTF8(bsValue, bsValue.GetLength());
- FX_INT32 r = 0, g = 0, b = 0;
+ int32_t r = 0, g = 0, b = 0;
XFA_STRING_TO_RGB(strColor, r, g, b);
FX_ARGB rgb = ArgbEncode(100, r, g, b);
- for (FX_INT32 i = 0; i < iSize; ++i) {
+ for (int32_t i = 0; i < iSize; ++i) {
CXFA_Edge edge = border.GetEdge(i);
edge.SetColor(rgb);
}
} else {
CXFA_Edge edge = border.GetEdge(0);
FX_ARGB color = edge.GetColor();
- FX_INT32 a, r, g, b;
+ int32_t a, r, g, b;
ArgbDecode(color, a, r, g, b);
strColor.Format(L"%d,%d,%d", r, g, b);
FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(strColor));
@@ -1765,13 +1765,13 @@ void CXFA_Node::Script_Som_BorderWidth(FXJSE_HVALUE hValue, FX_BOOL bSetting, XF
return;
}
CXFA_Border border = pWidgetData->GetBorder(TRUE);
- FX_INT32 iSize = border.CountEdges();
+ int32_t iSize = border.CountEdges();
CFX_WideString wsThickness;
if (bSetting) {
CFX_ByteString bsValue;
FXJSE_Value_ToUTF8String(hValue, bsValue);
wsThickness = CFX_WideString::FromUTF8(bsValue, bsValue.GetLength());
- for (FX_INT32 i = 0; i < iSize; ++i) {
+ for (int32_t i = 0; i < iSize; ++i) {
CXFA_Edge edge = border.GetEdge(i);
CXFA_Measurement thickness(wsThickness);
edge.SetMSThickness(thickness);
@@ -1800,13 +1800,13 @@ void CXFA_Node::Script_Som_FillColor(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_
CFX_ByteString bsValue;
FXJSE_Value_ToUTF8String(hValue, bsValue);
wsColor = CFX_WideString::FromUTF8(bsValue, bsValue.GetLength());
- FX_INT32 r, g, b;
+ int32_t r, g, b;
XFA_STRING_TO_RGB(wsColor, r, g, b);
FX_ARGB color = ArgbEncode(0xff, r, g, b);
borderfill.SetColor(color);
} else {
FX_ARGB color = borderfill.GetColor();
- FX_INT32 a, r, g, b;
+ int32_t a, r, g, b;
ArgbDecode(color, a, r, g, b);
wsColor.Format(L"%d,%d,%d", r, g, b);
FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsColor));
@@ -1871,8 +1871,8 @@ void CXFA_Node::Script_Field_DefaultValue(FXJSE_HVALUE hValue, FX_BOOL bSetting,
CFX_WideString wsNewText = CFX_WideString::FromUTF8(newValue, newValue.GetLength());
CXFA_Node *pUIChild = pWidgetData->GetUIChild();
if (pUIChild->GetClassID() == XFA_ELEMENT_NumericEdit) {
- FX_INT32 iLeadDigits = 0;
- FX_INT32 iFracDigits = 0;
+ int32_t iLeadDigits = 0;
+ int32_t iFracDigits = 0;
pWidgetData->GetLeadDigits(iLeadDigits);
pWidgetData->GetFracDigits(iFracDigits);
wsNewText = XFA_NumericLimit(wsNewText, iLeadDigits, iFracDigits);
@@ -1945,13 +1945,13 @@ void CXFA_Node::Script_Som_FontColor(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_
CFX_ByteString bsValue;
FXJSE_Value_ToUTF8String(hValue, bsValue);
wsColor = CFX_WideString::FromUTF8(bsValue, bsValue.GetLength());
- FX_INT32 r, g, b;
+ int32_t r, g, b;
XFA_STRING_TO_RGB(wsColor, r, g, b);
FX_ARGB color = ArgbEncode(0xff, r, g, b);
font.SetColor(color);
} else {
FX_ARGB color = font.GetColor();
- FX_INT32 a, r, g, b;
+ int32_t a, r, g, b;
ArgbDecode(color, a, r, g, b);
wsColor.Format(L"%d,%d,%d", r, g, b);
FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsColor));
@@ -1992,7 +1992,7 @@ void CXFA_Node::Script_Som_Mandatory(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_
wsValue = CFX_WideString::FromUTF8(bsValue, bsValue.GetLength());
validate.SetNullTest(wsValue);
} else {
- FX_INT32 iValue = validate.GetNullTest();
+ int32_t iValue = validate.GetNullTest();
XFA_LPCATTRIBUTEENUMINFO pInfo = XFA_GetAttributeEnumByID((XFA_ATTRIBUTEENUM)iValue);
if (pInfo) {
wsValue = pInfo->pName;
@@ -2019,7 +2019,7 @@ void CXFA_Node::Script_Field_SelectedIndex(FXJSE_HVALUE hValue, FX_BOOL bSetting
return;
}
if (bSetting) {
- FX_INT32 iIndex = FXJSE_Value_ToInteger(hValue);
+ int32_t iIndex = FXJSE_Value_ToInteger(hValue);
if (iIndex == -1) {
pWidgetData->ClearAllSelections();
return;
@@ -2039,10 +2039,10 @@ void CXFA_Node::Script_Field_ClearItems(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Field_ExecEvent(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 1) {
CFX_ByteString eventString = pArguments->GetUTF8String(0);
- FX_INT32 iRet = execSingleEventByName(CFX_WideString::FromUTF8(eventString, eventString.GetLength()), XFA_ELEMENT_Field);
+ int32_t iRet = execSingleEventByName(CFX_WideString::FromUTF8(eventString, eventString.GetLength()), XFA_ELEMENT_Field);
if (eventString == FX_BSTRC("validate")) {
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), ((iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE));
}
@@ -2052,7 +2052,7 @@ void CXFA_Node::Script_Field_ExecEvent(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Field_ExecInitialize(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
if (!pNotify) {
@@ -2065,7 +2065,7 @@ void CXFA_Node::Script_Field_ExecInitialize(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Field_DeleteItem(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"deleteItem");
return;
@@ -2074,7 +2074,7 @@ void CXFA_Node::Script_Field_DeleteItem(CFXJSE_Arguments* pArguments)
if (!pWidgetData) {
return;
}
- FX_INT32 iIndex = pArguments->GetInt32(0);
+ int32_t iIndex = pArguments->GetInt32(0);
FX_BOOL bValue = pWidgetData->DeleteItem(iIndex, TRUE, TRUE);
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
@@ -2083,12 +2083,12 @@ void CXFA_Node::Script_Field_DeleteItem(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Field_GetSaveItem(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"getSaveItem");
return;
}
- FX_INT32 iIndex = pArguments->GetInt32(0);
+ int32_t iIndex = pArguments->GetInt32(0);
if (iIndex < 0) {
FXJSE_Value_SetNull(pArguments->GetReturnValue());
return;
@@ -2108,7 +2108,7 @@ void CXFA_Node::Script_Field_GetSaveItem(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Field_BoundItem(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"boundItem");
return;
@@ -2128,7 +2128,7 @@ void CXFA_Node::Script_Field_BoundItem(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Field_GetItemState(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"getItemState");
return;
@@ -2137,7 +2137,7 @@ void CXFA_Node::Script_Field_GetItemState(CFXJSE_Arguments* pArguments)
if (!pWidgetData) {
return;
}
- FX_INT32 iIndex = pArguments->GetInt32(0);
+ int32_t iIndex = pArguments->GetInt32(0);
FX_BOOL bValue = pWidgetData->GetItemState(iIndex);
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
@@ -2146,7 +2146,7 @@ void CXFA_Node::Script_Field_GetItemState(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Field_ExecCalculate(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
if (!pNotify) {
@@ -2162,12 +2162,12 @@ void CXFA_Node::Script_Field_SetItems(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Field_GetDisplayItem(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"getDisplayItem");
return;
}
- FX_INT32 iIndex = pArguments->GetInt32(0);
+ int32_t iIndex = pArguments->GetInt32(0);
if (iIndex < 0) {
FXJSE_Value_SetNull(pArguments->GetReturnValue());
return;
@@ -2187,7 +2187,7 @@ void CXFA_Node::Script_Field_GetDisplayItem(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Field_SetItemState(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 2) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"setItemState");
return;
@@ -2196,7 +2196,7 @@ void CXFA_Node::Script_Field_SetItemState(CFXJSE_Arguments* pArguments)
if (!pWidgetData) {
return;
}
- FX_INT32 iIndex = pArguments->GetInt32(0);
+ int32_t iIndex = pArguments->GetInt32(0);
FX_BOOL bAdd = pArguments->GetInt32(1) == 0 ? FALSE : TRUE;
if (bAdd) {
pWidgetData->SetItemState(iIndex, TRUE, TRUE, TRUE);
@@ -2208,7 +2208,7 @@ void CXFA_Node::Script_Field_SetItemState(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Field_AddItem(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 2) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"addItem");
return;
@@ -2231,13 +2231,13 @@ void CXFA_Node::Script_Field_AddItem(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Field_ExecValidate(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
if (!pNotify) {
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), FALSE);
} else {
- FX_INT32 iRet = pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Validate, FALSE, FALSE);
+ int32_t iRet = pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Validate, FALSE, FALSE);
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), ((iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE));
}
} else {
@@ -2276,7 +2276,7 @@ void CXFA_Node::Script_ExclGroup_Transient(FXJSE_HVALUE hValue, FX_BOOL bSetting
}
void CXFA_Node::Script_ExclGroup_ExecEvent(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 1) {
CFX_ByteString eventString = pArguments->GetUTF8String(0);
execSingleEventByName(CFX_WideString::FromUTF8(eventString, eventString.GetLength()), XFA_ELEMENT_ExclGroup);
@@ -2286,7 +2286,7 @@ void CXFA_Node::Script_ExclGroup_ExecEvent(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_ExclGroup_SelectedMember(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if ((argc == 0) || (argc == 1)) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
@@ -2312,7 +2312,7 @@ void CXFA_Node::Script_ExclGroup_SelectedMember(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_ExclGroup_ExecInitialize(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
if (!pNotify) {
@@ -2325,7 +2325,7 @@ void CXFA_Node::Script_ExclGroup_ExecInitialize(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_ExclGroup_ExecCalculate(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
if (!pNotify) {
@@ -2338,23 +2338,23 @@ void CXFA_Node::Script_ExclGroup_ExecCalculate(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_ExclGroup_ExecValidate(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
if (!pNotify) {
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), FALSE);
} else {
- FX_INT32 iRet = pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Validate);
+ int32_t iRet = pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Validate);
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), ((iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE));
}
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execValidate");
}
}
-static CXFA_Node* XFA_ScriptInstanceManager_GetItem(CXFA_Node *pInstMgrNode, FX_INT32 iIndex)
+static CXFA_Node* XFA_ScriptInstanceManager_GetItem(CXFA_Node *pInstMgrNode, int32_t iIndex)
{
ASSERT(pInstMgrNode);
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
FX_DWORD dwNameHash = 0;
for(CXFA_Node* pNode = pInstMgrNode->GetNodeItem(XFA_NODEITEM_NextSibling); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
XFA_ELEMENT eCurType = pNode->GetClassID();
@@ -2385,8 +2385,8 @@ static CXFA_Node* XFA_ScriptInstanceManager_GetItem(CXFA_Node *pInstMgrNode, FX_
void CXFA_Node::Script_Som_InstanceIndex(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute)
{
if (bSetting) {
- FX_INT32 iTo = FXJSE_Value_ToInteger(hValue);
- FX_INT32 iFrom = Subform_and_SubformSet_InstanceIndex();
+ int32_t iTo = FXJSE_Value_ToInteger(hValue);
+ int32_t iFrom = Subform_and_SubformSet_InstanceIndex();
CXFA_Node *pManagerNode = NULL;
for (CXFA_Node *pNode = GetNodeItem(XFA_NODEITEM_PrevSibling); pNode != NULL; pNode = pNode->GetNodeItem(XFA_NODEITEM_PrevSibling)) {
if (pNode->GetClassID() == XFA_ELEMENT_InstanceManager) {
@@ -2450,7 +2450,7 @@ void CXFA_Node::Script_Subform_Locale(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA
}
void CXFA_Node::Script_Subform_ExecEvent(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 1) {
CFX_ByteString eventString = pArguments->GetUTF8String(0);
execSingleEventByName(CFX_WideString::FromUTF8(eventString, eventString.GetLength()), XFA_ELEMENT_Subform);
@@ -2460,7 +2460,7 @@ void CXFA_Node::Script_Subform_ExecEvent(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Subform_ExecInitialize(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
if (!pNotify) {
@@ -2473,7 +2473,7 @@ void CXFA_Node::Script_Subform_ExecInitialize(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Subform_ExecCalculate(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
if (!pNotify) {
@@ -2486,13 +2486,13 @@ void CXFA_Node::Script_Subform_ExecCalculate(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Subform_ExecValidate(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
if (!pNotify) {
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), FALSE);
} else {
- FX_INT32 iRet = pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Validate);
+ int32_t iRet = pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Validate);
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), ((iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE));
}
} else {
@@ -2501,15 +2501,15 @@ void CXFA_Node::Script_Subform_ExecValidate(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Subform_GetInvalidObjects(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"getInvalidObjects");
}
}
-FX_INT32 CXFA_Node::Subform_and_SubformSet_InstanceIndex()
+int32_t CXFA_Node::Subform_and_SubformSet_InstanceIndex()
{
- FX_INT32 index = 0;
+ int32_t index = 0;
for (CXFA_Node *pNode = GetNodeItem(XFA_NODEITEM_PrevSibling); pNode != NULL; pNode = pNode->GetNodeItem(XFA_NODEITEM_PrevSibling)) {
if ((pNode->GetClassID() == XFA_ELEMENT_Subform) || (pNode->GetClassID() == XFA_ELEMENT_SubformSet)) {
index++;
@@ -2521,7 +2521,7 @@ FX_INT32 CXFA_Node::Subform_and_SubformSet_InstanceIndex()
}
void CXFA_Node::Script_Template_FormNodes(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 1) {
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), TRUE);
} else {
@@ -2530,7 +2530,7 @@ void CXFA_Node::Script_Template_FormNodes(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Template_Remerge(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
m_pDocument->DoDataRemerge(TRUE);
} else {
@@ -2539,7 +2539,7 @@ void CXFA_Node::Script_Template_Remerge(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Template_ExecInitialize(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
@@ -2553,7 +2553,7 @@ void CXFA_Node::Script_Template_ExecInitialize(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Template_CreateNode(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if ((argc > 0) && (argc < 4)) {
CFX_WideString strTagName;
CFX_WideString strName;
@@ -2593,7 +2593,7 @@ void CXFA_Node::Script_Template_CreateNode(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Template_Recalculate(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 1) {
FX_BOOL bScriptFlags = pArguments->GetInt32(0) == 0 ? FALSE : TRUE;
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), TRUE);
@@ -2603,7 +2603,7 @@ void CXFA_Node::Script_Template_Recalculate(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Template_ExecCalculate(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
@@ -2617,7 +2617,7 @@ void CXFA_Node::Script_Template_ExecCalculate(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Template_ExecValidate(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
@@ -2631,7 +2631,7 @@ void CXFA_Node::Script_Template_ExecValidate(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Manifest_Evaluate(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
@@ -2663,10 +2663,10 @@ void CXFA_Node::Script_InstanceManager_Min(FXJSE_HVALUE hValue, FX_BOOL bSetting
FXJSE_Value_SetInteger(hValue, nodeOccur.GetMin());
}
}
-static FX_INT32 XFA_ScriptInstanceManager_GetCount(CXFA_Node *pInstMgrNode)
+static int32_t XFA_ScriptInstanceManager_GetCount(CXFA_Node *pInstMgrNode)
{
ASSERT(pInstMgrNode);
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
FX_DWORD dwNameHash = 0;
for(CXFA_Node* pNode = pInstMgrNode->GetNodeItem(XFA_NODEITEM_NextSibling); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
XFA_ELEMENT eCurType = pNode->GetClassID();
@@ -2691,15 +2691,15 @@ static FX_INT32 XFA_ScriptInstanceManager_GetCount(CXFA_Node *pInstMgrNode)
}
return iCount;
}
-static void XFA_ScriptInstanceManager_ReorderDataNodes_SortNodeArrayByDocumentIdx(const CXFA_NodeSet& rgNodeSet, CXFA_NodeArray& rgNodeArray, CFX_ArrayTemplate<FX_INT32>& rgIdxArray)
+static void XFA_ScriptInstanceManager_ReorderDataNodes_SortNodeArrayByDocumentIdx(const CXFA_NodeSet& rgNodeSet, CXFA_NodeArray& rgNodeArray, CFX_ArrayTemplate<int32_t>& rgIdxArray)
{
- FX_INT32 iCount = rgNodeSet.GetCount();
+ int32_t iCount = rgNodeSet.GetCount();
rgNodeArray.SetSize(iCount);
rgIdxArray.SetSize(iCount);
if(iCount == 0) {
return;
}
- FX_INT32 iIndex = -1, iTotalIndex = -1;
+ int32_t iIndex = -1, iTotalIndex = -1;
CXFA_Node* pNode = NULL;
FX_POSITION pos = rgNodeSet.GetStartPosition();
rgNodeSet.GetNextAssoc(pos, pNode);
@@ -2782,10 +2782,10 @@ static void XFA_ScriptInstanceManager_ReorderDataNodes(CXFA_NodeSet& sSet1, CXFA
}
if(pDualNodeArray->firstNodeList.GetCount() != 0 && pDualNodeArray->secondNodeList.GetCount() != 0) {
CXFA_NodeArray rgNodeArray1, rgNodeArray2;
- CFX_ArrayTemplate<FX_INT32> rgIdxArray1, rgIdxArray2;
+ CFX_ArrayTemplate<int32_t> rgIdxArray1, rgIdxArray2;
XFA_ScriptInstanceManager_ReorderDataNodes_SortNodeArrayByDocumentIdx(pDualNodeArray->firstNodeList, rgNodeArray1, rgIdxArray1);
XFA_ScriptInstanceManager_ReorderDataNodes_SortNodeArrayByDocumentIdx(pDualNodeArray->secondNodeList, rgNodeArray2, rgIdxArray2);
- FX_INT32 iLimit;
+ int32_t iLimit;
CXFA_Node *pParentNode = NULL, *pBeforeNode = NULL;
if(bInsertBefore) {
iLimit = rgIdxArray2[0];
@@ -2797,7 +2797,7 @@ static void XFA_ScriptInstanceManager_ReorderDataNodes(CXFA_NodeSet& sSet1, CXFA
pParentNode = pLastNode->GetNodeItem(XFA_NODEITEM_Parent);
pBeforeNode = pLastNode->GetNodeItem(XFA_NODEITEM_NextSibling);
}
- for(FX_INT32 iIdx = 0, iCount = rgIdxArray1.GetSize(); iIdx < iCount; iIdx++) {
+ for(int32_t iIdx = 0, iCount = rgIdxArray1.GetSize(); iIdx < iCount; iIdx++) {
CXFA_Node* pCurNode = rgNodeArray1[iIdx];
pParentNode->RemoveChild(pCurNode);
pParentNode->InsertChild(pCurNode, pBeforeNode);
@@ -2809,7 +2809,7 @@ static void XFA_ScriptInstanceManager_ReorderDataNodes(CXFA_NodeSet& sSet1, CXFA
}
rgNodeListMap.RemoveAll();
}
-static void XFA_ScriptInstanceManager_InsertItem(CXFA_Node *pInstMgrNode, CXFA_Node *pNewInstance, FX_INT32 iPos, FX_INT32 iCount = -1, FX_BOOL bMoveDataBindingNodes = TRUE)
+static void XFA_ScriptInstanceManager_InsertItem(CXFA_Node *pInstMgrNode, CXFA_Node *pNewInstance, int32_t iPos, int32_t iCount = -1, FX_BOOL bMoveDataBindingNodes = TRUE)
{
if(iCount < 0) {
iCount = XFA_ScriptInstanceManager_GetCount(pInstMgrNode);
@@ -2912,7 +2912,7 @@ static CXFA_Node* XFA_ScriptInstanceManager_CreateInstance(CXFA_Node *pInstMgrNo
void CXFA_Node::Script_InstanceManager_Count(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute)
{
if (bSetting) {
- FX_INT32 iDesired = FXJSE_Value_ToInteger(hValue);
+ int32_t iDesired = FXJSE_Value_ToInteger(hValue);
InstanceManager_SetInstances(iDesired);
} else {
FXJSE_Value_SetInteger(hValue, XFA_ScriptInstanceManager_GetCount(this));
@@ -2920,13 +2920,13 @@ void CXFA_Node::Script_InstanceManager_Count(FXJSE_HVALUE hValue, FX_BOOL bSetti
}
void CXFA_Node::Script_InstanceManager_MoveInstance(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc != 2) {
FXJSE_Value_SetUndefined(pArguments->GetReturnValue());
return;
}
- FX_INT32 iFrom = pArguments->GetInt32(0);
- FX_INT32 iTo = pArguments->GetInt32(1);
+ int32_t iFrom = pArguments->GetInt32(0);
+ int32_t iTo = pArguments->GetInt32(1);
InstanceManager_MoveInstance(iTo, iFrom);
IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
if (!pNotify) {
@@ -2943,19 +2943,19 @@ void CXFA_Node::Script_InstanceManager_MoveInstance(CFXJSE_Arguments* pArguments
}
void CXFA_Node::Script_InstanceManager_RemoveInstance(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc != 1) {
FXJSE_Value_SetUndefined(pArguments->GetReturnValue());
return;
}
- FX_INT32 iIndex = pArguments->GetInt32(0);
- FX_INT32 iCount = XFA_ScriptInstanceManager_GetCount(this);
+ int32_t iIndex = pArguments->GetInt32(0);
+ int32_t iCount = XFA_ScriptInstanceManager_GetCount(this);
if (iIndex < 0 || iIndex >= iCount) {
ThrowScriptErrorMessage(XFA_IDS_INDEX_OUT_OF_BOUNDS);
return;
}
CXFA_Occur nodeOccur = GetOccurNode();
- FX_INT32 iMin = nodeOccur.GetMin();
+ int32_t iMin = nodeOccur.GetMin();
if (iCount - 1 < iMin) {
ThrowScriptErrorMessage(XFA_IDS_VIOLATE_BOUNDARY, L"min");
return;
@@ -2964,7 +2964,7 @@ void CXFA_Node::Script_InstanceManager_RemoveInstance(CFXJSE_Arguments* pArgumen
XFA_ScriptInstanceManager_RemoveItem(this, pRemoveInstance);
IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
if (pNotify) {
- for (FX_INT32 i = iIndex; i < iCount - 1; i++) {
+ for (int32_t i = iIndex; i < iCount - 1; i++) {
CXFA_Node *pSubformInstance = XFA_ScriptInstanceManager_GetItem(this, i);
if (pSubformInstance && pSubformInstance->GetClassID() == XFA_ELEMENT_Subform) {
pNotify->RunSubformIndexChange(pSubformInstance);
@@ -2979,17 +2979,17 @@ void CXFA_Node::Script_InstanceManager_RemoveInstance(CFXJSE_Arguments* pArgumen
}
void CXFA_Node::Script_InstanceManager_SetInstances(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc != 1) {
FXJSE_Value_SetUndefined(pArguments->GetReturnValue());
return;
}
- FX_INT32 iDesired = pArguments->GetInt32(0);
+ int32_t iDesired = pArguments->GetInt32(0);
InstanceManager_SetInstances(iDesired);
}
void CXFA_Node::Script_InstanceManager_AddInstance(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if ((argc != 0) && (argc != 1)) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"addInstance");
return;
@@ -2998,9 +2998,9 @@ void CXFA_Node::Script_InstanceManager_AddInstance(CFXJSE_Arguments* pArguments)
if (argc == 1) {
fFlags = pArguments->GetInt32(0) == 0 ? FALSE : TRUE;
}
- FX_INT32 iCount = XFA_ScriptInstanceManager_GetCount(this);
+ int32_t iCount = XFA_ScriptInstanceManager_GetCount(this);
CXFA_Occur nodeOccur = GetOccurNode();
- FX_INT32 iMax = nodeOccur.GetMax();
+ int32_t iMax = nodeOccur.GetMax();
if (iMax >= 0 && iCount >= iMax) {
ThrowScriptErrorMessage(XFA_IDS_VIOLATE_BOUNDARY, L"max");
return;
@@ -3021,23 +3021,23 @@ void CXFA_Node::Script_InstanceManager_AddInstance(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_InstanceManager_InsertInstance(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if ((argc != 1) && (argc != 2)) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"insertInstance");
return;
}
- FX_INT32 iIndex = pArguments->GetInt32(0);
+ int32_t iIndex = pArguments->GetInt32(0);
FX_BOOL bBind = FALSE;
if (argc == 2) {
bBind = pArguments->GetInt32(1) == 0 ? FALSE : TRUE;
}
CXFA_Occur nodeOccur = GetOccurNode();
- FX_INT32 iCount = XFA_ScriptInstanceManager_GetCount(this);
+ int32_t iCount = XFA_ScriptInstanceManager_GetCount(this);
if (iIndex < 0 || iIndex > iCount) {
ThrowScriptErrorMessage(XFA_IDS_INDEX_OUT_OF_BOUNDS);
return;
}
- FX_INT32 iMax = nodeOccur.GetMax();
+ int32_t iMax = nodeOccur.GetMax();
if (iMax >= 0 && iCount >= iMax) {
ThrowScriptErrorMessage(XFA_IDS_VIOLATE_BOUNDARY, L"max");
return;
@@ -3056,11 +3056,11 @@ void CXFA_Node::Script_InstanceManager_InsertInstance(CFXJSE_Arguments* pArgumen
}
pLayoutPro->AddChangedContainer((CXFA_Node*)m_pDocument->GetXFANode(XFA_HASHCODE_Form));
}
-FX_INT32 CXFA_Node::InstanceManager_SetInstances(FX_INT32 iDesired)
+int32_t CXFA_Node::InstanceManager_SetInstances(int32_t iDesired)
{
CXFA_Occur nodeOccur = GetOccurNode();
- FX_INT32 iMax = nodeOccur.GetMax();
- FX_INT32 iMin = nodeOccur.GetMin();
+ int32_t iMax = nodeOccur.GetMax();
+ int32_t iMin = nodeOccur.GetMin();
if (iDesired < iMin) {
ThrowScriptErrorMessage(XFA_IDS_VIOLATE_BOUNDARY, L"min");
return 1;
@@ -3069,7 +3069,7 @@ FX_INT32 CXFA_Node::InstanceManager_SetInstances(FX_INT32 iDesired)
ThrowScriptErrorMessage(XFA_IDS_VIOLATE_BOUNDARY, L"max");
return 2;
}
- FX_INT32 iCount = XFA_ScriptInstanceManager_GetCount(this);
+ int32_t iCount = XFA_ScriptInstanceManager_GetCount(this);
if (iDesired == iCount) {
return 0;
}
@@ -3113,9 +3113,9 @@ FX_INT32 CXFA_Node::InstanceManager_SetInstances(FX_INT32 iDesired)
pLayoutPro->AddChangedContainer((CXFA_Node*)m_pDocument->GetXFANode(XFA_HASHCODE_Form));
return 0;
}
-FX_INT32 CXFA_Node::InstanceManager_MoveInstance(FX_INT32 iTo, FX_INT32 iFrom)
+int32_t CXFA_Node::InstanceManager_MoveInstance(int32_t iTo, int32_t iFrom)
{
- FX_INT32 iCount = XFA_ScriptInstanceManager_GetCount(this);
+ int32_t iCount = XFA_ScriptInstanceManager_GetCount(this);
if (iFrom > iCount || iTo > iCount - 1) {
ThrowScriptErrorMessage(XFA_IDS_INDEX_OUT_OF_BOUNDS);
return 1;
@@ -3137,7 +3137,7 @@ void CXFA_Node::Script_Occur_Max(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTR
{
CXFA_Occur occur(this);
if (bSetting) {
- FX_INT32 iMax = FXJSE_Value_ToInteger(hValue);
+ int32_t iMax = FXJSE_Value_ToInteger(hValue);
occur.SetMax(iMax);
} else {
FXJSE_Value_SetInteger(hValue, occur.GetMax());
@@ -3147,7 +3147,7 @@ void CXFA_Node::Script_Occur_Min(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTR
{
CXFA_Occur occur(this);
if (bSetting) {
- FX_INT32 iMin = FXJSE_Value_ToInteger(hValue);
+ int32_t iMin = FXJSE_Value_ToInteger(hValue);
occur.SetMin(iMin);
} else {
FXJSE_Value_SetInteger(hValue, occur.GetMin());
@@ -3155,7 +3155,7 @@ void CXFA_Node::Script_Occur_Min(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTR
}
void CXFA_Node::Script_Desc_Metadata(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if ((argc == 0) || (argc == 1)) {
FXJSE_Value_SetUTF8String(pArguments->GetReturnValue(), FX_BSTRC(""));
} else {
@@ -3164,12 +3164,12 @@ void CXFA_Node::Script_Desc_Metadata(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Form_FormNodes(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 1) {
CXFA_Node * pDataNode = (CXFA_Node *)pArguments->GetObject(0);
if (pDataNode) {
CXFA_NodeArray formItems;
- FX_INT32 iSize = pDataNode->GetBindItems(formItems);
+ int32_t iSize = pDataNode->GetBindItems(formItems);
CXFA_ArrayNodeList *pFormNodes = FX_NEW CXFA_ArrayNodeList(m_pDocument);
pFormNodes->SetArrayNodeList(formItems);
FXJSE_Value_SetObject(pArguments->GetReturnValue(), (CXFA_Object*)pFormNodes, m_pDocument->GetScriptContext()->GetJseNormalClass());
@@ -3182,7 +3182,7 @@ void CXFA_Node::Script_Form_FormNodes(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Form_Remerge(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
m_pDocument->DoDataRemerge(TRUE);
} else {
@@ -3191,7 +3191,7 @@ void CXFA_Node::Script_Form_Remerge(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Form_ExecInitialize(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
if (!pNotify) {
@@ -3208,7 +3208,7 @@ void CXFA_Node::Script_Form_Recalculate(CFXJSE_Arguments* pArguments)
if (pEventParam->m_eType == XFA_EVENT_Calculate || pEventParam->m_eType == XFA_EVENT_InitCalculate) {
return;
}
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 1) {
FX_BOOL bScriptFlags = pArguments->GetInt32(0) == 0 ? FALSE : TRUE;
IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -3227,7 +3227,7 @@ void CXFA_Node::Script_Form_Recalculate(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Form_ExecCalculate(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
if (!pNotify) {
@@ -3240,13 +3240,13 @@ void CXFA_Node::Script_Form_ExecCalculate(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Form_ExecValidate(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
if (!pNotify) {
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), FALSE);
} else {
- FX_INT32 iRet = pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Validate);
+ int32_t iRet = pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Validate);
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), ((iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE));
}
} else {
@@ -3267,7 +3267,7 @@ void CXFA_Node::Script_Form_Checksum(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_
}
void CXFA_Node::Script_Packet_GetAttribute(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 1) {
CFX_ByteString bsAttributeName = pArguments->GetUTF8String(0);
CFX_WideString wsAttributeValue;
@@ -3282,7 +3282,7 @@ void CXFA_Node::Script_Packet_GetAttribute(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Packet_SetAttribute(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 2) {
CFX_ByteString bsValue = pArguments->GetUTF8String(0);
CFX_ByteString bsName = pArguments->GetUTF8String(1);
@@ -3297,7 +3297,7 @@ void CXFA_Node::Script_Packet_SetAttribute(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Packet_RemoveAttribute(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 1) {
CFX_ByteString bsName = pArguments->GetUTF8String(0);
CFX_WideString wsName = CFX_WideString::FromUTF8(bsName, bsName.GetLength());
@@ -3335,7 +3335,7 @@ void CXFA_Node::Script_Packet_Content(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA
}
void CXFA_Node::Script_Source_Next(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"next");
@@ -3343,7 +3343,7 @@ void CXFA_Node::Script_Source_Next(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_CancelBatch(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"cancelBatch");
@@ -3351,7 +3351,7 @@ void CXFA_Node::Script_Source_CancelBatch(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_First(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"first");
@@ -3359,7 +3359,7 @@ void CXFA_Node::Script_Source_First(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_UpdateBatch(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"updateBatch");
@@ -3367,7 +3367,7 @@ void CXFA_Node::Script_Source_UpdateBatch(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_Previous(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"previous");
@@ -3375,7 +3375,7 @@ void CXFA_Node::Script_Source_Previous(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_IsBOF(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"isBOF");
@@ -3383,7 +3383,7 @@ void CXFA_Node::Script_Source_IsBOF(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_IsEOF(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"isEOF");
@@ -3391,7 +3391,7 @@ void CXFA_Node::Script_Source_IsEOF(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_Cancel(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"cancel");
@@ -3399,7 +3399,7 @@ void CXFA_Node::Script_Source_Cancel(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_Update(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"update");
@@ -3407,7 +3407,7 @@ void CXFA_Node::Script_Source_Update(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_Open(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"open");
@@ -3415,7 +3415,7 @@ void CXFA_Node::Script_Source_Open(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_Delete(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"delete");
@@ -3423,7 +3423,7 @@ void CXFA_Node::Script_Source_Delete(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_AddNew(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"addNew");
@@ -3431,7 +3431,7 @@ void CXFA_Node::Script_Source_AddNew(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_Requery(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"requery");
@@ -3439,7 +3439,7 @@ void CXFA_Node::Script_Source_Requery(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_Resync(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"resync");
@@ -3447,7 +3447,7 @@ void CXFA_Node::Script_Source_Resync(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_Close(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"close");
@@ -3455,7 +3455,7 @@ void CXFA_Node::Script_Source_Close(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_Last(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"last");
@@ -3463,7 +3463,7 @@ void CXFA_Node::Script_Source_Last(CFXJSE_Arguments* pArguments)
}
void CXFA_Node::Script_Source_HasDataChanged(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"hasDataChanged");
@@ -3507,11 +3507,11 @@ enum XFA_KEYTYPE {
FX_LPVOID XFA_GetMapKey_Custom(FX_WSTR wsKey)
{
FX_DWORD dwKey = FX_HashCode_String_GetW(wsKey.GetPtr(), wsKey.GetLength());
- return (FX_LPVOID)(FX_UINTPTR)((dwKey << 1) | XFA_KEYTYPE_Custom);
+ return (FX_LPVOID)(uintptr_t)((dwKey << 1) | XFA_KEYTYPE_Custom);
}
FX_LPVOID XFA_GetMapKey_Element(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute)
{
- return (FX_LPVOID)(FX_UINTPTR)((eElement << 16) | (eAttribute << 8) | XFA_KEYTYPE_Element);
+ return (FX_LPVOID)(uintptr_t)((eElement << 16) | (eAttribute << 8) | XFA_KEYTYPE_Element);
}
static inline FX_BOOL XFA_NodeData_PrepareKey(XFA_ELEMENT eElem, XFA_ATTRIBUTE eAttr, FX_LPVOID &pKey)
{
@@ -3540,7 +3540,7 @@ FX_BOOL CXFA_Node::SetAttribute(XFA_ATTRIBUTE eAttr, FX_WSTR wsValue, FX_BOOL bN
switch (eType) {
case XFA_ATTRIBUTETYPE_Enum: {
XFA_LPCATTRIBUTEENUMINFO pEnum = XFA_GetAttributeEnumByName(wsValue);
- return SetEnum(pAttr->eName, pEnum ? pEnum->eName : (XFA_ATTRIBUTEENUM)(FX_INTPTR)(pAttr->pDefValue), bNotify);
+ return SetEnum(pAttr->eName, pEnum ? pEnum->eName : (XFA_ATTRIBUTEENUM)(intptr_t)(pAttr->pDefValue), bNotify);
}
break;
case XFA_ATTRIBUTETYPE_Cdata:
@@ -3596,7 +3596,7 @@ FX_BOOL CXFA_Node::GetAttribute(XFA_ATTRIBUTE eAttr, CFX_WideString &wsValue, FX
}
break;
case XFA_ATTRIBUTETYPE_Integer: {
- FX_INT32 iValue;
+ int32_t iValue;
if (!TryInteger(pAttr->eName, iValue, bUseDefault)) {
return FALSE;
}
@@ -3653,16 +3653,16 @@ FX_BOOL CXFA_Node::TryBoolean(XFA_ATTRIBUTE eAttr, FX_BOOL &bValue, FX_BOOL bUse
if (!GetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, bUseDefault, pValue)) {
return FALSE;
}
- bValue = (FX_BOOL)(FX_UINTPTR)pValue;
+ bValue = (FX_BOOL)(uintptr_t)pValue;
return TRUE;
}
-FX_BOOL CXFA_Node::TryInteger(XFA_ATTRIBUTE eAttr, FX_INT32 &iValue, FX_BOOL bUseDefault)
+FX_BOOL CXFA_Node::TryInteger(XFA_ATTRIBUTE eAttr, int32_t &iValue, FX_BOOL bUseDefault)
{
FX_LPVOID pValue = NULL;
if (!GetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, bUseDefault, pValue)) {
return FALSE;
}
- iValue = (FX_INT32)(FX_UINTPTR)pValue;
+ iValue = (int32_t)(uintptr_t)pValue;
return TRUE;
}
FX_BOOL CXFA_Node::TryEnum(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTEENUM &eValue, FX_BOOL bUseDefault)
@@ -3671,7 +3671,7 @@ FX_BOOL CXFA_Node::TryEnum(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTEENUM &eValue, FX_BO
if (!GetValue(eAttr, XFA_ATTRIBUTETYPE_Enum, bUseDefault, pValue)) {
return FALSE;
}
- eValue = (XFA_ATTRIBUTEENUM)(FX_UINTPTR)pValue;
+ eValue = (XFA_ATTRIBUTEENUM)(uintptr_t)pValue;
return TRUE;
}
FX_BOOL CXFA_Node::SetMeasure(XFA_ATTRIBUTE eAttr, CXFA_Measurement mValue, FX_BOOL bNotify )
@@ -3692,7 +3692,7 @@ FX_BOOL CXFA_Node::TryMeasure(XFA_ATTRIBUTE eAttr, CXFA_Measurement &mValue, FX_
return FALSE;
}
FX_LPVOID pValue;
- FX_INT32 iBytes;
+ int32_t iBytes;
if(GetMapModuleBuffer(pKey, pValue, iBytes) && iBytes == sizeof(mValue)) {
FX_memcpy(&mValue, pValue, sizeof(mValue));
return TRUE;
@@ -3906,13 +3906,13 @@ FX_BOOL CXFA_Node::SetValue(XFA_ATTRIBUTE eAttr, XFA_ATTRIBUTETYPE eType, FX_LPV
if (pInfo) {
switch (eType) {
case XFA_ATTRIBUTETYPE_Enum:
- ((IFDE_XMLElement*)m_pXMLNode)->SetString(pInfo->pName, XFA_GetAttributeEnumByID((XFA_ATTRIBUTEENUM)(FX_UINTPTR)pValue)->pName);
+ ((IFDE_XMLElement*)m_pXMLNode)->SetString(pInfo->pName, XFA_GetAttributeEnumByID((XFA_ATTRIBUTEENUM)(uintptr_t)pValue)->pName);
break;
case XFA_ATTRIBUTETYPE_Boolean:
((IFDE_XMLElement*)m_pXMLNode)->SetString(pInfo->pName, pValue ? FX_WSTRC(L"1") : FX_WSTRC(L"0"));
break;
case XFA_ATTRIBUTETYPE_Integer:
- ((IFDE_XMLElement*)m_pXMLNode)->SetInteger(pInfo->pName, (FX_INT32)(FX_UINTPTR)pValue);
+ ((IFDE_XMLElement*)m_pXMLNode)->SetInteger(pInfo->pName, (int32_t)(uintptr_t)pValue);
break;
default:
FXSYS_assert(0);
@@ -3946,7 +3946,7 @@ FX_BOOL CXFA_Node::SetUserData(FX_LPVOID pKey, FX_LPVOID pData, XFA_MAPDATABLOCK
}
FX_BOOL CXFA_Node::TryUserData(FX_LPVOID pKey, FX_LPVOID &pData, FX_BOOL bProtoAlso)
{
- FX_INT32 iBytes = 0;
+ int32_t iBytes = 0;
if (!GetMapModuleBuffer(pKey, pData, iBytes, bProtoAlso)) {
return FALSE;
}
@@ -3967,11 +3967,11 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent, const CFX_W
CXFA_Node *pBind = GetBindData();
if (bSyncData && pBind) {
CFX_WideStringArray wsSaveTextArray;
- FX_INT32 iSize = 0;
+ int32_t iSize = 0;
if (!wsContent.IsEmpty()) {
- FX_INT32 iStart = 0;
- FX_INT32 iLength = wsContent.GetLength();
- FX_INT32 iEnd = wsContent.Find(L'\n', iStart);
+ int32_t iStart = 0;
+ int32_t iLength = wsContent.GetLength();
+ int32_t iEnd = wsContent.Find(L'\n', iStart);
iEnd = (iEnd == -1) ? iLength : iEnd;
while (iEnd >= iStart) {
wsSaveTextArray.Add(wsContent.Mid(iStart, iEnd - iStart));
@@ -3992,9 +3992,9 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent, const CFX_W
}
} else {
CXFA_NodeArray valueNodes;
- FX_INT32 iDatas = pBind->GetNodeList(valueNodes, XFA_NODEFILTER_Children, XFA_ELEMENT_DataValue);
+ int32_t iDatas = pBind->GetNodeList(valueNodes, XFA_NODEFILTER_Children, XFA_ELEMENT_DataValue);
if (iDatas < iSize) {
- FX_INT32 iAddNodes = iSize - iDatas;
+ int32_t iAddNodes = iSize - iDatas;
CXFA_Node *pValueNodes = NULL;
while (iAddNodes-- > 0) {
pValueNodes = pBind->CreateSamePacketNode(XFA_ELEMENT_DataValue);
@@ -4004,12 +4004,12 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent, const CFX_W
}
pValueNodes = NULL;
} else if (iDatas > iSize) {
- FX_INT32 iDelNodes = iDatas - iSize;
+ int32_t iDelNodes = iDatas - iSize;
while (iDelNodes-- > 0) {
pBind->RemoveChild(pBind->GetNodeItem(XFA_NODEITEM_FirstChild));
}
}
- FX_INT32 i = 0;
+ int32_t i = 0;
for (CXFA_Node *pValueNode = pBind->GetNodeItem(XFA_NODEITEM_FirstChild); pValueNode; pValueNode = pValueNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
pValueNode->SetAttributeValue(wsSaveTextArray[i], wsSaveTextArray[i], FALSE);
i++;
@@ -4017,7 +4017,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent, const CFX_W
}
CXFA_NodeArray nodeArray;
pBind->GetBindItems(nodeArray);
- for (FX_INT32 i = 0; i < nodeArray.GetSize(); i++) {
+ for (int32_t i = 0; i < nodeArray.GetSize(); i++) {
CXFA_Node* pNode = nodeArray[i];
if (pNode == this) {
continue;
@@ -4039,7 +4039,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent, const CFX_W
pBindNode->SetScriptContent(wsContent, wsXMLValue, bNotify, bScriptModify, FALSE);
CXFA_NodeArray nodeArray;
pBindNode->GetBindItems(nodeArray);
- for (FX_INT32 i = 0; i < nodeArray.GetSize(); i++) {
+ for (int32_t i = 0; i < nodeArray.GetSize(); i++) {
CXFA_Node* pNode = nodeArray[i];
if (pNode == this) {
continue;
@@ -4101,7 +4101,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent, const CFX_W
if (pBindNode && bSyncData) {
CXFA_NodeArray nodeArray;
pBindNode->GetBindItems(nodeArray);
- for (FX_INT32 i = 0; i < nodeArray.GetSize(); i++) {
+ for (int32_t i = 0; i < nodeArray.GetSize(); i++) {
CXFA_Node* pNode = nodeArray[i];
pNode->SetScriptContent(wsContent, wsContent, bNotify, bScriptModify, FALSE);
}
@@ -4234,7 +4234,7 @@ FX_BOOL CXFA_Node::TryNamespace(CFX_WideString& wsNamespace)
return pModelNode->TryNamespace(wsNamespace);
}
}
-CXFA_Node* CXFA_Node::GetProperty(FX_INT32 index, XFA_ELEMENT eProperty, FX_BOOL bCreateProperty )
+CXFA_Node* CXFA_Node::GetProperty(int32_t index, XFA_ELEMENT eProperty, FX_BOOL bCreateProperty )
{
XFA_ELEMENT eElement = GetClassID();
FX_DWORD dwPacket = GetPacketID();
@@ -4243,7 +4243,7 @@ CXFA_Node* CXFA_Node::GetProperty(FX_INT32 index, XFA_ELEMENT eProperty, FX_BOOL
return NULL;
}
CXFA_Node *pNode = m_pChild;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
for(; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
if (pNode->GetClassID() == eProperty) {
iCount ++;
@@ -4277,10 +4277,10 @@ CXFA_Node* CXFA_Node::GetProperty(FX_INT32 index, XFA_ELEMENT eProperty, FX_BOOL
}
return pNewNode;
}
-FX_INT32 CXFA_Node::CountChildren(XFA_ELEMENT eElement, FX_BOOL bOnlyChild)
+int32_t CXFA_Node::CountChildren(XFA_ELEMENT eElement, FX_BOOL bOnlyChild)
{
CXFA_Node *pNode = m_pChild;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
for(; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
if (pNode->GetClassID() == eElement || eElement == XFA_ELEMENT_UNKNOWN) {
if(bOnlyChild) {
@@ -4294,11 +4294,11 @@ FX_INT32 CXFA_Node::CountChildren(XFA_ELEMENT eElement, FX_BOOL bOnlyChild)
}
return iCount;
}
-CXFA_Node* CXFA_Node::GetChild(FX_INT32 index, XFA_ELEMENT eElement, FX_BOOL bOnlyChild)
+CXFA_Node* CXFA_Node::GetChild(int32_t index, XFA_ELEMENT eElement, FX_BOOL bOnlyChild)
{
FXSYS_assert(index > -1);
CXFA_Node *pNode = m_pChild;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
for(; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
if (pNode->GetClassID() == eElement || eElement == XFA_ELEMENT_UNKNOWN) {
if(bOnlyChild) {
@@ -4315,7 +4315,7 @@ CXFA_Node* CXFA_Node::GetChild(FX_INT32 index, XFA_ELEMENT eElement, FX_BOOL bOn
}
return NULL;
}
-FX_INT32 CXFA_Node::InsertChild(FX_INT32 index, CXFA_Node *pNode)
+int32_t CXFA_Node::InsertChild(int32_t index, CXFA_Node *pNode)
{
ASSERT(pNode != NULL && pNode->m_pNext == NULL);
pNode->m_pParent = this;
@@ -4332,7 +4332,7 @@ FX_INT32 CXFA_Node::InsertChild(FX_INT32 index, CXFA_Node *pNode)
m_pLastChild->m_pNext = pNode;
} else {
CXFA_Node *pPrev = m_pChild;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
while (++iCount != index && pPrev->m_pNext) {
pPrev = pPrev->m_pNext;
}
@@ -4367,7 +4367,7 @@ FX_BOOL CXFA_Node::InsertChild(CXFA_Node *pNode, CXFA_Node *pBeforeNode)
}
FX_BOOL bWasPurgeNode = m_pDocument->RemovePurgeNode(pNode);
FXSYS_assert(bWasPurgeNode == TRUE);
- FX_INT32 nIndex = -1;
+ int32_t nIndex = -1;
pNode->m_pParent = this;
if (m_pChild == NULL || pBeforeNode == m_pChild) {
pNode->m_pNext = m_pChild;
@@ -4508,7 +4508,7 @@ CXFA_Node* CXFA_Node::GetNextSameClassSibling(XFA_ELEMENT eElement) const
}
return NULL;
}
-FX_INT32 CXFA_Node::GetNodeSameNameIndex() const
+int32_t CXFA_Node::GetNodeSameNameIndex() const
{
IXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
if (!pScriptContext) {
@@ -4516,7 +4516,7 @@ FX_INT32 CXFA_Node::GetNodeSameNameIndex() const
}
return pScriptContext->GetIndexByName((CXFA_Node*)this);
}
-FX_INT32 CXFA_Node::GetNodeSameClassIndex() const
+int32_t CXFA_Node::GetNodeSameClassIndex() const
{
IXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
if (!pScriptContext) {
@@ -4612,22 +4612,22 @@ void CXFA_Node::OnChanging(XFA_ATTRIBUTE eAttr, FX_LPVOID pNewValue, FX_BOOL bNo
if (bNotify && HasFlag(XFA_NODEFLAG_Initialized)) {
IXFA_Notify *pNotify = m_pDocument->GetParser()->GetNotify();
if (pNotify) {
- pNotify->OnNodeEvent(this, XFA_NODEEVENT_ValueChanging, (FX_LPVOID)(FX_UINTPTR)eAttr, pNewValue);
+ pNotify->OnNodeEvent(this, XFA_NODEEVENT_ValueChanging, (FX_LPVOID)(uintptr_t)eAttr, pNewValue);
}
}
}
void CXFA_Node::OnChanged(XFA_ATTRIBUTE eAttr, FX_LPVOID pNewValue, FX_BOOL bNotify, FX_BOOL bScriptModify)
{
if (bNotify && HasFlag(XFA_NODEFLAG_Initialized)) {
- Script_Attribute_SendAttributeChangeMessage((FX_LPVOID)(FX_UINTPTR)eAttr, pNewValue, bScriptModify);
+ Script_Attribute_SendAttributeChangeMessage((FX_LPVOID)(uintptr_t)eAttr, pNewValue, bScriptModify);
}
}
-FX_INT32 CXFA_Node::execSingleEventByName(FX_WSTR wsEventName, XFA_ELEMENT eElementType)
+int32_t CXFA_Node::execSingleEventByName(FX_WSTR wsEventName, XFA_ELEMENT eElementType)
{
- FX_INT32 iRet = XFA_EVENTERROR_NotExist;
+ int32_t iRet = XFA_EVENTERROR_NotExist;
const XFA_ExecEventParaInfo* eventParaInfo = GetEventParaInfoByName(wsEventName);
if (eventParaInfo) {
- FX_UINT32 validFlags = eventParaInfo->m_validFlags;
+ uint32_t validFlags = eventParaInfo->m_validFlags;
IXFA_Notify * pNotify = m_pDocument->GetParser()->GetNotify();
if (!pNotify) {
return iRet;
@@ -4730,14 +4730,14 @@ void CXFA_Node::SetMapModuleString(FX_LPVOID pKey, FX_WSTR wsValue)
FX_BOOL CXFA_Node::GetMapModuleString(FX_LPVOID pKey, CFX_WideStringC &wsValue)
{
FX_LPVOID pValue;
- FX_INT32 iBytes;
+ int32_t iBytes;
if (!GetMapModuleBuffer(pKey, pValue, iBytes)) {
return FALSE;
}
wsValue = CFX_WideStringC((FX_LPCWSTR)pValue, iBytes / sizeof(FX_WCHAR));
return TRUE;
}
-void CXFA_Node::SetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID pValue, FX_INT32 iBytes, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo )
+void CXFA_Node::SetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID pValue, int32_t iBytes, XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo )
{
XFA_LPMAPMODULEDATA pMoudle = this->GetMapModuleData(TRUE);
if (!pMoudle) {
@@ -4745,12 +4745,12 @@ void CXFA_Node::SetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID pValue, FX_INT32 iB
}
XFA_LPMAPDATABLOCK &pBuffer = pMoudle->m_BufferMap[pKey];
if (pBuffer == NULL) {
- pBuffer = (XFA_LPMAPDATABLOCK)FX_Alloc(FX_BYTE, sizeof(XFA_MAPDATABLOCK) + iBytes);
+ pBuffer = (XFA_LPMAPDATABLOCK)FX_Alloc(uint8_t, sizeof(XFA_MAPDATABLOCK) + iBytes);
} else if (pBuffer->iBytes != iBytes) {
if (pBuffer->pCallbackInfo && pBuffer->pCallbackInfo->pFree) {
pBuffer->pCallbackInfo->pFree(*(void**)pBuffer->GetData());
}
- pBuffer = (XFA_LPMAPDATABLOCK)FX_Realloc(FX_BYTE, pBuffer, sizeof(XFA_MAPDATABLOCK) + iBytes);
+ pBuffer = (XFA_LPMAPDATABLOCK)FX_Realloc(uint8_t, pBuffer, sizeof(XFA_MAPDATABLOCK) + iBytes);
} else if (pBuffer->pCallbackInfo && pBuffer->pCallbackInfo->pFree) {
pBuffer->pCallbackInfo->pFree(*(void**)pBuffer->GetData());
}
@@ -4761,7 +4761,7 @@ void CXFA_Node::SetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID pValue, FX_INT32 iB
pBuffer->iBytes = iBytes;
FXSYS_memcpy(pBuffer->GetData(), pValue, iBytes);
}
-FX_BOOL CXFA_Node::GetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID &pValue, FX_INT32 &iBytes, FX_BOOL bProtoAlso)
+FX_BOOL CXFA_Node::GetMapModuleBuffer(FX_LPVOID pKey, FX_LPVOID &pValue, int32_t &iBytes, FX_BOOL bProtoAlso)
{
XFA_LPMAPDATABLOCK pBuffer = NULL;
CXFA_Node* pNode = this;
@@ -4865,12 +4865,12 @@ void CXFA_Node::MergeAllData(FX_LPVOID pDstModule, FX_BOOL bUseSrcAttr )
continue;
}
if (pBuffer == NULL) {
- pBuffer = (XFA_LPMAPDATABLOCK)FX_Alloc(FX_BYTE, sizeof(XFA_MAPDATABLOCK) + pSrcBuffer->iBytes);
+ pBuffer = (XFA_LPMAPDATABLOCK)FX_Alloc(uint8_t, sizeof(XFA_MAPDATABLOCK) + pSrcBuffer->iBytes);
} else if (pBuffer->iBytes != pSrcBuffer->iBytes) {
if (pBuffer->pCallbackInfo && pBuffer->pCallbackInfo->pFree) {
pBuffer->pCallbackInfo->pFree(*(void**)pBuffer->GetData());
}
- pBuffer = (XFA_LPMAPDATABLOCK)FX_Realloc(FX_BYTE, pBuffer, sizeof(XFA_MAPDATABLOCK) + pSrcBuffer->iBytes);
+ pBuffer = (XFA_LPMAPDATABLOCK)FX_Realloc(uint8_t, pBuffer, sizeof(XFA_MAPDATABLOCK) + pSrcBuffer->iBytes);
} else if (pBuffer->pCallbackInfo && pBuffer->pCallbackInfo->pFree) {
pBuffer->pCallbackInfo->pFree(*(void**)pBuffer->GetData());
}
@@ -4948,9 +4948,9 @@ CXFA_NodeList::CXFA_NodeList(CXFA_Document* pDocument)
}
CXFA_Node* CXFA_NodeList::NamedItem(FX_WSTR wsName)
{
- FX_INT32 iCount = GetLength();
+ int32_t iCount = GetLength();
FX_DWORD dwHashCode = FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength());
- for (FX_INT32 i = 0; i < iCount; i++) {
+ for (int32_t i = 0; i < iCount; i++) {
CXFA_Node* ret = Item(i);
if (dwHashCode == ret->GetNameHash()) {
return ret;
@@ -4960,7 +4960,7 @@ CXFA_Node* CXFA_NodeList::NamedItem(FX_WSTR wsName)
}
void CXFA_NodeList::Script_ListClass_Append(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if(argc == 1) {
CXFA_Node *pNode = (CXFA_Node *)pArguments->GetObject(0);
if(pNode) {
@@ -4974,7 +4974,7 @@ void CXFA_NodeList::Script_ListClass_Append(CFXJSE_Arguments* pArguments)
}
void CXFA_NodeList::Script_ListClass_Insert(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if(argc == 2) {
CXFA_Node *pNewNode = (CXFA_Node *)pArguments->GetObject(0);
CXFA_Node *pBeforeNode = (CXFA_Node *)pArguments->GetObject(1);
@@ -4989,7 +4989,7 @@ void CXFA_NodeList::Script_ListClass_Insert(CFXJSE_Arguments* pArguments)
}
void CXFA_NodeList::Script_ListClass_Remove(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if(argc == 1) {
CXFA_Node *pNode = (CXFA_Node *)pArguments->GetObject(0);
if(pNode) {
@@ -5003,9 +5003,9 @@ void CXFA_NodeList::Script_ListClass_Remove(CFXJSE_Arguments* pArguments)
}
void CXFA_NodeList::Script_ListClass_Item(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if(argc == 1) {
- FX_INT32 iIndex = pArguments->GetInt32(0);
+ int32_t iIndex = pArguments->GetInt32(0);
if((iIndex >= 0) && (iIndex + 1 <= GetLength())) {
FXJSE_Value_Set(pArguments->GetReturnValue(), m_pDocument->GetScriptContext()->GetJSValueFromMap(Item(iIndex)));
} else {
@@ -5017,7 +5017,7 @@ void CXFA_NodeList::Script_ListClass_Item(CFXJSE_Arguments* pArguments)
}
void CXFA_NodeList::Script_TreelistClass_NamedItem(CFXJSE_Arguments* pArguments)
{
- FX_INT32 argc = pArguments->GetLength();
+ int32_t argc = pArguments->GetLength();
if(argc == 1) {
CFX_ByteString szName = pArguments->GetUTF8String(0);
CXFA_Node* pNode = NamedItem(CFX_WideString::FromUTF8(szName, szName.GetLength()));
@@ -5047,7 +5047,7 @@ void CXFA_ArrayNodeList::SetArrayNodeList(const CXFA_NodeArray &srcArray)
m_array.Copy(srcArray);
}
}
-FX_INT32 CXFA_ArrayNodeList::GetLength()
+int32_t CXFA_ArrayNodeList::GetLength()
{
return m_array.GetSize();
}
@@ -5061,8 +5061,8 @@ FX_BOOL CXFA_ArrayNodeList::Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode)
if (pBeforeNode == NULL) {
m_array.Add(pNewNode);
} else {
- FX_INT32 iSize = m_array.GetSize();
- for (FX_INT32 i = 0; i < iSize; ++i) {
+ int32_t iSize = m_array.GetSize();
+ for (int32_t i = 0; i < iSize; ++i) {
if (m_array[i] == pBeforeNode) {
m_array.InsertAt(i, pNewNode);
break;
@@ -5073,8 +5073,8 @@ FX_BOOL CXFA_ArrayNodeList::Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode)
}
FX_BOOL CXFA_ArrayNodeList::Remove(CXFA_Node* pNode)
{
- FX_INT32 iSize = m_array.GetSize();
- for (FX_INT32 i = 0; i < iSize; ++i) {
+ int32_t iSize = m_array.GetSize();
+ for (int32_t i = 0; i < iSize; ++i) {
if (m_array[i] == pNode) {
m_array.RemoveAt(i);
break;
@@ -5082,9 +5082,9 @@ FX_BOOL CXFA_ArrayNodeList::Remove(CXFA_Node* pNode)
}
return TRUE;
}
-CXFA_Node* CXFA_ArrayNodeList::Item(FX_INT32 iIndex)
+CXFA_Node* CXFA_ArrayNodeList::Item(int32_t iIndex)
{
- FX_INT32 iSize = m_array.GetSize();
+ int32_t iSize = m_array.GetSize();
if (iIndex >= 0 && iIndex < iSize) {
return m_array[iIndex];
}
@@ -5095,7 +5095,7 @@ CXFA_AttachNodeList::CXFA_AttachNodeList(CXFA_Document* pDocument, CXFA_Node* pA
{
m_pAttachNode = pAttachNode;
}
-FX_INT32 CXFA_AttachNodeList::GetLength()
+int32_t CXFA_AttachNodeList::GetLength()
{
return m_pAttachNode->CountChildren(XFA_ELEMENT_UNKNOWN, m_pAttachNode->GetClassID() == XFA_ELEMENT_Subform ? TRUE : FALSE);
}
@@ -5119,7 +5119,7 @@ FX_BOOL CXFA_AttachNodeList::Remove(CXFA_Node* pNode)
{
return m_pAttachNode->RemoveChild(pNode);
}
-CXFA_Node* CXFA_AttachNodeList::Item(FX_INT32 iIndex)
+CXFA_Node* CXFA_AttachNodeList::Item(int32_t iIndex)
{
return m_pAttachNode->GetChild(iIndex, XFA_ELEMENT_UNKNOWN, m_pAttachNode->GetClassID() == XFA_ELEMENT_Subform ? TRUE : FALSE);
}
diff --git a/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp b/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp
index c6ece3691b..1cc9d4aa03 100644
--- a/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_objectacc_imp.cpp
@@ -18,7 +18,7 @@
#include "xfa_debug_parser.h"
static FX_ARGB XFA_WStringToColor(FX_WSTR wsValue)
{
- FX_BYTE r = 0, g = 0, b = 0;
+ uint8_t r = 0, g = 0, b = 0;
if (wsValue.GetLength() == 0) {
return 0xff000000;
}
@@ -91,7 +91,7 @@ CXFA_Fill::CXFA_Fill(CXFA_Node* pNode)
CXFA_Fill::~CXFA_Fill()
{
}
-FX_INT32 CXFA_Fill::GetPresence()
+int32_t CXFA_Fill::GetPresence()
{
return m_pNode->GetEnum(XFA_ATTRIBUTE_Presence);
}
@@ -117,11 +117,11 @@ FX_ARGB CXFA_Fill::GetColor(FX_BOOL bText)
}
return 0xFFFFFFFF;
}
-FX_INT32 CXFA_Fill::GetFillType()
+int32_t CXFA_Fill::GetFillType()
{
CXFA_Node* pChild = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pChild) {
- FX_INT32 eType = pChild->GetClassID();
+ int32_t eType = pChild->GetClassID();
if (eType != XFA_ELEMENT_Color && eType != XFA_ELEMENT_Extras) {
return eType;
}
@@ -129,7 +129,7 @@ FX_INT32 CXFA_Fill::GetFillType()
}
return XFA_ELEMENT_Solid;
}
-FX_INT32 CXFA_Fill::GetPattern(FX_ARGB& foreColor)
+int32_t CXFA_Fill::GetPattern(FX_ARGB& foreColor)
{
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Pattern);
if (CXFA_Node* pColor = pNode->GetChild(0, XFA_ELEMENT_Color)) {
@@ -141,10 +141,10 @@ FX_INT32 CXFA_Fill::GetPattern(FX_ARGB& foreColor)
}
return pNode->GetEnum(XFA_ATTRIBUTE_Type);
}
-FX_INT32 CXFA_Fill::GetStipple(FX_ARGB& stippleColor)
+int32_t CXFA_Fill::GetStipple(FX_ARGB& stippleColor)
{
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Stipple);
- FX_INT32 eAttr = 50;
+ int32_t eAttr = 50;
pNode->TryInteger(XFA_ATTRIBUTE_Rate, eAttr);
if (CXFA_Node* pColor = pNode->GetChild(0, XFA_ELEMENT_Color)) {
CFX_WideStringC wsColor;
@@ -155,7 +155,7 @@ FX_INT32 CXFA_Fill::GetStipple(FX_ARGB& stippleColor)
}
return eAttr;
}
-FX_INT32 CXFA_Fill::GetLinear(FX_ARGB& endColor)
+int32_t CXFA_Fill::GetLinear(FX_ARGB& endColor)
{
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Linear);
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_ToRight;
@@ -169,7 +169,7 @@ FX_INT32 CXFA_Fill::GetLinear(FX_ARGB& endColor)
}
return eAttr;
}
-FX_INT32 CXFA_Fill::GetRadial(FX_ARGB& endColor)
+int32_t CXFA_Fill::GetRadial(FX_ARGB& endColor)
{
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Radial);
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_ToEdge;
@@ -183,15 +183,15 @@ FX_INT32 CXFA_Fill::GetRadial(FX_ARGB& endColor)
}
return eAttr;
}
-FX_BOOL CXFA_Fill::SetPresence(FX_INT32 iPresence)
+FX_BOOL CXFA_Fill::SetPresence(int32_t iPresence)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_Presence, (XFA_ATTRIBUTEENUM)iPresence);
}
-FX_BOOL CXFA_Fill::SetFillType(FX_INT32 iType)
+FX_BOOL CXFA_Fill::SetFillType(int32_t iType)
{
return FALSE;
}
-FX_BOOL CXFA_Fill::SetPattern(FX_INT32 iPattern, FX_ARGB foreColor)
+FX_BOOL CXFA_Fill::SetPattern(int32_t iPattern, FX_ARGB foreColor)
{
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Pattern);
CXFA_Node* pColor = pNode->GetProperty(0, XFA_ELEMENT_Color);
@@ -202,7 +202,7 @@ FX_BOOL CXFA_Fill::SetPattern(FX_INT32 iPattern, FX_ARGB foreColor)
pColor->SetCData(XFA_ATTRIBUTE_Value, wsColor);
return pNode->SetEnum(XFA_ATTRIBUTE_Type, (XFA_ATTRIBUTEENUM)iPattern);
}
-FX_BOOL CXFA_Fill::SetStipple(FX_INT32 iStipple, FX_ARGB stippleColor)
+FX_BOOL CXFA_Fill::SetStipple(int32_t iStipple, FX_ARGB stippleColor)
{
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Stipple);
CXFA_Node* pColor = pNode->GetProperty(0, XFA_ELEMENT_Color);
@@ -213,7 +213,7 @@ FX_BOOL CXFA_Fill::SetStipple(FX_INT32 iStipple, FX_ARGB stippleColor)
pColor->SetCData(XFA_ATTRIBUTE_Value, wsColor);
return pNode->SetEnum(XFA_ATTRIBUTE_Rate, (XFA_ATTRIBUTEENUM)iStipple);
}
-FX_BOOL CXFA_Fill::SetLinear(FX_INT32 iLinear, FX_ARGB endColor)
+FX_BOOL CXFA_Fill::SetLinear(int32_t iLinear, FX_ARGB endColor)
{
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Linear);
CXFA_Node* pColor = pNode->GetProperty(0, XFA_ELEMENT_Color);
@@ -224,7 +224,7 @@ FX_BOOL CXFA_Fill::SetLinear(FX_INT32 iLinear, FX_ARGB endColor)
pColor->SetCData(XFA_ATTRIBUTE_Value, wsColor);
return pNode->SetEnum(XFA_ATTRIBUTE_Type, (XFA_ATTRIBUTEENUM)iLinear);
}
-FX_BOOL CXFA_Fill::SetRadial(FX_INT32 iRadial, FX_ARGB endColor)
+FX_BOOL CXFA_Fill::SetRadial(int32_t iRadial, FX_ARGB endColor)
{
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Radial);
CXFA_Node* pColor = pNode->GetProperty(0, XFA_ELEMENT_Color);
@@ -287,14 +287,14 @@ FX_FLOAT CXFA_Font::GetHorizontalScale()
{
CFX_WideString wsValue;
m_pNode->TryCData(XFA_ATTRIBUTE_FontHorizontalScale, wsValue);
- FX_INT32 iScale = FXSYS_wtoi((FX_LPCWSTR)wsValue);
+ int32_t iScale = FXSYS_wtoi((FX_LPCWSTR)wsValue);
return iScale > 0 ? (FX_FLOAT)iScale : 100.0f;
}
FX_FLOAT CXFA_Font::GetVerticalScale()
{
CFX_WideString wsValue;
m_pNode->TryCData(XFA_ATTRIBUTE_FontVerticalScale, wsValue);
- FX_INT32 iScale = FXSYS_wtoi((FX_LPCWSTR)wsValue);
+ int32_t iScale = FXSYS_wtoi((FX_LPCWSTR)wsValue);
return iScale > 0 ? (FX_FLOAT)iScale : 100.0f;
}
FX_FLOAT CXFA_Font::GetLetterSpacing()
@@ -309,37 +309,37 @@ FX_FLOAT CXFA_Font::GetLetterSpacing()
}
return ms.ToUnit(XFA_UNIT_Pt);
}
-FX_INT32 CXFA_Font::GetLineThrough()
+int32_t CXFA_Font::GetLineThrough()
{
- FX_INT32 iValue = 0;
+ int32_t iValue = 0;
m_pNode->TryInteger(XFA_ATTRIBUTE_LineThrough, iValue);
return iValue;
}
-FX_INT32 CXFA_Font::GetLineThroughPeriod()
+int32_t CXFA_Font::GetLineThroughPeriod()
{
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_All;
m_pNode->TryEnum(XFA_ATTRIBUTE_LineThroughPeriod, eAttr);
return eAttr;
}
-FX_INT32 CXFA_Font::GetOverline()
+int32_t CXFA_Font::GetOverline()
{
- FX_INT32 iValue = 0;
+ int32_t iValue = 0;
m_pNode->TryInteger(XFA_ATTRIBUTE_Overline, iValue);
return iValue;
}
-FX_INT32 CXFA_Font::GetOverlinePeriod()
+int32_t CXFA_Font::GetOverlinePeriod()
{
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_All;
m_pNode->TryEnum(XFA_ATTRIBUTE_OverlinePeriod, eAttr);
return eAttr;
}
-FX_INT32 CXFA_Font::GetUnderline()
+int32_t CXFA_Font::GetUnderline()
{
- FX_INT32 iValue = 0;
+ int32_t iValue = 0;
m_pNode->TryInteger(XFA_ATTRIBUTE_Underline, iValue);
return iValue;
}
-FX_INT32 CXFA_Font::GetUnderlinePeriod()
+int32_t CXFA_Font::GetUnderlinePeriod()
{
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_All;
m_pNode->TryEnum(XFA_ATTRIBUTE_UnderlinePeriod, eAttr);
@@ -393,40 +393,40 @@ FX_BOOL CXFA_Font::SetBaselineShift(FX_FLOAT fBaselineShift)
FX_BOOL CXFA_Font::SetHorizontalScale(FX_FLOAT fHorizontalScale)
{
CFX_WideString wsValue;
- wsValue.Format(L"%d", (FX_INT32)fHorizontalScale);
+ wsValue.Format(L"%d", (int32_t)fHorizontalScale);
return m_pNode->SetCData(XFA_ATTRIBUTE_FontHorizontalScale, wsValue);
}
FX_BOOL CXFA_Font::SetVerticalScale(FX_FLOAT fVerticalScale)
{
CFX_WideString wsValue;
- wsValue.Format(L"%d", (FX_INT32)fVerticalScale);
+ wsValue.Format(L"%d", (int32_t)fVerticalScale);
return m_pNode->SetCData(XFA_ATTRIBUTE_FontVerticalScale, wsValue);
}
FX_BOOL CXFA_Font::SetLetterSpacing(FX_FLOAT fLetterSpacing, XFA_UNIT eUnit)
{
return FALSE;
}
-FX_BOOL CXFA_Font::SetLineThrough(FX_INT32 iLineThrough)
+FX_BOOL CXFA_Font::SetLineThrough(int32_t iLineThrough)
{
return m_pNode->SetInteger(XFA_ATTRIBUTE_LineThrough, iLineThrough);
}
-FX_BOOL CXFA_Font::SetLineThroughPeriod(FX_INT32 iLineThroughPeriod)
+FX_BOOL CXFA_Font::SetLineThroughPeriod(int32_t iLineThroughPeriod)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_LineThroughPeriod, (XFA_ATTRIBUTEENUM)iLineThroughPeriod);
}
-FX_BOOL CXFA_Font::SetOverline(FX_INT32 iOverline)
+FX_BOOL CXFA_Font::SetOverline(int32_t iOverline)
{
return m_pNode->SetInteger(XFA_ATTRIBUTE_Overline, iOverline);
}
-FX_BOOL CXFA_Font::SetOverlinePeriod(FX_INT32 iOverlinePeriod)
+FX_BOOL CXFA_Font::SetOverlinePeriod(int32_t iOverlinePeriod)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_OverlinePeriod, (XFA_ATTRIBUTEENUM)iOverlinePeriod);
}
-FX_BOOL CXFA_Font::SetUnderline(FX_INT32 iUnderline)
+FX_BOOL CXFA_Font::SetUnderline(int32_t iUnderline)
{
return m_pNode->SetInteger(XFA_ATTRIBUTE_Underline, iUnderline);
}
-FX_BOOL CXFA_Font::SetUnderlinePeriod(FX_INT32 iUnderlinePeriod)
+FX_BOOL CXFA_Font::SetUnderlinePeriod(int32_t iUnderlinePeriod)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_UnderlinePeriod, (XFA_ATTRIBUTEENUM)iUnderlinePeriod);
}
@@ -434,13 +434,13 @@ CXFA_Caption::CXFA_Caption(CXFA_Node* pNode)
: CXFA_Data(pNode)
{
}
-FX_INT32 CXFA_Caption::GetPresence()
+int32_t CXFA_Caption::GetPresence()
{
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_Visible;
m_pNode->TryEnum(XFA_ATTRIBUTE_Presence, eAttr);
return eAttr;
}
-FX_INT32 CXFA_Caption::GetPlacementType()
+int32_t CXFA_Caption::GetPlacementType()
{
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_Left;
m_pNode->TryEnum(XFA_ATTRIBUTE_Placement, eAttr);
@@ -468,11 +468,11 @@ CXFA_Para CXFA_Caption::GetPara()
{
return CXFA_Para(m_pNode ? m_pNode->GetChild(0, XFA_ELEMENT_Para) : NULL);
}
-FX_BOOL CXFA_Caption::SetPresence(FX_INT32 iPresence)
+FX_BOOL CXFA_Caption::SetPresence(int32_t iPresence)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_Presence, (XFA_ATTRIBUTEENUM)iPresence);
}
-FX_BOOL CXFA_Caption::SetPlacementType(FX_INT32 iType)
+FX_BOOL CXFA_Caption::SetPlacementType(int32_t iType)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_Placement, (XFA_ATTRIBUTEENUM)iType);
}
@@ -485,13 +485,13 @@ CXFA_Para::CXFA_Para(CXFA_Node* pNode)
: CXFA_Data(pNode)
{
}
-FX_INT32 CXFA_Para::GetHorizontalAlign()
+int32_t CXFA_Para::GetHorizontalAlign()
{
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_Left;
m_pNode->TryEnum(XFA_ATTRIBUTE_HAlign, eAttr);
return eAttr;
}
-FX_INT32 CXFA_Para::GetVerticalAlign()
+int32_t CXFA_Para::GetVerticalAlign()
{
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_Top;
m_pNode->TryEnum(XFA_ATTRIBUTE_VAlign, eAttr);
@@ -515,9 +515,9 @@ FX_FLOAT CXFA_Para::GetMarginRight()
m_pNode->TryMeasure(XFA_ATTRIBUTE_MarginRight, ms);
return ms.ToUnit(XFA_UNIT_Pt);
}
-FX_INT32 CXFA_Para::GetOrphans()
+int32_t CXFA_Para::GetOrphans()
{
- FX_INT32 iValue = 0;
+ int32_t iValue = 0;
m_pNode->TryInteger(XFA_ATTRIBUTE_Orphans, iValue);
return iValue;
}
@@ -545,17 +545,17 @@ FX_FLOAT CXFA_Para::GetTextIndent()
m_pNode->TryMeasure(XFA_ATTRIBUTE_TextIndent, ms);
return ms.ToUnit(XFA_UNIT_Pt);
}
-FX_INT32 CXFA_Para::GetWidows()
+int32_t CXFA_Para::GetWidows()
{
- FX_INT32 iValue = 0;
+ int32_t iValue = 0;
m_pNode->TryInteger(XFA_ATTRIBUTE_Widows, iValue);
return iValue;
}
-FX_BOOL CXFA_Para::SetHorizontalAlign(FX_INT32 iHorizontalAlign)
+FX_BOOL CXFA_Para::SetHorizontalAlign(int32_t iHorizontalAlign)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_HAlign, (XFA_ATTRIBUTEENUM)iHorizontalAlign);
}
-FX_BOOL CXFA_Para::SetVerticalAlign(FX_INT32 iVerticalAlign)
+FX_BOOL CXFA_Para::SetVerticalAlign(int32_t iVerticalAlign)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_VAlign, (XFA_ATTRIBUTEENUM)iVerticalAlign);
}
@@ -574,7 +574,7 @@ FX_BOOL CXFA_Para::SetMarginRight(FX_FLOAT fMarginRight)
CXFA_Measurement ms(fMarginRight, XFA_UNIT_Pt);
return m_pNode->SetMeasure(XFA_ATTRIBUTE_MarginRight, ms);
}
-FX_BOOL CXFA_Para::SetOrphans(FX_INT32 iOrphans)
+FX_BOOL CXFA_Para::SetOrphans(int32_t iOrphans)
{
return m_pNode->SetInteger(XFA_ATTRIBUTE_Orphans, iOrphans);
}
@@ -598,7 +598,7 @@ FX_BOOL CXFA_Para::SetTextIndent(FX_FLOAT fTextIndent)
CXFA_Measurement ms(fTextIndent, XFA_UNIT_Pt);
return m_pNode->SetMeasure(XFA_ATTRIBUTE_TextIndent, ms);
}
-FX_BOOL CXFA_Para::SetWidows(FX_INT32 iWidows)
+FX_BOOL CXFA_Para::SetWidows(int32_t iWidows)
{
return m_pNode->SetInteger(XFA_ATTRIBUTE_Widows, iWidows);
}
@@ -607,7 +607,7 @@ CXFA_Keep::CXFA_Keep(CXFA_Node *pNode, CXFA_Node *pParent)
, m_pParent(pParent)
{
}
-FX_INT32 CXFA_Keep::GetIntact()
+int32_t CXFA_Keep::GetIntact()
{
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_None;
switch (m_pParent->GetClassID()) {
@@ -628,27 +628,27 @@ FX_INT32 CXFA_Keep::GetIntact()
m_pNode->TryEnum(XFA_ATTRIBUTE_Intact, eAttr, FALSE);
return eAttr;
}
-FX_INT32 CXFA_Keep::GetNext()
+int32_t CXFA_Keep::GetNext()
{
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_None;
m_pNode->TryEnum(XFA_ATTRIBUTE_Next, eAttr);
return eAttr;
}
-FX_INT32 CXFA_Keep::GetPrevious()
+int32_t CXFA_Keep::GetPrevious()
{
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_None;
m_pNode->TryEnum(XFA_ATTRIBUTE_Previous, eAttr);
return eAttr;
}
-FX_BOOL CXFA_Keep::SetIntact(FX_INT32 iIntact)
+FX_BOOL CXFA_Keep::SetIntact(int32_t iIntact)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_Intact, (XFA_ATTRIBUTEENUM)iIntact);
}
-FX_BOOL CXFA_Keep::SetNext(FX_INT32 iNext)
+FX_BOOL CXFA_Keep::SetNext(int32_t iNext)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_Next, (XFA_ATTRIBUTEENUM)iNext);
}
-FX_BOOL CXFA_Keep::SetPrevious(FX_INT32 iPrevious)
+FX_BOOL CXFA_Keep::SetPrevious(int32_t iPrevious)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_Previous, (XFA_ATTRIBUTEENUM)iPrevious);
}
@@ -656,15 +656,15 @@ CXFA_Event::CXFA_Event(CXFA_Node* pNode)
: CXFA_Data(pNode)
{
}
-FX_INT32 CXFA_Event::GetActivity()
+int32_t CXFA_Event::GetActivity()
{
return m_pNode->GetEnum(XFA_ATTRIBUTE_Activity);
}
-FX_INT32 CXFA_Event::GetEventType()
+int32_t CXFA_Event::GetEventType()
{
CXFA_Node* pChild = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pChild) {
- FX_INT32 eType = pChild->GetClassID();
+ int32_t eType = pChild->GetClassID();
if (eType != XFA_ELEMENT_Extras) {
return eType;
}
@@ -676,12 +676,12 @@ void CXFA_Event::GetRef(CFX_WideStringC &wsRef)
{
m_pNode->TryCData(XFA_ATTRIBUTE_Ref, wsRef);
}
-FX_INT32 CXFA_Event::GetExecuteRunAt()
+int32_t CXFA_Event::GetExecuteRunAt()
{
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Execute);
return pNode->GetEnum(XFA_ATTRIBUTE_RunAt);
}
-FX_INT32 CXFA_Event::GetExecuteType()
+int32_t CXFA_Event::GetExecuteType()
{
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Execute);
return pNode->GetEnum(XFA_ATTRIBUTE_ExecuteType);
@@ -701,7 +701,7 @@ CXFA_Submit CXFA_Event::GetSubmit()
{
return m_pNode->GetChild(0, XFA_ELEMENT_Submit);
}
-FX_INT32 CXFA_Event::GetSignDataOperation()
+int32_t CXFA_Event::GetSignDataOperation()
{
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_SignData);
return pNode->GetEnum(XFA_ATTRIBUTE_Operation);
@@ -714,20 +714,20 @@ void CXFA_Event::GetSignDataTarget(CFX_WideString &wsTarget)
wsTarget = wsCData;
}
}
-FX_BOOL CXFA_Event::SetActivity(FX_INT32 iActivity)
+FX_BOOL CXFA_Event::SetActivity(int32_t iActivity)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_Activity, (XFA_ATTRIBUTEENUM)iActivity);
}
-FX_BOOL CXFA_Event::SetEventType(FX_INT32 iEventType)
+FX_BOOL CXFA_Event::SetEventType(int32_t iEventType)
{
return FALSE;
}
-FX_BOOL CXFA_Event::SetExecuteRunAt(FX_INT32 iExecuteRunAt)
+FX_BOOL CXFA_Event::SetExecuteRunAt(int32_t iExecuteRunAt)
{
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Execute);
return pNode->SetEnum(XFA_ATTRIBUTE_RunAt, (XFA_ATTRIBUTEENUM)iExecuteRunAt);
}
-FX_BOOL CXFA_Event::SetExecuteType(FX_INT32 iExecuteType)
+FX_BOOL CXFA_Event::SetExecuteType(int32_t iExecuteType)
{
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Execute);
return pNode->SetEnum(XFA_ATTRIBUTE_ExecuteType, (XFA_ATTRIBUTEENUM)iExecuteType);
@@ -737,7 +737,7 @@ FX_BOOL CXFA_Event::SetExecuteConnection(const CFX_WideString& wsConnection)
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Execute);
return pNode->SetCData(XFA_ATTRIBUTE_Connection, wsConnection);
}
-FX_BOOL CXFA_Event::SetSignDataOperation(FX_INT32 iOperation)
+FX_BOOL CXFA_Event::SetSignDataOperation(int32_t iOperation)
{
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_SignData);
return pNode->SetEnum(XFA_ATTRIBUTE_Operation, (XFA_ATTRIBUTEENUM)iOperation);
@@ -773,7 +773,7 @@ XFA_SCRIPTTYPE CXFA_Script::GetContentType()
}
return XFA_SCRIPTTYPE_Formcalc;
}
-FX_INT32 CXFA_Script::GetRunAt()
+int32_t CXFA_Script::GetRunAt()
{
return m_pNode->GetEnum(XFA_ATTRIBUTE_RunAt);
}
@@ -800,7 +800,7 @@ FX_BOOL CXFA_Script::SetContentType(XFA_SCRIPTTYPE eType)
}
return m_pNode->SetCData(XFA_ATTRIBUTE_ContentType, wsType);
}
-FX_BOOL CXFA_Script::SetRunAt(FX_INT32 iRunAt)
+FX_BOOL CXFA_Script::SetRunAt(int32_t iRunAt)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_RunAt, (XFA_ATTRIBUTEENUM)iRunAt);
}
@@ -816,7 +816,7 @@ FX_BOOL CXFA_Submit::IsSubmitEmbedPDF()
{
return m_pNode->GetBoolean(XFA_ATTRIBUTE_EmbedPDF);
}
-FX_INT32 CXFA_Submit::GetSubmitFormat()
+int32_t CXFA_Submit::GetSubmitFormat()
{
return m_pNode->GetEnum(XFA_ATTRIBUTE_Format);
}
@@ -860,7 +860,7 @@ void CXFA_Submit::GetSubmitXDPContent(CFX_WideStringC &wsContent)
{
m_pNode->TryCData(XFA_ATTRIBUTE_XdpContent, wsContent);
}
-FX_BOOL CXFA_Submit::SetSubmitFormat(FX_INT32 iSubmitFormat)
+FX_BOOL CXFA_Submit::SetSubmitFormat(int32_t iSubmitFormat)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_Format, (XFA_ATTRIBUTEENUM)iSubmitFormat);
}
@@ -977,7 +977,7 @@ FX_BOOL CXFA_Value::SetChildValueContent(const CFX_WideString& wsContent, FX_BOO
}
return pNode->SetContent(wsContent, wsFormatContent, bNotify);
}
-FX_INT32 CXFA_Line::GetHand()
+int32_t CXFA_Line::GetHand()
{
return m_pNode->GetEnum(XFA_ATTRIBUTE_Hand);
}
@@ -990,11 +990,11 @@ CXFA_Edge CXFA_Line::GetEdge()
{
return CXFA_Edge(m_pNode->GetChild(0, XFA_ELEMENT_Edge));
}
-FX_BOOL CXFA_Line::SetHand(FX_INT32 iHand)
+FX_BOOL CXFA_Line::SetHand(int32_t iHand)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_Hand, (XFA_ATTRIBUTEENUM)iHand);
}
-FX_BOOL CXFA_Line::SetSlop(FX_INT32 iSlop)
+FX_BOOL CXFA_Line::SetSlop(int32_t iSlop)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_Slope, (XFA_ATTRIBUTEENUM)iSlop);
}
@@ -1006,7 +1006,7 @@ void CXFA_Text::GetName(CFX_WideStringC &wsName)
{
m_pNode->TryCData(XFA_ATTRIBUTE_Name, wsName);
}
-FX_INT32 CXFA_Text::GetMaxChars()
+int32_t CXFA_Text::GetMaxChars()
{
return m_pNode->GetInteger(XFA_ATTRIBUTE_MaxChars);
}
@@ -1031,7 +1031,7 @@ FX_BOOL CXFA_Text::SetName(const CFX_WideString& wsName)
{
return m_pNode->SetCData(XFA_ATTRIBUTE_Name, wsName);
}
-FX_BOOL CXFA_Text::SetMaxChars(FX_INT32 iMaxChars)
+FX_BOOL CXFA_Text::SetMaxChars(int32_t iMaxChars)
{
return m_pNode->SetInteger(XFA_ATTRIBUTE_MaxChars, iMaxChars);
}
@@ -1051,7 +1051,7 @@ void CXFA_ExData::GetHref(CFX_WideStringC &wsHref)
{
m_pNode->TryCData(XFA_ATTRIBUTE_Href, wsHref);
}
-FX_INT32 CXFA_ExData::GetMaxLength()
+int32_t CXFA_ExData::GetMaxLength()
{
return m_pNode->GetInteger(XFA_ATTRIBUTE_MaxLength);
}
@@ -1059,7 +1059,7 @@ void CXFA_ExData::GetRid(CFX_WideStringC &wsRid)
{
m_pNode->TryCData(XFA_ATTRIBUTE_Rid, wsRid);
}
-FX_INT32 CXFA_ExData::GetTransferEncoding()
+int32_t CXFA_ExData::GetTransferEncoding()
{
return m_pNode->GetEnum(XFA_ATTRIBUTE_TransferEncoding);
}
@@ -1075,7 +1075,7 @@ FX_BOOL CXFA_ExData::SetHref(const CFX_WideString& wsHref)
{
return m_pNode->SetCData(XFA_ATTRIBUTE_Href, wsHref);
}
-FX_BOOL CXFA_ExData::SetMaxLength(FX_INT32 iMaxLength)
+FX_BOOL CXFA_ExData::SetMaxLength(int32_t iMaxLength)
{
return m_pNode->SetInteger(XFA_ATTRIBUTE_MaxLength, iMaxLength);
}
@@ -1083,7 +1083,7 @@ FX_BOOL CXFA_ExData::SetRid(const CFX_WideString& wsRid)
{
return m_pNode->SetCData(XFA_ATTRIBUTE_Rid, wsRid);
}
-FX_BOOL CXFA_ExData::SetTransferEncoding(FX_INT32 iTransferEncoding)
+FX_BOOL CXFA_ExData::SetTransferEncoding(int32_t iTransferEncoding)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_TransferEncoding, (XFA_ATTRIBUTEENUM)iTransferEncoding);
}
@@ -1101,7 +1101,7 @@ CXFA_Image::CXFA_Image(CXFA_Node* pNode, FX_BOOL bDefValue)
, m_bDefValue(bDefValue)
{
}
-FX_INT32 CXFA_Image::GetAspect()
+int32_t CXFA_Image::GetAspect()
{
return m_pNode->GetEnum(XFA_ATTRIBUTE_Aspect);
}
@@ -1116,7 +1116,7 @@ FX_BOOL CXFA_Image::GetHref(CFX_WideString &wsHref)
}
return m_pNode->GetAttribute(FX_WSTRC(L"href"), wsHref);
}
-FX_INT32 CXFA_Image::GetTransferEncoding()
+int32_t CXFA_Image::GetTransferEncoding()
{
if (m_bDefValue) {
return m_pNode->GetEnum(XFA_ATTRIBUTE_TransferEncoding);
@@ -1127,7 +1127,7 @@ FX_BOOL CXFA_Image::GetContent(CFX_WideString &wsText)
{
return m_pNode->TryContent(wsText);
}
-FX_BOOL CXFA_Image::SetAspect(FX_INT32 iAspect)
+FX_BOOL CXFA_Image::SetAspect(int32_t iAspect)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_Aspect, (XFA_ATTRIBUTEENUM)iAspect);
}
@@ -1142,7 +1142,7 @@ FX_BOOL CXFA_Image::SetHref(const CFX_WideString& wsHref)
}
return m_pNode->SetAttribute(XFA_ATTRIBUTE_Href, wsHref);
}
-FX_BOOL CXFA_Image::SetTransferEncoding(FX_INT32 iTransferEncoding)
+FX_BOOL CXFA_Image::SetTransferEncoding(int32_t iTransferEncoding)
{
if (m_bDefValue) {
return m_pNode->SetEnum(XFA_ATTRIBUTE_TransferEncoding, (XFA_ATTRIBUTEENUM)iTransferEncoding);
@@ -1162,7 +1162,7 @@ CXFA_Calculate::CXFA_Calculate(CXFA_Node* pNode)
: CXFA_Data(pNode)
{
}
-FX_INT32 CXFA_Calculate::GetOverride()
+int32_t CXFA_Calculate::GetOverride()
{
XFA_ATTRIBUTEENUM eAtt = XFA_ATTRIBUTEENUM_Error;
m_pNode->TryEnum(XFA_ATTRIBUTE_Override, eAtt, FALSE);
@@ -1181,7 +1181,7 @@ void CXFA_Calculate::GetMessageText(CFX_WideString &wsMessage)
}
}
}
-FX_BOOL CXFA_Calculate::SetOverride(FX_INT32 iOverride)
+FX_BOOL CXFA_Calculate::SetOverride(int32_t iOverride)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_Override, (XFA_ATTRIBUTEENUM)iOverride);
}
@@ -1197,11 +1197,11 @@ CXFA_Validate::CXFA_Validate(CXFA_Node* pNode)
: CXFA_Data(pNode)
{
}
-FX_INT32 CXFA_Validate::GetFormatTest()
+int32_t CXFA_Validate::GetFormatTest()
{
return m_pNode->GetEnum(XFA_ATTRIBUTE_FormatTest);
}
-FX_BOOL CXFA_Validate::SetTestValue(FX_INT32 iType, CFX_WideString &wsValue, XFA_ATTRIBUTEENUM eName)
+FX_BOOL CXFA_Validate::SetTestValue(int32_t iType, CFX_WideString &wsValue, XFA_ATTRIBUTEENUM eName)
{
XFA_LPCATTRIBUTEENUMINFO pInfo = XFA_GetAttributeEnumByName(wsValue);
if (pInfo) {
@@ -1218,11 +1218,11 @@ FX_BOOL CXFA_Validate::SetNullTest(CFX_WideString wsValue)
{
return SetTestValue(XFA_ATTRIBUTE_NullTest, wsValue, XFA_ATTRIBUTEENUM_Disabled);
}
-FX_INT32 CXFA_Validate::GetNullTest()
+int32_t CXFA_Validate::GetNullTest()
{
return m_pNode->GetEnum(XFA_ATTRIBUTE_NullTest);
}
-FX_INT32 CXFA_Validate::GetScriptTest()
+int32_t CXFA_Validate::GetScriptTest()
{
return m_pNode->GetEnum(XFA_ATTRIBUTE_ScriptTest);
}
@@ -1302,11 +1302,11 @@ CXFA_Variables::CXFA_Variables(CXFA_Node* pNode)
: CXFA_Data(pNode)
{
}
-FX_INT32 CXFA_Variables::CountScripts()
+int32_t CXFA_Variables::CountScripts()
{
return m_pNode->CountChildren(XFA_ELEMENT_Script);
}
-CXFA_Script CXFA_Variables::GetScript(FX_INT32 nIndex)
+CXFA_Script CXFA_Variables::GetScript(int32_t nIndex)
{
return m_pNode->GetChild(nIndex, XFA_ELEMENT_Script);
}
@@ -1314,7 +1314,7 @@ CXFA_Bind::CXFA_Bind(CXFA_Node* pNode)
: CXFA_Data(pNode)
{
}
-FX_INT32 CXFA_Bind::GetMatch()
+int32_t CXFA_Bind::GetMatch()
{
return m_pNode->GetEnum(XFA_ATTRIBUTE_Match);
}
@@ -1328,7 +1328,7 @@ void CXFA_Bind::GetPicture(CFX_WideString &wsPicture)
pPicture->TryContent(wsPicture);
}
}
-FX_BOOL CXFA_Bind::SetMatch(FX_INT32 iMatch)
+FX_BOOL CXFA_Bind::SetMatch(int32_t iMatch)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_Match, (XFA_ATTRIBUTEENUM)iMatch);
}
@@ -1399,49 +1399,49 @@ FX_BOOL CXFA_BindItems::SetRef(const CFX_WideString& wsRef)
{
return m_pNode->SetCData(XFA_ATTRIBUTE_Ref, wsRef);
}
-FX_INT32 CXFA_Box::GetBreak() const
+int32_t CXFA_Box::GetBreak() const
{
if (!m_pNode) {
return XFA_ATTRIBUTEENUM_Close;
}
return m_pNode->GetEnum(XFA_ATTRIBUTE_Break);
}
-FX_INT32 CXFA_Box::GetHand() const
+int32_t CXFA_Box::GetHand() const
{
if (!m_pNode) {
return XFA_ATTRIBUTEENUM_Even;
}
return m_pNode->GetEnum(XFA_ATTRIBUTE_Hand);
}
-FX_INT32 CXFA_Box::GetPresence() const
+int32_t CXFA_Box::GetPresence() const
{
if (!m_pNode) {
return XFA_ATTRIBUTEENUM_Hidden;
}
return m_pNode->GetEnum(XFA_ATTRIBUTE_Presence);
}
-FX_INT32 CXFA_Box::CountCorners() const
+int32_t CXFA_Box::CountCorners() const
{
if (!m_pNode) {
return 0;
}
return m_pNode->CountChildren(XFA_ELEMENT_Corner);
}
-CXFA_Corner CXFA_Box::GetCorner(FX_INT32 nIndex) const
+CXFA_Corner CXFA_Box::GetCorner(int32_t nIndex) const
{
if (!m_pNode) {
return NULL;
}
return CXFA_Corner(m_pNode->GetProperty(nIndex, XFA_ELEMENT_Corner, nIndex == 0));
}
-FX_INT32 CXFA_Box::CountEdges() const
+int32_t CXFA_Box::CountEdges() const
{
if (!m_pNode) {
return 0;
}
return m_pNode->CountChildren(XFA_ELEMENT_Edge);
}
-CXFA_Edge CXFA_Box::GetEdge(FX_INT32 nIndex) const
+CXFA_Edge CXFA_Box::GetEdge(int32_t nIndex) const
{
if (!m_pNode) {
return NULL;
@@ -1455,7 +1455,7 @@ static void XFA_BOX_GetStrokes(CXFA_Node *pNode, CXFA_StrokeArray &strokes, FX_B
return;
}
strokes.SetSize(8);
- FX_INT32 i, j;
+ int32_t i, j;
for (i = 0, j = 0; i < 4; i ++) {
CXFA_Corner corner = CXFA_Corner(pNode->GetProperty(i, XFA_ELEMENT_Corner, i == 0));
if (corner.IsExistInXML() || i == 0) {
@@ -1539,12 +1539,12 @@ CXFA_Margin CXFA_Box::GetMargin() const
}
static FX_BOOL XFA_BOX_SameStyles(const CXFA_StrokeArray &strokes)
{
- FX_INT32 iCount = strokes.GetSize();
+ int32_t iCount = strokes.GetSize();
if (iCount < 1) {
return TRUE;
}
CXFA_Stroke stroke1 = strokes[0];
- for (FX_INT32 i = 1; i < iCount; i ++) {
+ for (int32_t i = 1; i < iCount; i ++) {
CXFA_Stroke stroke2 = strokes[i];
if (!stroke2.IsExistInXML()) {
continue;
@@ -1566,14 +1566,14 @@ FX_BOOL CXFA_Box::SameStyles() const
XFA_BOX_GetStrokes(m_pNode, strokes, TRUE);
return XFA_BOX_SameStyles(strokes);
}
-static FX_INT32 XFA_BOX_3DStyle(const CXFA_StrokeArray &strokes, CXFA_Stroke &stroke)
+static int32_t XFA_BOX_3DStyle(const CXFA_StrokeArray &strokes, CXFA_Stroke &stroke)
{
- FX_INT32 iCount = strokes.GetSize();
+ int32_t iCount = strokes.GetSize();
if (iCount < 1) {
return 0;
}
stroke = strokes[0];
- for (FX_INT32 i = 1; i < iCount; i ++) {
+ for (int32_t i = 1; i < iCount; i ++) {
CXFA_Stroke find = strokes[i];
if (!find.IsExistInXML()) {
continue;
@@ -1585,14 +1585,14 @@ static FX_INT32 XFA_BOX_3DStyle(const CXFA_StrokeArray &strokes, CXFA_Stroke &st
break;
}
}
- FX_INT32 iType = stroke.GetStrokeType();
+ int32_t iType = stroke.GetStrokeType();
if (iType == XFA_ATTRIBUTEENUM_Lowered || iType == XFA_ATTRIBUTEENUM_Raised ||
iType == XFA_ATTRIBUTEENUM_Etched || iType == XFA_ATTRIBUTEENUM_Embossed) {
return iType;
}
return 0;
}
-FX_INT32 CXFA_Box::Get3DStyle(FX_BOOL &bVisible, FX_FLOAT &fThickness) const
+int32_t CXFA_Box::Get3DStyle(FX_BOOL &bVisible, FX_FLOAT &fThickness) const
{
if (IsArc()) {
return 0;
@@ -1600,25 +1600,25 @@ FX_INT32 CXFA_Box::Get3DStyle(FX_BOOL &bVisible, FX_FLOAT &fThickness) const
CXFA_StrokeArray strokes;
XFA_BOX_GetStrokes(m_pNode, strokes, TRUE);
CXFA_Stroke stroke(NULL);
- FX_INT32 iType = XFA_BOX_3DStyle(strokes, stroke);
+ int32_t iType = XFA_BOX_3DStyle(strokes, stroke);
if (iType) {
bVisible = stroke.IsVisible();
fThickness = stroke.GetThickness();
}
return iType;
}
-FX_INT32 CXFA_Stroke::GetPresence() const
+int32_t CXFA_Stroke::GetPresence() const
{
return m_pNode ? m_pNode->GetEnum(XFA_ATTRIBUTE_Presence) : XFA_ATTRIBUTEENUM_Invisible;
}
-FX_INT32 CXFA_Stroke::GetCapType() const
+int32_t CXFA_Stroke::GetCapType() const
{
if (!m_pNode) {
return XFA_ATTRIBUTEENUM_Square;
}
return m_pNode->GetEnum(XFA_ATTRIBUTE_Cap);
}
-FX_INT32 CXFA_Stroke::GetStrokeType() const
+int32_t CXFA_Stroke::GetStrokeType() const
{
return m_pNode ? m_pNode->GetEnum(XFA_ATTRIBUTE_Stroke) : XFA_ATTRIBUTEENUM_Solid;
}
@@ -1670,7 +1670,7 @@ void CXFA_Stroke::SetColor(FX_ARGB argb)
wsColor.Format(L"%d,%d,%d", r, g, b);
pNode->SetCData(XFA_ATTRIBUTE_Value, wsColor);
}
-FX_INT32 CXFA_Stroke::GetJoinType() const
+int32_t CXFA_Stroke::GetJoinType() const
{
return m_pNode ? m_pNode->GetEnum(XFA_ATTRIBUTE_Join) : XFA_ATTRIBUTEENUM_Square;
}
@@ -1704,7 +1704,7 @@ FX_BOOL CXFA_Stroke::SameStyles(CXFA_Stroke stroke, FX_DWORD dwFlags) const
}
return TRUE;
}
-FX_FLOAT XFA_GetEdgeThickness(const CXFA_StrokeArray &strokes, FX_BOOL b3DStyle, FX_INT32 nIndex)
+FX_FLOAT XFA_GetEdgeThickness(const CXFA_StrokeArray &strokes, FX_BOOL b3DStyle, int32_t nIndex)
{
FX_FLOAT fThickness = 0;
{
@@ -1741,7 +1741,7 @@ CFX_WideString CXFA_WidgetData::GetRawValue()
{
return m_pNode->GetContent();
}
-FX_INT32 CXFA_WidgetData::GetAccess(FX_BOOL bTemplate)
+int32_t CXFA_WidgetData::GetAccess(FX_BOOL bTemplate)
{
if (bTemplate) {
CXFA_Node* pNode = m_pNode->GetTemplateNode();
@@ -1752,7 +1752,7 @@ FX_INT32 CXFA_WidgetData::GetAccess(FX_BOOL bTemplate)
}
CXFA_Node* pNode = m_pNode;
while (pNode) {
- FX_INT32 iAcc = pNode->GetEnum(XFA_ATTRIBUTE_Access);
+ int32_t iAcc = pNode->GetEnum(XFA_ATTRIBUTE_Access);
if (iAcc != XFA_ATTRIBUTEENUM_Open) {
return iAcc;
}
@@ -1764,20 +1764,20 @@ FX_BOOL CXFA_WidgetData::GetAccessKey(CFX_WideStringC &wsAccessKey)
{
return m_pNode->TryCData(XFA_ATTRIBUTE_AccessKey, wsAccessKey);
}
-FX_INT32 CXFA_WidgetData::GetAnchorType()
+int32_t CXFA_WidgetData::GetAnchorType()
{
return m_pNode->GetEnum(XFA_ATTRIBUTE_AnchorType);
}
-FX_INT32 CXFA_WidgetData::GetColSpan()
+int32_t CXFA_WidgetData::GetColSpan()
{
return m_pNode->GetInteger(XFA_ATTRIBUTE_ColSpan);
}
-FX_INT32 CXFA_WidgetData::GetPresence()
+int32_t CXFA_WidgetData::GetPresence()
{
return m_pNode->GetEnum(XFA_ATTRIBUTE_Presence);
CXFA_Node* pNode = m_pNode;
while (pNode && pNode->GetObjectType() == XFA_OBJECTTYPE_ContainerNode) {
- FX_INT32 iAcc = pNode->GetEnum(XFA_ATTRIBUTE_Presence);
+ int32_t iAcc = pNode->GetEnum(XFA_ATTRIBUTE_Presence);
if ( iAcc != XFA_ATTRIBUTEENUM_Visible) {
return iAcc;
}
@@ -1785,13 +1785,13 @@ FX_INT32 CXFA_WidgetData::GetPresence()
}
return XFA_ATTRIBUTEENUM_Visible;
}
-FX_INT32 CXFA_WidgetData::GetRotate()
+int32_t CXFA_WidgetData::GetRotate()
{
CXFA_Measurement ms;
if (!m_pNode->TryMeasure(XFA_ATTRIBUTE_Rotate, ms, FALSE)) {
return 0;
}
- FX_INT32 iRotate = FXSYS_round(ms.GetValue());
+ int32_t iRotate = FXSYS_round(ms.GetValue());
iRotate = XFA_MapRotation(iRotate);
return iRotate / 90 * 90;
}
@@ -1823,12 +1823,12 @@ void CXFA_WidgetData::GetEventList(CXFA_NodeArray &events)
{
m_pNode->GetNodeList(events, 0, XFA_ELEMENT_Event);
}
-FX_INT32 CXFA_WidgetData::GetEventByActivity(FX_INT32 iActivity, CXFA_NodeArray &events, FX_BOOL bIsFormReady)
+int32_t CXFA_WidgetData::GetEventByActivity(int32_t iActivity, CXFA_NodeArray &events, FX_BOOL bIsFormReady)
{
CXFA_NodeArray allEvents;
GetEventList(allEvents);
- FX_INT32 iCount = allEvents.GetSize();
- for (FX_INT32 i = 0; i < iCount; i++) {
+ int32_t iCount = allEvents.GetSize();
+ for (int32_t i = 0; i < iCount; i++) {
CXFA_Event event(allEvents[i]);
if (event.GetActivity() == iActivity) {
if (iActivity == XFA_ATTRIBUTEENUM_Ready) {
@@ -1911,7 +1911,7 @@ CXFA_BindItems CXFA_WidgetData::GetBindItems()
{
return m_pNode->GetChild(0, XFA_ELEMENT_BindItems);
}
-FX_BOOL CXFA_WidgetData::SetAccess(FX_INT32 iAccess, FX_BOOL bNotify)
+FX_BOOL CXFA_WidgetData::SetAccess(int32_t iAccess, FX_BOOL bNotify)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_Access, (XFA_ATTRIBUTEENUM)iAccess, bNotify);
}
@@ -1919,19 +1919,19 @@ FX_BOOL CXFA_WidgetData::SetAccessKey(const CFX_WideString& wsAccessKey)
{
return m_pNode->SetCData(XFA_ATTRIBUTE_AccessKey, wsAccessKey);
}
-FX_BOOL CXFA_WidgetData::SetAnchorType(FX_INT32 iType)
+FX_BOOL CXFA_WidgetData::SetAnchorType(int32_t iType)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_AnchorType, (XFA_ATTRIBUTEENUM)iType);
}
-FX_BOOL CXFA_WidgetData::SetColSpan(FX_INT32 iColSpan)
+FX_BOOL CXFA_WidgetData::SetColSpan(int32_t iColSpan)
{
return m_pNode->SetInteger(XFA_ATTRIBUTE_ColSpan, (XFA_ATTRIBUTEENUM)iColSpan);
}
-FX_BOOL CXFA_WidgetData::SetPresence(FX_INT32 iPresence)
+FX_BOOL CXFA_WidgetData::SetPresence(int32_t iPresence)
{
return m_pNode->SetEnum(XFA_ATTRIBUTE_Presence, (XFA_ATTRIBUTEENUM)iPresence);
}
-FX_BOOL CXFA_WidgetData::SetRotate(FX_INT32 iRotate)
+FX_BOOL CXFA_WidgetData::SetRotate(int32_t iRotate)
{
iRotate = XFA_MapRotation(iRotate);
CXFA_Measurement ms((FX_FLOAT)iRotate, XFA_UNIT_Angle);
@@ -1977,7 +1977,7 @@ FX_BOOL CXFA_WidgetData::SetName(const CFX_WideString& wsName)
{
return m_pNode->SetCData(XFA_ATTRIBUTE_Name, wsName);
}
-FX_BOOL CXFA_WidgetData::SetButtonHighlight(FX_INT32 iButtonHighlight)
+FX_BOOL CXFA_WidgetData::SetButtonHighlight(int32_t iButtonHighlight)
{
CXFA_Node* pUiChildNode = GetUIChild();
return pUiChildNode->SetEnum(XFA_ATTRIBUTE_Highlight, (XFA_ATTRIBUTEENUM)iButtonHighlight);
@@ -1990,12 +1990,12 @@ FX_BOOL CXFA_WidgetData::SetButtonDown(const CFX_WideString& wsDown, FX_BOOL bRi
{
return FALSE;
}
-FX_BOOL CXFA_WidgetData::SetCheckButtonShape(FX_INT32 iCheckButtonShape)
+FX_BOOL CXFA_WidgetData::SetCheckButtonShape(int32_t iCheckButtonShape)
{
CXFA_Node* pUiChildNode = GetUIChild();
return pUiChildNode->SetEnum(XFA_ATTRIBUTE_Shape, (XFA_ATTRIBUTEENUM)iCheckButtonShape);
}
-FX_BOOL CXFA_WidgetData::SetCheckButtonMark(FX_INT32 iCheckButtonMark)
+FX_BOOL CXFA_WidgetData::SetCheckButtonMark(int32_t iCheckButtonMark)
{
CXFA_Node* pUiChildNode = GetUIChild();
return pUiChildNode->SetEnum(XFA_ATTRIBUTE_Mark, (XFA_ATTRIBUTEENUM)iCheckButtonMark);
@@ -2058,7 +2058,7 @@ void CXFA_WidgetData::GetUIMargin(CFX_RectF &rtUIMargin)
}
rtUIMargin.Set(fLeftInset, fTopInset, fRightInset, fBottomInset);
}
-FX_INT32 CXFA_WidgetData::GetButtonHighlight()
+int32_t CXFA_WidgetData::GetButtonHighlight()
{
CXFA_Node* pUIChild = GetUIChild();
if (pUIChild) {
@@ -2100,7 +2100,7 @@ FX_BOOL CXFA_WidgetData::GetButtonDown(CFX_WideString &wsDown, FX_BOOL &bRichTex
}
return FALSE;
}
-FX_INT32 CXFA_WidgetData::GetCheckButtonShape()
+int32_t CXFA_WidgetData::GetCheckButtonShape()
{
CXFA_Node* pUIChild = GetUIChild();
if (pUIChild) {
@@ -2108,7 +2108,7 @@ FX_INT32 CXFA_WidgetData::GetCheckButtonShape()
}
return XFA_GetAttributeDefaultValue_Enum(XFA_ELEMENT_CheckButton, XFA_ATTRIBUTE_Shape, XFA_XDPPACKET_Form);
}
-FX_INT32 CXFA_WidgetData::GetCheckButtonMark()
+int32_t CXFA_WidgetData::GetCheckButtonMark()
{
CXFA_Node* pUIChild = GetUIChild();
if (pUIChild) {
@@ -2147,7 +2147,7 @@ XFA_CHECKSTATE CXFA_WidgetData::GetCheckState()
}
if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_ELEMENT_Items)) {
CXFA_Node* pText = pItems->GetNodeItem(XFA_NODEITEM_FirstChild);
- FX_INT32 i = 0;
+ int32_t i = 0;
while(pText) {
CFX_WideString wsContent;
if (pText->TryContent(wsContent) && (wsContent == wsValue)) {
@@ -2203,7 +2203,7 @@ void CXFA_WidgetData::SetCheckState(XFA_CHECKSTATE eCheckState, FX_BOOL bNotify)
if (!pItems) {
return;
}
- FX_INT32 i = -1;
+ int32_t i = -1;
CXFA_Node* pText = pItems->GetNodeItem(XFA_NODEITEM_FirstChild);
CFX_WideString wsContent;
while (pText) {
@@ -2316,7 +2316,7 @@ CXFA_Node* CXFA_WidgetData::GetExclGroupNextMember(CXFA_Node* pNode)
}
return NULL;
}
-FX_INT32 CXFA_WidgetData::GetChoiceListCommitOn()
+int32_t CXFA_WidgetData::GetChoiceListCommitOn()
{
CXFA_Node* pUIChild = GetUIChild();
if (pUIChild) {
@@ -2332,7 +2332,7 @@ FX_BOOL CXFA_WidgetData::IsChoiceListAllowTextEntry()
}
return XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT_ChoiceList, XFA_ATTRIBUTE_TextEntry, XFA_XDPPACKET_Form);
}
-FX_INT32 CXFA_WidgetData::GetChoiceListOpen()
+int32_t CXFA_WidgetData::GetChoiceListOpen()
{
CXFA_Node* pUIChild = GetUIChild();
if (pUIChild) {
@@ -2342,14 +2342,14 @@ FX_INT32 CXFA_WidgetData::GetChoiceListOpen()
}
FX_BOOL CXFA_WidgetData::IsListBox()
{
- FX_INT32 iOpenMode = GetChoiceListOpen();
+ int32_t iOpenMode = GetChoiceListOpen();
return (iOpenMode == XFA_ATTRIBUTEENUM_Always || iOpenMode == XFA_ATTRIBUTEENUM_MultiSelect);
}
-FX_INT32 CXFA_WidgetData::CountChoiceListItems(FX_BOOL bSaveValue)
+int32_t CXFA_WidgetData::CountChoiceListItems(FX_BOOL bSaveValue)
{
CXFA_NodeArray pItems;
CXFA_Node* pItem = NULL;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
CXFA_Node* pNode = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
for (; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
if (pNode->GetClassID() != XFA_ELEMENT_Items) {
@@ -2375,12 +2375,12 @@ FX_INT32 CXFA_WidgetData::CountChoiceListItems(FX_BOOL bSaveValue)
pItems.RemoveAll();
return pItem->CountChildren(XFA_ELEMENT_UNKNOWN);
}
-FX_BOOL CXFA_WidgetData::GetChoiceListItem(CFX_WideString &wsText, FX_INT32 nIndex, FX_BOOL bSaveValue )
+FX_BOOL CXFA_WidgetData::GetChoiceListItem(CFX_WideString &wsText, int32_t nIndex, FX_BOOL bSaveValue )
{
wsText.Empty();
CXFA_NodeArray pItemsArray;
CXFA_Node* pItems = NULL;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
CXFA_Node* pNode = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
for (; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
if (pNode->GetClassID() != XFA_ELEMENT_Items) {
@@ -2416,7 +2416,7 @@ void CXFA_WidgetData::GetChoiceListItems(CFX_WideStringArray &wsTextArray, FX_BO
{
CXFA_NodeArray pItems;
CXFA_Node* pItem = NULL;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
CXFA_Node* pNode = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
for (; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
if (pNode->GetClassID() != XFA_ELEMENT_Items) {
@@ -2445,20 +2445,20 @@ void CXFA_WidgetData::GetChoiceListItems(CFX_WideStringArray &wsTextArray, FX_BO
pNode->TryContent(wsTextArray.Add());
}
}
-FX_INT32 CXFA_WidgetData::CountSelectedItems()
+int32_t CXFA_WidgetData::CountSelectedItems()
{
CFX_WideStringArray wsValueArray;
GetSelectedItemsValue(wsValueArray);
if (IsListBox() || !IsChoiceListAllowTextEntry()) {
return wsValueArray.GetSize();
}
- FX_INT32 iSelected = 0;
+ int32_t iSelected = 0;
CFX_WideStringArray wsSaveTextArray;
GetChoiceListItems(wsSaveTextArray, TRUE);
- FX_INT32 iValues = wsValueArray.GetSize();
- for (FX_INT32 i = 0; i < iValues; i++) {
- FX_INT32 iSaves = wsSaveTextArray.GetSize();
- for (FX_INT32 j = 0; j < iSaves; j++) {
+ int32_t iValues = wsValueArray.GetSize();
+ for (int32_t i = 0; i < iValues; i++) {
+ int32_t iSaves = wsSaveTextArray.GetSize();
+ for (int32_t j = 0; j < iSaves; j++) {
if (wsValueArray[i] == wsSaveTextArray[j]) {
iSelected++;
break;
@@ -2467,15 +2467,15 @@ FX_INT32 CXFA_WidgetData::CountSelectedItems()
}
return iSelected;
}
-FX_INT32 CXFA_WidgetData::GetSelectedItem(FX_INT32 nIndex )
+int32_t CXFA_WidgetData::GetSelectedItem(int32_t nIndex )
{
CFX_WideStringArray wsValueArray;
GetSelectedItemsValue(wsValueArray);
- FX_INT32 iSelected = 0;
+ int32_t iSelected = 0;
CFX_WideStringArray wsSaveTextArray;
GetChoiceListItems(wsSaveTextArray, TRUE);
- FX_INT32 iSaves = wsSaveTextArray.GetSize();
- for (FX_INT32 j = 0; j < iSaves; j++) {
+ int32_t iSaves = wsSaveTextArray.GetSize();
+ for (int32_t j = 0; j < iSaves; j++) {
if (wsValueArray[nIndex] == wsSaveTextArray[j]) {
return j;
}
@@ -2486,15 +2486,15 @@ void CXFA_WidgetData::GetSelectedItems(CFX_Int32Array &iSelArray)
{
CFX_WideStringArray wsValueArray;
GetSelectedItemsValue(wsValueArray);
- FX_INT32 iValues = wsValueArray.GetSize();
+ int32_t iValues = wsValueArray.GetSize();
if (iValues < 1) {
return;
}
CFX_WideStringArray wsSaveTextArray;
GetChoiceListItems(wsSaveTextArray, TRUE);
- FX_INT32 iSaves = wsSaveTextArray.GetSize();
- for (FX_INT32 i = 0; i < iValues; i++) {
- for (FX_INT32 j = 0; j < iSaves; j++) {
+ int32_t iSaves = wsSaveTextArray.GetSize();
+ for (int32_t i = 0; i < iValues; i++) {
+ for (int32_t j = 0; j < iSaves; j++) {
if (wsValueArray[i] == wsSaveTextArray[j]) {
iSelArray.Add(j);
break;
@@ -2507,9 +2507,9 @@ void CXFA_WidgetData::GetSelectedItemsValue(CFX_WideStringArray &wsSelTextArray)
CFX_WideString wsValue = GetRawValue();
if (GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect) {
if (!wsValue.IsEmpty()) {
- FX_INT32 iStart = 0;
- FX_INT32 iLength = wsValue.GetLength();
- FX_INT32 iEnd = wsValue.Find(L'\n', iStart);
+ int32_t iStart = 0;
+ int32_t iLength = wsValue.GetLength();
+ int32_t iEnd = wsValue.Find(L'\n', iStart);
iEnd = (iEnd == -1) ? iLength : iEnd;
while (iEnd >= iStart) {
wsSelTextArray.Add(wsValue.Mid(iStart, iEnd - iStart));
@@ -2527,7 +2527,7 @@ void CXFA_WidgetData::GetSelectedItemsValue(CFX_WideStringArray &wsSelTextArray)
wsSelTextArray.Add(wsValue);
}
}
-FX_BOOL CXFA_WidgetData::GetItemState(FX_INT32 nIndex)
+FX_BOOL CXFA_WidgetData::GetItemState(int32_t nIndex)
{
if (nIndex < 0) {
return FALSE;
@@ -2539,15 +2539,15 @@ FX_BOOL CXFA_WidgetData::GetItemState(FX_INT32 nIndex)
}
CFX_WideStringArray wsValueArray;
GetSelectedItemsValue(wsValueArray);
- FX_INT32 iValues = wsValueArray.GetSize();
- for (FX_INT32 j = 0; j < iValues; j++) {
+ int32_t iValues = wsValueArray.GetSize();
+ for (int32_t j = 0; j < iValues; j++) {
if (wsValueArray[j] == wsSaveTextArray[nIndex]) {
return TRUE;
}
}
return FALSE;
}
-void CXFA_WidgetData::SetItemState(FX_INT32 nIndex, FX_BOOL bSelected, FX_BOOL bNotify, FX_BOOL bScriptModify, FX_BOOL bSyncData)
+void CXFA_WidgetData::SetItemState(int32_t nIndex, FX_BOOL bSelected, FX_BOOL bNotify, FX_BOOL bScriptModify, FX_BOOL bSyncData)
{
if (nIndex < 0) {
return;
@@ -2557,11 +2557,11 @@ void CXFA_WidgetData::SetItemState(FX_INT32 nIndex, FX_BOOL bSelected, FX_BOOL b
if (wsSaveTextArray.GetSize() <= nIndex) {
return;
}
- FX_INT32 iSel = -1;
+ int32_t iSel = -1;
CFX_WideStringArray wsValueArray;
GetSelectedItemsValue(wsValueArray);
- FX_INT32 iValues = wsValueArray.GetSize();
- for (FX_INT32 j = 0; j < iValues; j++) {
+ int32_t iValues = wsValueArray.GetSize();
+ for (int32_t j = 0; j < iValues; j++) {
if (wsValueArray[j] == wsSaveTextArray[nIndex]) {
iSel = j;
break;
@@ -2580,7 +2580,7 @@ void CXFA_WidgetData::SetItemState(FX_INT32 nIndex, FX_BOOL bSelected, FX_BOOL b
} else if (iSel >= 0) {
CFX_Int32Array iSelArray;
GetSelectedItems(iSelArray);
- for (FX_INT32 i = 0; i < iSelArray.GetSize(); i++) {
+ for (int32_t i = 0; i < iSelArray.GetSize(); i++) {
if (iSelArray[i] == nIndex) {
iSelArray.RemoveAt(i);
break;
@@ -2604,12 +2604,12 @@ void CXFA_WidgetData::SetItemState(FX_INT32 nIndex, FX_BOOL bSelected, FX_BOOL b
void CXFA_WidgetData::SetSelectdItems(CFX_Int32Array &iSelArray, FX_BOOL bNotify, FX_BOOL bScriptModify, FX_BOOL bSyncData)
{
CFX_WideString wsValue;
- FX_INT32 iSize = iSelArray.GetSize();
+ int32_t iSize = iSelArray.GetSize();
if (iSize >= 1) {
CFX_WideStringArray wsSaveTextArray;
GetChoiceListItems(wsSaveTextArray, TRUE);
CFX_WideString wsItemValue;
- for (FX_INT32 i = 0; i < iSize; i++) {
+ for (int32_t i = 0; i < iSize; i++) {
wsItemValue = (iSize == 1) ? wsSaveTextArray[iSelArray[i]] : wsSaveTextArray[iSelArray[i]] + FX_WSTRC(L"\n");
wsValue += wsItemValue;
}
@@ -2631,14 +2631,14 @@ void CXFA_WidgetData::ClearAllSelections()
SyncValue(CFX_WideString(), FALSE);
}
}
-void CXFA_WidgetData::InsertItem(const CFX_WideString &wsLabel, const CFX_WideString &wsValue, FX_INT32 nIndex , FX_BOOL bNotify )
+void CXFA_WidgetData::InsertItem(const CFX_WideString &wsLabel, const CFX_WideString &wsValue, int32_t nIndex , FX_BOOL bNotify )
{
CFX_WideString wsNewValue(wsValue);
if (wsNewValue.IsEmpty()) {
wsNewValue = wsLabel;
}
CXFA_NodeArray listitems;
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
CXFA_Node *pItemNode = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
for (; pItemNode; pItemNode = pItemNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
if (pItemNode->GetClassID() != XFA_ELEMENT_Items) {
@@ -2656,7 +2656,7 @@ void CXFA_WidgetData::InsertItem(const CFX_WideString &wsLabel, const CFX_WideSt
pSaveItems->SetBoolean(XFA_ATTRIBUTE_Save, TRUE);
InsertListTextItem(pSaveItems, wsNewValue, nIndex);
} else if (iCount > 1) {
- for (FX_INT32 i = 0; i < 2; i++) {
+ for (int32_t i = 0; i < 2; i++) {
CXFA_Node* pNode = listitems[i];
FX_BOOL bHasSave = pNode->GetBoolean(XFA_ATTRIBUTE_Save);
if (bHasSave) {
@@ -2675,7 +2675,7 @@ void CXFA_WidgetData::InsertItem(const CFX_WideString &wsLabel, const CFX_WideSt
pSaveItems->SetEnum(XFA_ATTRIBUTE_Presence, XFA_ATTRIBUTEENUM_Hidden);
listitems.RemoveAll();
CXFA_Node *pListNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
- FX_INT32 i = 0;
+ int32_t i = 0;
while(pListNode) {
CFX_WideString wsOldValue;
pListNode->TryContent(wsOldValue);
@@ -2689,11 +2689,11 @@ void CXFA_WidgetData::InsertItem(const CFX_WideString &wsLabel, const CFX_WideSt
if(!bNotify) {
return;
}
- m_pNode->GetDocument()->GetNotify()->OnWidgetDataEvent(this, XFA_WIDGETEVENT_ListItemAdded, (FX_LPVOID)(FX_LPCWSTR)wsLabel, (FX_LPVOID)(FX_LPCWSTR)wsValue, (FX_LPVOID)(FX_UINTPTR)nIndex);
+ m_pNode->GetDocument()->GetNotify()->OnWidgetDataEvent(this, XFA_WIDGETEVENT_ListItemAdded, (FX_LPVOID)(FX_LPCWSTR)wsLabel, (FX_LPVOID)(FX_LPCWSTR)wsValue, (FX_LPVOID)(uintptr_t)nIndex);
}
void CXFA_WidgetData::GetItemLabel(FX_WSTR wsValue, CFX_WideString &wsLabel)
{
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
CXFA_NodeArray listitems;
CXFA_Node* pItems = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
for (; pItems; pItems = pItems->GetNodeItem(XFA_NODEITEM_NextSibling)) {
@@ -2716,7 +2716,7 @@ void CXFA_WidgetData::GetItemLabel(FX_WSTR wsValue, CFX_WideString &wsLabel)
pSaveItems = listitems[1];
}
iCount = 0;
- FX_INT32 iSearch = -1;
+ int32_t iSearch = -1;
CFX_WideString wsContent;
CXFA_Node* pChildItem = pSaveItems->GetNodeItem(XFA_NODEITEM_FirstChild);
for (; pChildItem; pChildItem = pChildItem->GetNodeItem(XFA_NODEITEM_NextSibling)) {
@@ -2737,7 +2737,7 @@ void CXFA_WidgetData::GetItemLabel(FX_WSTR wsValue, CFX_WideString &wsLabel)
}
void CXFA_WidgetData::GetItemValue(FX_WSTR wsLabel, CFX_WideString &wsValue)
{
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
CXFA_NodeArray listitems;
CXFA_Node* pItems = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
for (; pItems; pItems = pItems->GetNodeItem(XFA_NODEITEM_NextSibling)) {
@@ -2760,7 +2760,7 @@ void CXFA_WidgetData::GetItemValue(FX_WSTR wsLabel, CFX_WideString &wsValue)
pSaveItems = listitems[1];
}
iCount = 0;
- FX_INT32 iSearch = -1;
+ int32_t iSearch = -1;
CFX_WideString wsContent;
CXFA_Node* pChildItem = pLabelItems->GetNodeItem(XFA_NODEITEM_FirstChild);
for (; pChildItem; pChildItem = pChildItem->GetNodeItem(XFA_NODEITEM_NextSibling)) {
@@ -2779,7 +2779,7 @@ void CXFA_WidgetData::GetItemValue(FX_WSTR wsLabel, CFX_WideString &wsValue)
}
}
}
-FX_BOOL CXFA_WidgetData::DeleteItem(FX_INT32 nIndex, FX_BOOL bNotify, FX_BOOL bScriptModify, FX_BOOL bSyncData)
+FX_BOOL CXFA_WidgetData::DeleteItem(int32_t nIndex, FX_BOOL bNotify, FX_BOOL bScriptModify, FX_BOOL bSyncData)
{
FX_BOOL bSetValue = FALSE;
CXFA_Node* pItems = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
@@ -2796,7 +2796,7 @@ FX_BOOL CXFA_WidgetData::DeleteItem(FX_INT32 nIndex, FX_BOOL bNotify, FX_BOOL bS
SetItemState(nIndex, FALSE, TRUE, bScriptModify, bSyncData);
bSetValue = TRUE;
}
- FX_INT32 i = 0;
+ int32_t i = 0;
CXFA_Node* pNode = pItems->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pNode) {
if (i == nIndex) {
@@ -2811,10 +2811,10 @@ FX_BOOL CXFA_WidgetData::DeleteItem(FX_INT32 nIndex, FX_BOOL bNotify, FX_BOOL bS
if(!bNotify) {
return TRUE;
}
- m_pNode->GetDocument()->GetNotify()->OnWidgetDataEvent(this, XFA_WIDGETEVENT_ListItemRemoved, (FX_LPVOID)(FX_UINTPTR)nIndex);
+ m_pNode->GetDocument()->GetNotify()->OnWidgetDataEvent(this, XFA_WIDGETEVENT_ListItemRemoved, (FX_LPVOID)(uintptr_t)nIndex);
return TRUE;
}
-FX_INT32 CXFA_WidgetData::GetHorizontalScrollPolicy()
+int32_t CXFA_WidgetData::GetHorizontalScrollPolicy()
{
CXFA_Node* pUIChild = GetUIChild();
if (pUIChild) {
@@ -2822,7 +2822,7 @@ FX_INT32 CXFA_WidgetData::GetHorizontalScrollPolicy()
}
return XFA_ATTRIBUTEENUM_Auto;
}
-FX_INT32 CXFA_WidgetData::GetNumberOfCells()
+int32_t CXFA_WidgetData::GetNumberOfCells()
{
CXFA_Node* pUIChild = GetUIChild();
if (!pUIChild) {
@@ -2842,7 +2842,7 @@ CFX_WideString CXFA_WidgetData::GetBarcodeType()
CXFA_Node* pUIChild = GetUIChild();
return pUIChild ? pUIChild->GetCData(XFA_ATTRIBUTE_Type) : NULL;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_CharEncoding(FX_INT32& val)
+FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_CharEncoding(int32_t& val)
{
CXFA_Node* pUIChild = GetUIChild();
CFX_WideString wsCharEncoding;
@@ -2857,7 +2857,7 @@ FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_CharEncoding(FX_INT32& val)
}
return FALSE;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_Checksum(FX_INT32& val)
+FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_Checksum(int32_t& val)
{
CXFA_Node* pUIChild = GetUIChild();
XFA_ATTRIBUTEENUM eChecksum;
@@ -2881,7 +2881,7 @@ FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_Checksum(FX_INT32& val)
}
return FALSE;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_DataLength(FX_INT32& val)
+FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_DataLength(int32_t& val)
{
CXFA_Node* pUIChild = GetUIChild();
CFX_WideString wsDataLength;
@@ -2915,7 +2915,7 @@ FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_EndChar(FX_CHAR& val)
}
return FALSE;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_ECLevel(FX_INT32& val)
+FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_ECLevel(int32_t& val)
{
CXFA_Node* pUIChild = GetUIChild();
CFX_WideString wsECLevel;
@@ -2925,22 +2925,22 @@ FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_ECLevel(FX_INT32& val)
}
return FALSE;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_ModuleWidth(FX_INT32& val)
+FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_ModuleWidth(int32_t& val)
{
CXFA_Node* pUIChild = GetUIChild();
CXFA_Measurement mModuleWidthHeight;
if (pUIChild->TryMeasure(XFA_ATTRIBUTE_ModuleWidth, mModuleWidthHeight)) {
- val = (FX_INT32)mModuleWidthHeight.ToUnit(XFA_UNIT_Pt);
+ val = (int32_t)mModuleWidthHeight.ToUnit(XFA_UNIT_Pt);
return TRUE;
}
return FALSE;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_ModuleHeight(FX_INT32& val)
+FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_ModuleHeight(int32_t& val)
{
CXFA_Node* pUIChild = GetUIChild();
CXFA_Measurement mModuleWidthHeight;
if (pUIChild->TryMeasure(XFA_ATTRIBUTE_ModuleHeight, mModuleWidthHeight)) {
- val = (FX_INT32)mModuleWidthHeight.ToUnit(XFA_UNIT_Pt);
+ val = (int32_t)mModuleWidthHeight.ToUnit(XFA_UNIT_Pt);
return TRUE;
}
return FALSE;
@@ -2955,7 +2955,7 @@ FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_PrintChecksum(FX_BOOL& val)
}
return FALSE;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_TextLocation(FX_INT32& val)
+FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_TextLocation(int32_t& val)
{
CXFA_Node* pUIChild = GetUIChild();
XFA_ATTRIBUTEENUM eTextLocation;
@@ -3002,7 +3002,7 @@ FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_WideNarrowRatio(FX_FLOAT& val)
if(ptPos >= 0) {
fRatio = (FX_FLOAT)FXSYS_wtoi(wsWideNarrowRatio);
} else {
- FX_INT32 fA, fB;
+ int32_t fA, fB;
fA = FXSYS_wtoi(wsWideNarrowRatio.Left(ptPos));
fB = FXSYS_wtoi(wsWideNarrowRatio.Mid(ptPos + 1));
if(fB) {
@@ -3045,7 +3045,7 @@ FX_BOOL CXFA_WidgetData::IsMultiLine()
}
return XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT_TextEdit, XFA_ATTRIBUTE_MultiLine, XFA_XDPPACKET_Form);
}
-FX_INT32 CXFA_WidgetData::GetVerticalScrollPolicy()
+int32_t CXFA_WidgetData::GetVerticalScrollPolicy()
{
CXFA_Node* pUIChild = GetUIChild();
if (pUIChild) {
@@ -3053,7 +3053,7 @@ FX_INT32 CXFA_WidgetData::GetVerticalScrollPolicy()
}
return XFA_GetAttributeDefaultValue_Enum(XFA_ELEMENT_TextEdit, XFA_ATTRIBUTE_VScrollPolicy, XFA_XDPPACKET_Form);
}
-FX_INT32 CXFA_WidgetData::GetMaxChars(XFA_ELEMENT& eType)
+int32_t CXFA_WidgetData::GetMaxChars(XFA_ELEMENT& eType)
{
if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_ELEMENT_Value)) {
if (CXFA_Node* pChild = pNode->GetNodeItem(XFA_NODEITEM_FirstChild)) {
@@ -3063,7 +3063,7 @@ FX_INT32 CXFA_WidgetData::GetMaxChars(XFA_ELEMENT& eType)
return pChild->GetInteger(XFA_ATTRIBUTE_MaxChars);
case XFA_ELEMENT_ExData: {
eType = XFA_ELEMENT_ExData;
- FX_INT32 iMax = pChild->GetInteger(XFA_ATTRIBUTE_MaxLength);
+ int32_t iMax = pChild->GetInteger(XFA_ATTRIBUTE_MaxLength);
return iMax < 0 ? 0 : iMax;
}
default:
@@ -3073,7 +3073,7 @@ FX_INT32 CXFA_WidgetData::GetMaxChars(XFA_ELEMENT& eType)
}
return 0;
}
-FX_BOOL CXFA_WidgetData::GetFracDigits(FX_INT32 &iFracDigits)
+FX_BOOL CXFA_WidgetData::GetFracDigits(int32_t &iFracDigits)
{
if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_ELEMENT_Value)) {
if (CXFA_Node* pChild = pNode->GetChild(0, XFA_ELEMENT_Decimal)) {
@@ -3083,7 +3083,7 @@ FX_BOOL CXFA_WidgetData::GetFracDigits(FX_INT32 &iFracDigits)
iFracDigits = -1;
return FALSE;
}
-FX_BOOL CXFA_WidgetData::GetLeadDigits(FX_INT32 &iLeadDigits)
+FX_BOOL CXFA_WidgetData::GetLeadDigits(int32_t &iLeadDigits)
{
if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_ELEMENT_Value)) {
if (CXFA_Node* pChild = pNode->GetChild(0, XFA_ELEMENT_Decimal)) {
@@ -3106,22 +3106,22 @@ static CFX_WideString XFA_NumericNormalize(const CFX_WideString &wsValue, IFX_Lo
wsNewValue.TrimLeft(L" ");
wsNewValue.TrimLeft(L"0");
wsNewValue.TrimRight(L" ");
- FX_INT32 iCount = wsNewValue.GetLength();
+ int32_t iCount = wsNewValue.GetLength();
if (iCount == 0) {
return FX_WSTRC(L"0");
}
- FX_INT32 iIndex = 0;
+ int32_t iIndex = 0;
CFX_WideString wsRet;
FX_LPWSTR pRetBuffer = wsRet.GetBuffer(iCount);
- FX_INT32 iDestCount = 0;
- FX_INT32 i = 0;
+ int32_t iDestCount = 0;
+ int32_t i = 0;
if (wsNewValue[i] == L'-') {
pRetBuffer[iIndex++] = '-';
} else if (wsNewValue[i] == L'+') {
i++;
}
FX_BOOL bHasPoint = FALSE;
- FX_INT32 nCharStart = -1;
+ int32_t nCharStart = -1;
for ( ; i < iCount; i ++) {
FX_WCHAR wc = wsNewValue[i];
if (XFA_IsDigit(wc)) {
@@ -3152,18 +3152,18 @@ static CFX_WideString XFA_NumericNormalize(const CFX_WideString &wsValue, IFX_Lo
wsRet.ReleaseBuffer(iCount);
return wsRet;
}
-CFX_WideString XFA_NumericLimit(const CFX_WideString &wsValue, FX_INT32 iLead, FX_INT32 iTread)
+CFX_WideString XFA_NumericLimit(const CFX_WideString &wsValue, int32_t iLead, int32_t iTread)
{
if ((iLead == - 1) && (iTread == -1)) {
return wsValue;
}
CFX_WideString wsRet;
- FX_INT32 iLead_ = 0, iTread_ = -1;
- FX_INT32 iCount = wsValue.GetLength();
+ int32_t iLead_ = 0, iTread_ = -1;
+ int32_t iCount = wsValue.GetLength();
if (iCount == 0) {
return wsValue;
}
- FX_INT32 i = 0;
+ int32_t i = 0;
if (wsValue[i] == L'-') {
wsRet += L'-';
i++;
@@ -3222,8 +3222,8 @@ FX_BOOL CXFA_WidgetData::SetValue(const CFX_WideString& wsValue, XFA_VALUEPICTUR
widgetValue = CXFA_LocaleValue(widgetValue.GetType(), wsNewText, wsPicture, pLocale, pLocalMgr);
wsNewText = widgetValue.GetValue();
if (uiType == XFA_ELEMENT_NumericEdit) {
- FX_INT32 iLeadDigits = 0;
- FX_INT32 iFracDigits = 0;
+ int32_t iLeadDigits = 0;
+ int32_t iFracDigits = 0;
GetLeadDigits(iLeadDigits);
GetFracDigits(iFracDigits);
wsNewText = XFA_NumericLimit(wsNewText, iLeadDigits, iFracDigits);
@@ -3233,8 +3233,8 @@ FX_BOOL CXFA_WidgetData::SetValue(const CFX_WideString& wsValue, XFA_VALUEPICTUR
} else {
if (uiType == XFA_ELEMENT_NumericEdit) {
if (wsNewText != FX_WSTRC(L"0")) {
- FX_INT32 iLeadDigits = 0;
- FX_INT32 iFracDigits = 0;
+ int32_t iLeadDigits = 0;
+ int32_t iFracDigits = 0;
GetLeadDigits(iLeadDigits);
GetFracDigits(iFracDigits);
wsNewText = XFA_NumericLimit(wsNewText, iLeadDigits, iFracDigits);
@@ -3369,8 +3369,8 @@ static FX_BOOL XFA_SplitDateTime(const CFX_WideString& wsDateTime, CFX_WideStrin
}
wsDate = wsDateTime.Left(nSplitIndex);
if (!wsDate.IsEmpty()) {
- FX_INT32 iCount = wsDate.GetLength();
- FX_INT32 i = 0;
+ int32_t iCount = wsDate.GetLength();
+ int32_t i = 0;
for (i = 0; i < iCount; i++) {
if (wsDate[i] >= '0' && wsDate[i] <= '9') {
break;
@@ -3382,8 +3382,8 @@ static FX_BOOL XFA_SplitDateTime(const CFX_WideString& wsDateTime, CFX_WideStrin
}
wsTime = wsDateTime.Right(wsDateTime.GetLength() - nSplitIndex - 1);
if (!wsTime.IsEmpty()) {
- FX_INT32 iCount = wsTime.GetLength();
- FX_INT32 i = 0;
+ int32_t iCount = wsTime.GetLength();
+ int32_t i = 0;
for (i = 0; i < iCount; i++) {
if (wsTime[i] >= '0' && wsTime[i] <= '9') {
break;
@@ -3460,7 +3460,7 @@ FX_BOOL CXFA_WidgetData::GetValue(CFX_WideString &wsValue, XFA_VALUEPICTURE eVal
switch(uiType) {
case XFA_ELEMENT_ChoiceList: {
if (eValueType == XFA_VALUEPICTURE_Display) {
- FX_INT32 iSelItemIndex = GetSelectedItem(0);
+ int32_t iSelItemIndex = GetSelectedItem(0);
if (iSelItemIndex >= 0) {
GetChoiceListItem(wsValue, iSelItemIndex);
wsPicture.Empty();
@@ -3559,7 +3559,7 @@ FX_BOOL CXFA_WidgetData::GetFormatDataValue(FX_WSTR wsValue, CFX_WideString &wsF
if (!pValueChild) {
return FALSE;
}
- FX_INT32 iVTType = XFA_VT_NULL;
+ int32_t iVTType = XFA_VT_NULL;
XFA_ELEMENT eType = pValueChild->GetClassID();
switch (eType) {
case XFA_ELEMENT_Decimal:
@@ -3627,8 +3627,8 @@ void CXFA_WidgetData::NormalizeNumStr(const CFX_WideString& wsValue, CFX_WideStr
}
wsOutput = wsValue;
wsOutput.TrimLeft('0');
- FX_INT32 dot_index = wsOutput.Find('.');
- FX_INT32 iFracDigits = 0;
+ int32_t dot_index = wsOutput.Find('.');
+ int32_t iFracDigits = 0;
if (!wsOutput.IsEmpty() && dot_index >= 0 && (!GetFracDigits(iFracDigits) || iFracDigits != -1)) {
wsOutput.TrimRight(L"0");
wsOutput.TrimRight(L".");
@@ -3650,16 +3650,16 @@ void CXFA_WidgetData::FormatNumStr(const CFX_WideString& wsValue, IFX_Locale* pL
bNeg = TRUE;
wsSrcNum.Delete(0, 1);
}
- FX_INT32 len = wsSrcNum.GetLength();
- FX_INT32 dot_index = wsSrcNum.Find('.');
+ int32_t len = wsSrcNum.GetLength();
+ int32_t dot_index = wsSrcNum.Find('.');
if (dot_index == -1) {
dot_index = len;
}
- FX_INT32 cc = dot_index - 1;
+ int32_t cc = dot_index - 1;
if (cc >= 0) {
int nPos = dot_index % 3;
wsOutput.Empty();
- for (FX_INT32 i = 0; i < dot_index; i++) {
+ for (int32_t i = 0; i < dot_index; i++) {
if (i % 3 == nPos && i != 0) {
wsOutput += wsGroupSymbol;
}
@@ -3690,7 +3690,7 @@ void CXFA_WidgetData::SyncValue(const CFX_WideString& wsValue, FX_BOOL bNotify)
}
m_pNode->SetContent(wsValue, wsFormatValue, bNotify);
}
-void CXFA_WidgetData::InsertListTextItem(CXFA_Node* pItems, FX_WSTR wsText, FX_INT32 nIndex )
+void CXFA_WidgetData::InsertListTextItem(CXFA_Node* pItems, FX_WSTR wsText, int32_t nIndex )
{
CXFA_Node* pText = pItems->CreateSamePacketNode(XFA_ELEMENT_Text);
pItems->InsertChild(nIndex, pText);
@@ -3712,9 +3712,9 @@ CXFA_Manifest CXFA_WidgetData::GetManifest(FX_BOOL bModified)
}
CXFA_Occur::CXFA_Occur(CXFA_Node *pNode) : CXFA_Data(pNode)
{ }
-FX_INT32 CXFA_Occur::GetMax()
+int32_t CXFA_Occur::GetMax()
{
- FX_INT32 iMax = 1;
+ int32_t iMax = 1;
if (m_pNode) {
if(!m_pNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, TRUE)) {
iMax = GetMin();
@@ -3722,9 +3722,9 @@ FX_INT32 CXFA_Occur::GetMax()
}
return iMax;
}
-FX_INT32 CXFA_Occur::GetMin()
+int32_t CXFA_Occur::GetMin()
{
- FX_INT32 iMin = 1;
+ int32_t iMin = 1;
if (m_pNode) {
if(!m_pNode->TryInteger(XFA_ATTRIBUTE_Min, iMin, TRUE) || iMin < 0) {
iMin = 1;
@@ -3732,18 +3732,18 @@ FX_INT32 CXFA_Occur::GetMin()
}
return iMin;
}
-FX_INT32 CXFA_Occur::GetInitial()
+int32_t CXFA_Occur::GetInitial()
{
- FX_INT32 iInit = 1;
+ int32_t iInit = 1;
if (m_pNode) {
- FX_INT32 iMin = GetMin();
+ int32_t iMin = GetMin();
if(!m_pNode->TryInteger(XFA_ATTRIBUTE_Initial, iInit, TRUE) || iInit < iMin) {
iInit = iMin;
}
}
return iInit;
}
-FX_BOOL CXFA_Occur::GetOccurInfo(FX_INT32& iMin, FX_INT32& iMax, FX_INT32& iInit)
+FX_BOOL CXFA_Occur::GetOccurInfo(int32_t& iMin, int32_t& iMax, int32_t& iInit)
{
if(!m_pNode) {
return FALSE;
@@ -3763,21 +3763,21 @@ FX_BOOL CXFA_Occur::GetOccurInfo(FX_INT32& iMin, FX_INT32& iMax, FX_INT32& iInit
}
return TRUE;
}
-void CXFA_Occur::SetMax(FX_INT32 iMax)
+void CXFA_Occur::SetMax(int32_t iMax)
{
iMax = (iMax != -1 && iMax < 1) ? 1 : iMax;
m_pNode->SetInteger(XFA_ATTRIBUTE_Max, iMax, FALSE);
- FX_INT32 iMin = GetMin();
+ int32_t iMin = GetMin();
if (iMax != -1 && iMax < iMin) {
iMin = iMax;
m_pNode->SetInteger(XFA_ATTRIBUTE_Min, iMin, FALSE);
}
}
-void CXFA_Occur::SetMin(FX_INT32 iMin)
+void CXFA_Occur::SetMin(int32_t iMin)
{
iMin = (iMin < 0) ? 1 : iMin;
m_pNode->SetInteger(XFA_ATTRIBUTE_Min, iMin, FALSE);
- FX_INT32 iMax = GetMax();
+ int32_t iMax = GetMax();
if (iMax > 0 && iMax < iMin) {
iMax = iMin;
m_pNode->SetInteger(XFA_ATTRIBUTE_Max, iMax, FALSE);
@@ -3933,9 +3933,9 @@ CFX_WideString CXFA_Filter::GetlockDocumentContent()
}
return wsContent;
}
-FX_INT32 CXFA_Filter::GetMDPPermissions()
+int32_t CXFA_Filter::GetMDPPermissions()
{
- FX_INT32 iPermissions = 2;
+ int32_t iPermissions = 2;
if (m_pNode) {
CXFA_Node* pMDPNode = m_pNode->GetProperty(0, XFA_ELEMENT_Mdp);
if (!pMDPNode->TryInteger(XFA_ATTRIBUTE_Permissions, iPermissions, TRUE)) {
@@ -3993,11 +3993,11 @@ XFA_ATTRIBUTEENUM CXFA_WrapCertificate::GetType()
{
return XFA_GetEnumTypeAttribute(m_pNode);
}
-FX_INT32 CXFA_WrapCertificate::CountCertificates()
+int32_t CXFA_WrapCertificate::CountCertificates()
{
return m_pNode ? m_pNode->CountChildren(XFA_ELEMENT_Certificate) : 0;
}
-CXFA_Certificate CXFA_WrapCertificate::GetCertificate(FX_INT32 nIndex)
+CXFA_Certificate CXFA_WrapCertificate::GetCertificate(int32_t nIndex)
{
return CXFA_Certificate((nIndex > -1 && m_pNode) ? m_pNode->GetChild(nIndex, XFA_ELEMENT_Certificate) : NULL);
}
@@ -4005,11 +4005,11 @@ XFA_ATTRIBUTEENUM CXFA_Oids::GetOidsType()
{
return XFA_GetEnumTypeAttribute(m_pNode);
}
-FX_INT32 CXFA_Oids::CountOids()
+int32_t CXFA_Oids::CountOids()
{
return m_pNode ? m_pNode->CountChildren(XFA_ELEMENT_Oid) : 0;
}
-CFX_WideString CXFA_Oids::GetOidContent(FX_INT32 nIndex)
+CFX_WideString CXFA_Oids::GetOidContent(int32_t nIndex)
{
if (nIndex <= -1 || !m_pNode) {
return FX_WSTRC(L"");
@@ -4026,11 +4026,11 @@ XFA_ATTRIBUTEENUM CXFA_SubjectDNs::GetSubjectDNsType()
{
return XFA_GetEnumTypeAttribute(m_pNode);
}
-FX_INT32 CXFA_SubjectDNs::CountSubjectDNs()
+int32_t CXFA_SubjectDNs::CountSubjectDNs()
{
return m_pNode ? m_pNode->CountChildren(XFA_ELEMENT_SubjectDN) : 0;
}
-CFX_WideString CXFA_SubjectDNs::GetSubjectDNString(FX_INT32 nIndex, XFA_ATTRIBUTE eAttribute)
+CFX_WideString CXFA_SubjectDNs::GetSubjectDNString(int32_t nIndex, XFA_ATTRIBUTE eAttribute)
{
if (nIndex <= -1 || !m_pNode) {
return FX_WSTRC(L"");
@@ -4043,7 +4043,7 @@ CFX_WideString CXFA_SubjectDNs::GetSubjectDNString(FX_INT32 nIndex, XFA_ATTRIBUT
pSubjectDNNode->GetAttribute(eAttribute, wsAttributeValue, FALSE);
return wsAttributeValue;
}
-CFX_WideString CXFA_SubjectDNs::GetSubjectDNContent(FX_INT32 nIndex)
+CFX_WideString CXFA_SubjectDNs::GetSubjectDNContent(int32_t nIndex)
{
if (nIndex <= -1 || !m_pNode) {
return FX_WSTRC(L"");
@@ -4060,11 +4060,11 @@ XFA_ATTRIBUTEENUM CXFA_DigestMethods::GetDigestMethodsType()
{
return XFA_GetEnumTypeAttribute(m_pNode);
}
-FX_INT32 CXFA_DigestMethods::CountDigestMethods()
+int32_t CXFA_DigestMethods::CountDigestMethods()
{
return m_pNode ? m_pNode->CountChildren(XFA_ELEMENT_DigestMethod) : 0;
}
-CFX_WideString CXFA_DigestMethods::GetDigestMethodContent(FX_INT32 nIndex)
+CFX_WideString CXFA_DigestMethods::GetDigestMethodContent(int32_t nIndex)
{
if (nIndex <= -1 || !m_pNode) {
return FX_WSTRC(L"");
@@ -4081,11 +4081,11 @@ XFA_ATTRIBUTEENUM CXFA_Encodings::GetEncodingsType()
{
return XFA_GetEnumTypeAttribute(m_pNode);
}
-FX_INT32 CXFA_Encodings::CountEncodings()
+int32_t CXFA_Encodings::CountEncodings()
{
return m_pNode ? m_pNode->CountChildren(XFA_ELEMENT_Encoding) : 0;
}
-CFX_WideString CXFA_Encodings::GetEncodingContent(FX_INT32 nIndex)
+CFX_WideString CXFA_Encodings::GetEncodingContent(int32_t nIndex)
{
if (nIndex <= -1 || !m_pNode) {
return FX_WSTRC(L"");
@@ -4102,11 +4102,11 @@ XFA_ATTRIBUTEENUM CXFA_EncryptionMethods::GetEncryptionMethodsType()
{
return XFA_GetEnumTypeAttribute(m_pNode);
}
-FX_INT32 CXFA_EncryptionMethods::CountEncryptionMethods()
+int32_t CXFA_EncryptionMethods::CountEncryptionMethods()
{
return m_pNode ? m_pNode->CountChildren(XFA_ELEMENT_EncryptionMethod) : 0;
}
-CFX_WideString CXFA_EncryptionMethods::GetEncryptionMethodContent(FX_INT32 nIndex)
+CFX_WideString CXFA_EncryptionMethods::GetEncryptionMethodContent(int32_t nIndex)
{
if (nIndex <= -1 || !m_pNode) {
return FX_WSTRC(L"");
@@ -4123,11 +4123,11 @@ XFA_ATTRIBUTEENUM CXFA_Reasons::GetReasonsType()
{
return XFA_GetEnumTypeAttribute(m_pNode);
}
-FX_INT32 CXFA_Reasons::CountReasons()
+int32_t CXFA_Reasons::CountReasons()
{
return m_pNode ? m_pNode->CountChildren(XFA_ELEMENT_Reason) : 0;
}
-CFX_WideString CXFA_Reasons::GetReasonContent(FX_INT32 nIndex)
+CFX_WideString CXFA_Reasons::GetReasonContent(int32_t nIndex)
{
if (nIndex <= -1 || !m_pNode) {
return FX_WSTRC(L"");
@@ -4144,11 +4144,11 @@ XFA_ATTRIBUTEENUM CXFA_Manifest::GetAction()
{
return XFA_GetEnumTypeAttribute(m_pNode, XFA_ATTRIBUTE_Action, XFA_ATTRIBUTEENUM_Include);
}
-FX_INT32 CXFA_Manifest::CountReives()
+int32_t CXFA_Manifest::CountReives()
{
return m_pNode ? m_pNode->CountChildren(XFA_ELEMENT_Ref) : 0;
}
-CFX_WideString CXFA_Manifest::GetRefContent(FX_INT32 nIndex)
+CFX_WideString CXFA_Manifest::GetRefContent(int32_t nIndex)
{
if (nIndex <= -1 || !m_pNode) {
return FX_WSTRC(L"");
diff --git a/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp b/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp
index a8e9772669..71ceebf764 100644
--- a/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp
@@ -60,7 +60,7 @@ static IFDE_XMLNode* XFA_FDEExtension_GetDocumentNode(IFDE_XMLDoc *pXMLDoc, FX_B
}
return NULL;
}
-FX_INT32 CXFA_SimpleParser::StartParse(IFX_FileRead *pStream, XFA_XDPPACKET ePacketID)
+int32_t CXFA_SimpleParser::StartParse(IFX_FileRead *pStream, XFA_XDPPACKET ePacketID)
{
CloseParser();
m_pFileRead = pStream;
@@ -86,12 +86,12 @@ FX_INT32 CXFA_SimpleParser::StartParse(IFX_FileRead *pStream, XFA_XDPPACKET ePac
m_ePacketID = ePacketID;
return XFA_PARSESTATUS_Ready;
}
-FX_INT32 CXFA_SimpleParser::DoParse(IFX_Pause *pPause)
+int32_t CXFA_SimpleParser::DoParse(IFX_Pause *pPause)
{
if (m_pXMLDoc == NULL || m_ePacketID == XFA_XDPPACKET_UNKNOWN) {
return XFA_PARSESTATUS_StatusErr;
}
- FX_INT32 iRet = m_pXMLDoc->DoLoad(pPause);
+ int32_t iRet = m_pXMLDoc->DoLoad(pPause);
if (iRet < 0) {
return XFA_PARSESTATUS_SyntaxErr;
}
@@ -109,7 +109,7 @@ FX_INT32 CXFA_SimpleParser::DoParse(IFX_Pause *pPause)
}
return XFA_PARSESTATUS_Done;
}
-FX_INT32 CXFA_SimpleParser::ParseXMLData(const CFX_WideString &wsXML, IFDE_XMLNode* &pXMLNode, IFX_Pause *pPause)
+int32_t CXFA_SimpleParser::ParseXMLData(const CFX_WideString &wsXML, IFDE_XMLNode* &pXMLNode, IFX_Pause *pPause)
{
CloseParser();
pXMLNode = NULL;
@@ -132,7 +132,7 @@ FX_INT32 CXFA_SimpleParser::ParseXMLData(const CFX_WideString &wsXML, IFDE_XMLNo
if (!m_pXMLDoc->LoadXML(pParser)) {
return XFA_PARSESTATUS_StatusErr;
}
- FX_INT32 iRet = m_pXMLDoc->DoLoad(pPause);
+ int32_t iRet = m_pXMLDoc->DoLoad(pPause);
if (iRet < 0 || iRet >= 100) {
m_pXMLDoc->CloseXML();
}
@@ -285,7 +285,7 @@ static FX_BOOL XFA_FDEExtension_FindAttributeWithNS(IFDE_XMLElement *pElement, F
CFX_WideString wsAttrName;
CFX_WideString wsAttrValue;
CFX_WideString wsAttrNS;
- for(FX_INT32 iAttrCount = pElement->CountAttributes(), i = 0; i < iAttrCount; i ++) {
+ for(int32_t iAttrCount = pElement->CountAttributes(), i = 0; i < iAttrCount; i ++) {
pElement->GetAttribute(i, wsAttrName, wsAttrValue);
FX_STRSIZE iFind = wsAttrName.Find(L':', 0);
CFX_WideString wsNSPrefix;
@@ -354,8 +354,8 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP(IFDE_XMLNode* pXMLDocumentNod
pXFARootNode->SetCData(XFA_ATTRIBUTE_Name, FX_WSTRC(L"xfa"));
{
IFDE_XMLElement* pElement = (IFDE_XMLElement*)pXMLDocumentNode;
- FX_INT32 iAttributeCount = pElement->CountAttributes();
- for(FX_INT32 i = 0; i < iAttributeCount; i++) {
+ int32_t iAttributeCount = pElement->CountAttributes();
+ for(int32_t i = 0; i < iAttributeCount; i++) {
CFX_WideString wsAttriName, wsAttriValue;
pElement->GetAttribute(i, wsAttriName, wsAttriValue);
if(wsAttriName == FX_WSTRC(L"uuid")) {
@@ -706,7 +706,7 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode, IFDE_XMLNode* pX
pXFAChild->SetAttribute(XFA_ATTRIBUTE_Name, wsTagName);
}
FX_BOOL IsNeedValue = TRUE;
- for(FX_INT32 i = 0, count = pXMLElement->CountAttributes(); i < count; i++) {
+ for(int32_t i = 0, count = pXMLElement->CountAttributes(); i < count; i++) {
CFX_WideString wsAttrQualifiedName;
CFX_WideString wsAttrName;
CFX_WideString wsAttrValue;
@@ -968,7 +968,7 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode, IFDE_XMLNode* pXMLNo
pXFAChild->SetCData(XFA_ATTRIBUTE_Name, wsNodeName);
FX_BOOL bNeedValue = TRUE;
if (1) {
- for(FX_INT32 i = 0, count = pXMLElement->CountAttributes(); i < count; i++) {
+ for(int32_t i = 0, count = pXMLElement->CountAttributes(); i < count; i++) {
CFX_WideString wsAttrQualifiedName;
CFX_WideString wsAttrValue;
CFX_WideString wsAttrName;
@@ -1158,7 +1158,7 @@ void CXFA_SimpleParser::ParseInstruction(CXFA_Node *pXFANode, IFDE_XMLInstructio
}
CFX_WideString wsTargetName;
pXMLInstruction->GetTargetName(wsTargetName);
- FX_INT32 iDataCount = pXMLInstruction->CountData();
+ int32_t iDataCount = pXMLInstruction->CountData();
if (wsTargetName == FX_WSTRC(L"originalXFAVersion")) {
CFX_WideString wsData;
if(pXMLInstruction->GetData(0, wsData) && (pXFANode->GetDocument()->RecognizeXFAVersionNumber(wsData) != XFA_VERSION_UNKNOWN)) {
@@ -1201,29 +1201,29 @@ CXFA_DocumentParser::~CXFA_DocumentParser()
{
CloseParser();
}
-FX_INT32 CXFA_DocumentParser::StartParse(IFX_FileRead *pStream, XFA_XDPPACKET ePacketID )
+int32_t CXFA_DocumentParser::StartParse(IFX_FileRead *pStream, XFA_XDPPACKET ePacketID )
{
CloseParser();
- FX_INT32 nRetStatus = m_nodeParser.StartParse(pStream, ePacketID);
+ int32_t nRetStatus = m_nodeParser.StartParse(pStream, ePacketID);
if(nRetStatus == XFA_PARSESTATUS_Ready) {
m_pDocument = FX_NEW CXFA_Document(this);
m_nodeParser.SetFactory(m_pDocument);
}
return nRetStatus;
}
-FX_INT32 CXFA_DocumentParser::DoParse(IFX_Pause *pPause )
+int32_t CXFA_DocumentParser::DoParse(IFX_Pause *pPause )
{
- FX_INT32 nRetStatus = m_nodeParser.DoParse(pPause);
+ int32_t nRetStatus = m_nodeParser.DoParse(pPause);
if (nRetStatus >= XFA_PARSESTATUS_Done) {
FXSYS_assert(m_pDocument);
m_pDocument->SetRoot(m_nodeParser.GetRootNode());
}
return nRetStatus;
}
-FX_INT32 CXFA_DocumentParser::ParseXMLData(const CFX_WideString &wsXML, IFDE_XMLNode* &pXMLNode, IFX_Pause *pPause)
+int32_t CXFA_DocumentParser::ParseXMLData(const CFX_WideString &wsXML, IFDE_XMLNode* &pXMLNode, IFX_Pause *pPause)
{
CloseParser();
- FX_INT32 nRetStatus = m_nodeParser.ParseXMLData(wsXML, pXMLNode, NULL);
+ int32_t nRetStatus = m_nodeParser.ParseXMLData(wsXML, pXMLNode, NULL);
if(nRetStatus == XFA_PARSESTATUS_Done && pXMLNode) {
m_pDocument = FX_NEW CXFA_Document(this);
m_nodeParser.SetFactory(m_pDocument);
@@ -1279,7 +1279,7 @@ CXFA_XMLParser::~CXFA_XMLParser()
m_ws1.Empty();
m_ws2.Empty();
}
-FX_INT32 CXFA_XMLParser::DoParser(IFX_Pause *pPause)
+int32_t CXFA_XMLParser::DoParser(IFX_Pause *pPause)
{
if (m_dwStatus == FDE_XMLSYNTAXSTATUS_Error) {
return -1;
@@ -1287,7 +1287,7 @@ FX_INT32 CXFA_XMLParser::DoParser(IFX_Pause *pPause)
if (m_dwStatus == FDE_XMLSYNTAXSTATUS_EOS) {
return 100;
}
- FX_INT32 iCount = 0;
+ int32_t iCount = 0;
while (TRUE) {
m_dwStatus = m_pParser->DoSyntaxParse();
switch (m_dwStatus) {
diff --git a/xfa/src/fxfa/src/parser/xfa_parser_imp.h b/xfa/src/fxfa/src/parser/xfa_parser_imp.h
index 626141a02c..cdfbe70917 100644
--- a/xfa/src/fxfa/src/parser/xfa_parser_imp.h
+++ b/xfa/src/fxfa/src/parser/xfa_parser_imp.h
@@ -18,9 +18,9 @@ public:
delete this;
}
- virtual FX_INT32 StartParse(IFX_FileRead *pStream, XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP);
- virtual FX_INT32 DoParse(IFX_Pause *pPause = NULL);
- virtual FX_INT32 ParseXMLData(const CFX_WideString &wsXML, IFDE_XMLNode* &pXMLNode, IFX_Pause *pPause = NULL);
+ virtual int32_t StartParse(IFX_FileRead *pStream, XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP);
+ virtual int32_t DoParse(IFX_Pause *pPause = NULL);
+ virtual int32_t ParseXMLData(const CFX_WideString &wsXML, IFDE_XMLNode* &pXMLNode, IFX_Pause *pPause = NULL);
virtual void ConstructXFANode(CXFA_Node* pXFANode, IFDE_XMLNode* pXMLNode);
virtual IXFA_ObjFactory* GetFactory() const
{
@@ -72,9 +72,9 @@ public:
{
delete this;
}
- virtual FX_INT32 StartParse(IFX_FileRead *pStream, XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP);
- virtual FX_INT32 DoParse(IFX_Pause *pPause = NULL);
- virtual FX_INT32 ParseXMLData(const CFX_WideString &wsXML, IFDE_XMLNode* &pXMLNode, IFX_Pause *pPause = NULL);
+ virtual int32_t StartParse(IFX_FileRead *pStream, XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP);
+ virtual int32_t DoParse(IFX_Pause *pPause = NULL);
+ virtual int32_t ParseXMLData(const CFX_WideString &wsXML, IFDE_XMLNode* &pXMLNode, IFX_Pause *pPause = NULL);
virtual void ConstructXFANode(CXFA_Node* pXFANode, IFDE_XMLNode* pXMLNode);
virtual IXFA_ObjFactory* GetFactory() const
{
@@ -113,7 +113,7 @@ public:
{
delete this;
}
- virtual FX_INT32 DoParser(IFX_Pause *pPause);
+ virtual int32_t DoParser(IFX_Pause *pPause);
protected:
IFDE_XMLNode *m_pRoot;
IFX_Stream *m_pStream;
diff --git a/xfa/src/fxfa/src/parser/xfa_script_eventpseudomodel.cpp b/xfa/src/fxfa/src/parser/xfa_script_eventpseudomodel.cpp
index fb83349961..6e06a0fd8f 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_eventpseudomodel.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_eventpseudomodel.cpp
@@ -35,7 +35,7 @@ void Script_EventPseudoModel_StringProperty(FXJSE_HVALUE hValue, CFX_WideString&
FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue));
}
}
-void Script_EventPseudoModel_InterProperty(FXJSE_HVALUE hValue, FX_INT32& iValue, FX_BOOL bSetting)
+void Script_EventPseudoModel_InterProperty(FXJSE_HVALUE hValue, int32_t& iValue, FX_BOOL bSetting)
{
if (bSetting) {
iValue = FXJSE_Value_ToInteger(hValue);
diff --git a/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp b/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp
index f4254f0bbc..5a1eff1a4a 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp
@@ -84,7 +84,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_CurrentPage(FXJSE_HVALUE hV
pNotify->GetDocProvider()->SetCurrentPage(hDoc, FXJSE_Value_ToInteger(hValue));
return;
}
- FX_INT32 iCurrentPage = pNotify->GetDocProvider()->GetCurrentPage(hDoc);
+ int32_t iCurrentPage = pNotify->GetDocProvider()->GetCurrentPage(hDoc);
FXJSE_Value_SetInteger(hValue, iCurrentPage);
}
void CScript_HostPseudoModel::Script_HostPseudoModel_Language(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute)
@@ -112,7 +112,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_NumPages(FXJSE_HVALUE hValu
ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_NUMPAGES);
return;
}
- FX_INT32 iNumPages = pNotify->GetDocProvider()->CountPages(hDoc);
+ int32_t iNumPages = pNotify->GetDocProvider()->CountPages(hDoc);
FXJSE_Value_SetInteger(hValue, iNumPages);
}
void CScript_HostPseudoModel::Script_HostPseudoModel_Platform(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute)
@@ -241,7 +241,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_GotoURL(CFXJSE_Arguments* p
if (!m_pDocument->GetScriptContext()->IsRunAtClient()) {
return;
}
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"gotoURL");
return;
@@ -263,7 +263,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList(CFXJSE_Arguments*
if (!m_pDocument->GetScriptContext()->IsRunAtClient()) {
return;
}
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"openList");
return;
@@ -293,7 +293,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList(CFXJSE_Arguments*
}
FX_DWORD dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings;
XFA_RESOLVENODE_RS resoveNodeRS;
- FX_INT32 iRet = pScriptContext->ResolveObjects(pObject, wsExpression, resoveNodeRS, dwFlag);
+ int32_t iRet = pScriptContext->ResolveObjects(pObject, wsExpression, resoveNodeRS, dwFlag);
if (iRet < 1 || !resoveNodeRS.nodes[0]->IsNode()) {
FXJSE_Value_Release(hValue);
return;
@@ -315,7 +315,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList(CFXJSE_Arguments*
}
void CScript_HostPseudoModel::Script_HostPseudoModel_Response(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 4) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"response");
return;
@@ -356,21 +356,21 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_DocumentInBatch(CFXJSE_Argu
if (!pNotify) {
return;
}
- FX_INT32 iCur = pNotify->GetAppProvider()->GetCurDocumentInBatch();
+ int32_t iCur = pNotify->GetAppProvider()->GetCurDocumentInBatch();
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
FXJSE_Value_SetInteger(hValue, iCur);
}
}
-static FX_INT32 XFA_FilterName(FX_WSTR wsExpression, FX_INT32 nStart, CFX_WideString &wsFilter)
+static int32_t XFA_FilterName(FX_WSTR wsExpression, int32_t nStart, CFX_WideString &wsFilter)
{
FXSYS_assert(nStart > -1);
- FX_INT32 iLength = wsExpression.GetLength();
+ int32_t iLength = wsExpression.GetLength();
if (nStart >= iLength) {
return iLength;
}
FX_LPWSTR pBuf = wsFilter.GetBuffer(iLength - nStart);
- FX_INT32 nCount = 0;
+ int32_t nCount = 0;
FX_LPCWSTR pSrc = wsExpression.GetPtr();
FX_WCHAR wCur;
while (nStart < iLength) {
@@ -387,7 +387,7 @@ static FX_INT32 XFA_FilterName(FX_WSTR wsExpression, FX_INT32 nStart, CFX_WideSt
}
void CScript_HostPseudoModel::Script_HostPseudoModel_ResetData(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 0 || iLength > 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"resetData");
return;
@@ -405,10 +405,10 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ResetData(CFXJSE_Arguments*
pNotify->ResetData();
return;
}
- FX_INT32 iStart = 0;
+ int32_t iStart = 0;
CFX_WideString wsName;
CXFA_Node* pNode = NULL;
- FX_INT32 iExpLength = wsExpression.GetLength();
+ int32_t iExpLength = wsExpression.GetLength();
while (iStart < iExpLength) {
iStart = XFA_FilterName(wsExpression, iStart, wsName);
IXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
@@ -421,7 +421,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ResetData(CFXJSE_Arguments*
}
FX_DWORD dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings;
XFA_RESOLVENODE_RS resoveNodeRS;
- FX_INT32 iRet = pScriptContext->ResolveObjects(pObject, wsName, resoveNodeRS, dwFlag);
+ int32_t iRet = pScriptContext->ResolveObjects(pObject, wsName, resoveNodeRS, dwFlag);
if (iRet < 1 || !resoveNodeRS.nodes[0]->IsNode()) {
continue;
}
@@ -437,7 +437,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Beep(CFXJSE_Arguments* pArg
if (!m_pDocument->GetScriptContext()->IsRunAtClient()) {
return;
}
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 0 || iLength > 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"beep");
return;
@@ -457,7 +457,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_SetFocus(CFXJSE_Arguments*
if (!m_pDocument->GetScriptContext()->IsRunAtClient()) {
return;
}
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"setFocus");
return;
@@ -488,7 +488,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_SetFocus(CFXJSE_Arguments*
}
FX_DWORD dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings;
XFA_RESOLVENODE_RS resoveNodeRS;
- FX_INT32 iRet = pScriptContext->ResolveObjects(pObject, wsExpression, resoveNodeRS, dwFlag);
+ int32_t iRet = pScriptContext->ResolveObjects(pObject, wsExpression, resoveNodeRS, dwFlag);
if (iRet < 1 || !resoveNodeRS.nodes[0]->IsNode()) {
FXJSE_Value_Release(hValue);
return;
@@ -516,7 +516,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_MessageBox(CFXJSE_Arguments
if (!m_pDocument->GetScriptContext()->IsRunAtClient()) {
return;
}
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 4) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"messageBox");
return;
@@ -551,13 +551,13 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_MessageBox(CFXJSE_Arguments
dwButtonType = XFA_MB_OK;
}
}
- FX_INT32 iValue = pNotify->GetAppProvider()->MsgBox(wsMessage, bsTitle, dwMessageType, dwButtonType);
+ int32_t iValue = pNotify->GetAppProvider()->MsgBox(wsMessage, bsTitle, dwMessageType, dwButtonType);
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
FXJSE_Value_SetInteger(hValue, iValue);
}
}
-FX_BOOL CScript_HostPseudoModel::Script_HostPseudoModel_ValidateArgsForMsg(CFXJSE_Arguments* pArguments, FX_INT32 iArgIndex, CFX_WideString& wsValue)
+FX_BOOL CScript_HostPseudoModel::Script_HostPseudoModel_ValidateArgsForMsg(CFXJSE_Arguments* pArguments, int32_t iArgIndex, CFX_WideString& wsValue)
{
if(pArguments == NULL || iArgIndex < 0) {
return FALSE;
@@ -588,7 +588,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_DocumentCountInBatch(CFXJSE
if (!pNotify) {
return;
}
- FX_INT32 iValue = pNotify->GetAppProvider()->GetDocumentCountInBatch();
+ int32_t iValue = pNotify->GetAppProvider()->GetDocumentCountInBatch();
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
FXJSE_Value_SetInteger(hValue, iValue);
@@ -599,7 +599,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Print(CFXJSE_Arguments* pAr
if (!m_pDocument->GetScriptContext()->IsRunAtClient()) {
return;
}
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 8) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"print");
return;
@@ -617,11 +617,11 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Print(CFXJSE_Arguments* pAr
if(bShowDialog) {
dwOptions |= XFA_PRINTOPT_ShowDialog;
}
- FX_INT32 nStartPage = 0;
+ int32_t nStartPage = 0;
if (iLength >= 2) {
nStartPage = pArguments->GetInt32(1);
}
- FX_INT32 nEndPage = 0;
+ int32_t nEndPage = 0;
if (iLength >= 3) {
nEndPage = pArguments->GetInt32(2);
}
@@ -665,7 +665,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Print(CFXJSE_Arguments* pAr
}
void CScript_HostPseudoModel::Script_HostPseudoModel_ImportData(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 0 || iLength > 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"importData");
return;
@@ -684,7 +684,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ImportData(CFXJSE_Arguments
}
void CScript_HostPseudoModel::Script_HostPseudoModel_ExportData(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 0 || iLength > 2) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"exportData");
return;
@@ -712,8 +712,8 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_PageUp(CFXJSE_Arguments* pA
return;
}
IXFA_Doc* hDoc = pNotify->GetHDOC();
- FX_INT32 nCurPage = pNotify->GetDocProvider()->GetCurrentPage(hDoc);
- FX_INT32 nNewPage = 0;
+ int32_t nCurPage = pNotify->GetDocProvider()->GetCurrentPage(hDoc);
+ int32_t nNewPage = 0;
if (nCurPage <= 1) {
return;
}
@@ -727,12 +727,12 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_PageDown(CFXJSE_Arguments*
return;
}
IXFA_Doc* hDoc = pNotify->GetHDOC();
- FX_INT32 nCurPage = pNotify->GetDocProvider()->GetCurrentPage(hDoc);
- FX_INT32 nPageCount = pNotify->GetDocProvider()->CountPages(hDoc);
+ int32_t nCurPage = pNotify->GetDocProvider()->GetCurrentPage(hDoc);
+ int32_t nPageCount = pNotify->GetDocProvider()->CountPages(hDoc);
if (!nPageCount || nCurPage == nPageCount) {
return;
}
- FX_INT32 nNewPage = 0;
+ int32_t nNewPage = 0;
if (nCurPage >= nPageCount) {
nNewPage = nPageCount - 1;
} else {
diff --git a/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.h b/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.h
index 118680e792..ef9d81d3ce 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.h
+++ b/xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.h
@@ -45,6 +45,6 @@ public:
void Script_HostPseudoModel_CurrentDateTime(CFXJSE_Arguments* pArguments);
protected:
void Script_HostPseudoModel_LoadString(FXJSE_HVALUE hValue, IXFA_Notify* pNotify, FX_DWORD dwFlag);
- FX_BOOL Script_HostPseudoModel_ValidateArgsForMsg(CFXJSE_Arguments* pArguments, FX_INT32 iArgIndex, CFX_WideString& wsValue);
+ FX_BOOL Script_HostPseudoModel_ValidateArgsForMsg(CFXJSE_Arguments* pArguments, int32_t iArgIndex, CFX_WideString& wsValue);
};
#endif
diff --git a/xfa/src/fxfa/src/parser/xfa_script_imp.cpp b/xfa/src/fxfa/src/parser/xfa_script_imp.cpp
index cd196f585d..be10dff62a 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_imp.cpp
@@ -53,7 +53,7 @@ CXFA_ScriptContext::~CXFA_ScriptContext()
m_pResolveProcessor = NULL;
}
m_upObjectArray.RemoveAll();
- for (FX_INT32 i = 0; i < m_CacheListArray.GetSize(); i++) {
+ for (int32_t i = 0; i < m_CacheListArray.GetSize(); i++) {
delete ((CXFA_NodeList*)m_CacheListArray[i]);
}
m_CacheListArray.RemoveAll();
@@ -93,7 +93,7 @@ FX_BOOL CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType, FX_WSTR ws
}
CFX_WideTextBuf wsJavaScript;
CFX_WideString wsErrorInfo;
- FX_INT32 iFlags = XFA_FM2JS_Translate(wsScript, wsJavaScript, wsErrorInfo);
+ int32_t iFlags = XFA_FM2JS_Translate(wsScript, wsJavaScript, wsErrorInfo);
if(iFlags) {
FXJSE_Value_SetUndefined(hRetValue);
return FALSE;
@@ -162,7 +162,7 @@ void CXFA_ScriptContext::GlobalPropertySetter(FXJSE_HOBJECT hObject, FX_BSTR szP
FX_BOOL CXFA_ScriptContext::QueryNodeByFlag(CXFA_Node* refNode, FX_WSTR propname, FXJSE_HVALUE hValue, FX_DWORD dwFlag, FX_BOOL bSetting)
{
XFA_RESOLVENODE_RS resolveRs;
- FX_INT32 iRet = ResolveObjects(refNode, propname, resolveRs, dwFlag);
+ int32_t iRet = ResolveObjects(refNode, propname, resolveRs, dwFlag);
FX_BOOL bResult = FALSE;
if (iRet > 0) {
bResult = TRUE;
@@ -190,7 +190,7 @@ void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject, FX_BSTR szP
XFA_FM2JS_GlobalPropertyGetter(lpScriptContext->m_hFM2JSContext, hValue);
return;
}
- FX_UINT32 uHashCode = FX_HashCode_String_GetW(wsPropName, wsPropName.GetLength());
+ uint32_t uHashCode = FX_HashCode_String_GetW(wsPropName, wsPropName.GetLength());
if(uHashCode != XFA_HASHCODE_Layout) {
CXFA_Object * pObject = lpScriptContext->GetDocument()->GetXFANode(uHashCode);
if (pObject) {
@@ -299,7 +299,7 @@ void CXFA_ScriptContext::NormalPropertySetter(FXJSE_HOBJECT hObject, FX_BSTR szP
}
}
}
-FX_INT32 CXFA_ScriptContext::NormalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FX_BOOL bQueryIn)
+int32_t CXFA_ScriptContext::NormalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FX_BOOL bQueryIn)
{
CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
if(pObject == NULL) {
@@ -317,7 +317,7 @@ FX_INT32 CXFA_ScriptContext::NormalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR
}
return FXJSE_ClassPropType_Property;
}
-FX_INT32 CXFA_ScriptContext::GlobalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FX_BOOL bQueryIn)
+int32_t CXFA_ScriptContext::GlobalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FX_BOOL bQueryIn)
{
CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
if(pObject == NULL) {
@@ -524,7 +524,7 @@ void CXFA_ScriptContext::AddJSBuiltinObject(XFA_LPCJSBUILTININFO pBuitinObject)
}
m_JSBuiltInObjects.SetAt(pBuitinObject->pName, (void*)pBuitinObject);
}
-FX_INT32 CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode, FX_WSTR wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, FX_DWORD dwStyles, CXFA_Node* bindNode)
+int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode, FX_WSTR wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, FX_DWORD dwStyles, CXFA_Node* bindNode)
{
if (wsExpression.IsEmpty()) {
return 0;
@@ -542,9 +542,9 @@ FX_INT32 CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode, FX_WSTR wsExpr
m_pResolveProcessor->GetNodeHelper()->m_pCreateParent = NULL;
m_pResolveProcessor->GetNodeHelper()->m_iCurAllStart = -1;
CXFA_ResolveNodesData rndFind;
- FX_INT32 nStart = 0;
- FX_INT32 nLevel = 0;
- FX_INT32 nRet = -1;
+ int32_t nStart = 0;
+ int32_t nLevel = 0;
+ int32_t nRet = -1;
rndFind.m_pSC = this;
CXFA_ObjArray findNodes;
if (refNode != NULL) {
@@ -552,10 +552,10 @@ FX_INT32 CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode, FX_WSTR wsExpr
} else {
findNodes.Add(m_pDocument->GetRoot());
}
- FX_INT32 nNodes = 0;
+ int32_t nNodes = 0;
while (TRUE) {
nNodes = findNodes.GetSize();
- FX_INT32 i = 0;
+ int32_t i = 0;
rndFind.m_dwStyles = dwStyles;
m_pResolveProcessor->m_iCurStart = nStart;
nStart = m_pResolveProcessor->XFA_ResolveNodes_GetFilter(wsExpression, nStart, rndFind);
@@ -614,7 +614,7 @@ FX_INT32 CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode, FX_WSTR wsExpr
rndFind.m_Nodes.SetAt(0, (CXFA_Object*)FXJSE_Value_ToObject(hValue, NULL));
FXJSE_Value_Release(hValue);
}
- FX_INT32 iSize = m_upObjectArray.GetSize();
+ int32_t iSize = m_upObjectArray.GetSize();
if (iSize) {
m_upObjectArray.RemoveAt(iSize - 1);
}
@@ -686,12 +686,12 @@ FXJSE_HVALUE CXFA_ScriptContext::GetJSValueFromMap(CXFA_Object* pObject)
}
return (FXJSE_HVALUE)pValue;
}
-FX_INT32 CXFA_ScriptContext::GetIndexByName(CXFA_Node* refNode)
+int32_t CXFA_ScriptContext::GetIndexByName(CXFA_Node* refNode)
{
CXFA_NodeHelper* lpNodeHelper = m_pResolveProcessor->GetNodeHelper();
return lpNodeHelper->XFA_GetIndex(refNode, XFA_LOGIC_Transparent, lpNodeHelper->XFA_NodeIsProperty(refNode), FALSE);
}
-FX_INT32 CXFA_ScriptContext::GetIndexByClassName(CXFA_Node* refNode)
+int32_t CXFA_ScriptContext::GetIndexByClassName(CXFA_Node* refNode)
{
CXFA_NodeHelper* lpNodeHelper = m_pResolveProcessor->GetNodeHelper();
return lpNodeHelper->XFA_GetIndex(refNode, XFA_LOGIC_Transparent, lpNodeHelper->XFA_NodeIsProperty(refNode), TRUE);
@@ -731,10 +731,10 @@ static const XFA_JSBUILTININFO gs_JSBUILTINData[] = {
{0x8108b9a9, "Number"},
{0xe07e3fbe, "Date"},
};
-const FX_INT32 g_iJSBuiltinCount = sizeof(XFA_JSBUILTININFO) / sizeof(XFA_JSBUILTININFO);
-XFA_LPCJSBUILTININFO XFA_GetJSBuiltinByHash(FX_UINT32 uHashCode)
+const int32_t g_iJSBuiltinCount = sizeof(XFA_JSBUILTININFO) / sizeof(XFA_JSBUILTININFO);
+XFA_LPCJSBUILTININFO XFA_GetJSBuiltinByHash(uint32_t uHashCode)
{
- FX_INT32 iStart = 0, iEnd = g_iJSBuiltinCount - 1, iMid;
+ int32_t iStart = 0, iEnd = g_iJSBuiltinCount - 1, iMid;
do {
iMid = (iStart + iEnd) / 2;
XFA_LPCJSBUILTININFO pInfo = gs_JSBUILTINData + iMid;
diff --git a/xfa/src/fxfa/src/parser/xfa_script_imp.h b/xfa/src/fxfa/src/parser/xfa_script_imp.h
index 9ffb8bcda0..fc43583e8d 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_imp.h
+++ b/xfa/src/fxfa/src/parser/xfa_script_imp.h
@@ -27,7 +27,7 @@ public:
}
virtual FX_BOOL RunScript(XFA_SCRIPTLANGTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, CXFA_Object* pThisObject = NULL);
- virtual FX_INT32 ResolveObjects(CXFA_Object* refNode, FX_WSTR wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, FX_DWORD dwStyles = XFA_RESOLVENODE_Children, CXFA_Node* bindNode = NULL);
+ virtual int32_t ResolveObjects(CXFA_Object* refNode, FX_WSTR wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, FX_DWORD dwStyles = XFA_RESOLVENODE_Children, CXFA_Node* bindNode = NULL);
virtual FXJSE_HVALUE GetJSValueFromMap(CXFA_Object* pObject);
virtual void CacheList(CXFA_NodeList* pList)
{
@@ -42,8 +42,8 @@ public:
return m_hJsRuntime;
}
- virtual FX_INT32 GetIndexByName(CXFA_Node* refNode);
- virtual FX_INT32 GetIndexByClassName(CXFA_Node* refNode);
+ virtual int32_t GetIndexByName(CXFA_Node* refNode);
+ virtual int32_t GetIndexByClassName(CXFA_Node* refNode);
virtual void GetSomExpression(CXFA_Node* refNode, CFX_WideString &wsExpression);
virtual void SetNodesOfRunScript(CXFA_NodeArray *pArray);
@@ -68,8 +68,8 @@ public:
static void NormalPropertyGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue);
static void NormalPropertySetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue);
static void NormalMethodCall(FXJSE_HOBJECT hThis, FX_BSTR szFuncName, CFXJSE_Arguments &args);
- static FX_INT32 NormalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FX_BOOL bQueryIn);
- static FX_INT32 GlobalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FX_BOOL bQueryIn);
+ static int32_t NormalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FX_BOOL bQueryIn);
+ static int32_t GlobalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR szPropName, FX_BOOL bQueryIn);
FX_BOOL RunVariablesScript(CXFA_Node* pScriptNode);
CXFA_Object* GetVariablesThis(CXFA_Object* pObject, FX_BOOL bScriptNode = FALSE);
void ReleaseVariablesMap();
diff --git a/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp b/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp
index 25efee719d..e28b0b7658 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp
@@ -38,12 +38,12 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_Ready(FXJSE_HVALUE hVal
ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_READY);
return;
}
- FX_INT32 iStatus = pNotify->GetLayoutStatus();
+ int32_t iStatus = pNotify->GetLayoutStatus();
FXJSE_Value_SetBoolean(hValue, iStatus >= 2);
}
void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_HWXY(CFXJSE_Arguments* pArguments, XFA_LAYOUTMODEL_HWXY layoutModel)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if ( iLength < 1 || iLength > 3) {
FX_LPCWSTR methodName = NULL;
switch (layoutModel) {
@@ -65,7 +65,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_HWXY(CFXJSE_Arguments*
}
CXFA_Node* pNode = NULL;
CFX_WideString wsUnit = FX_WSTRC(L"pt");
- FX_INT32 iIndex = 0;
+ int32_t iIndex = 0;
if (iLength >= 1) {
pNode = (CXFA_Node*)pArguments->GetObject(0);
}
@@ -144,10 +144,10 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_NumberedPageCount(CFXJS
if (!pDocLayout) {
return;
}
- FX_INT32 iPageCount = 0;
- FX_INT32 iPageNum = pDocLayout->CountPages();
+ int32_t iPageCount = 0;
+ int32_t iPageNum = pDocLayout->CountPages();
if (bNumbered) {
- for (FX_INT32 i = 0; i < iPageNum; i++) {
+ for (int32_t i = 0; i < iPageNum; i++) {
IXFA_LayoutPage* pLayoutPage = pDocLayout->GetPage(i);
if (!pLayoutPage) {
continue;
@@ -171,7 +171,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageCount(CFXJSE_Argume
}
void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageSpan(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"pageSpan");
return;
@@ -193,9 +193,9 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageSpan(CFXJSE_Argumen
FXJSE_Value_SetInteger(hValue, -1);
return;
}
- FX_INT32 iLast = pLayoutItem->GetLast()->GetPage()->GetPageIndex();
- FX_INT32 iFirst = pLayoutItem->GetFirst()->GetPage()->GetPageIndex();
- FX_INT32 iPageSpan = iLast - iFirst + 1;
+ int32_t iLast = pLayoutItem->GetLast()->GetPage()->GetPageIndex();
+ int32_t iFirst = pLayoutItem->GetFirst()->GetPage()->GetPageIndex();
+ int32_t iPageSpan = iLast - iFirst + 1;
if (hValue) {
FXJSE_Value_SetInteger(hValue, iPageSpan);
}
@@ -204,7 +204,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_Page(CFXJSE_Arguments*
{
Script_LayoutPseudoModel_PageImp(pArguments, FALSE);
}
-void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray(IXFA_DocLayout* pDocLayout, FX_INT32 iPageNo, const CFX_WideString &wsType, FX_BOOL bOnPageArea, CXFA_NodeArray &retArray)
+void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray(IXFA_DocLayout* pDocLayout, int32_t iPageNo, const CFX_WideString &wsType, FX_BOOL bOnPageArea, CXFA_NodeArray &retArray)
{
CXFA_ContainerLayoutItemImpl* pLayoutPage = (CXFA_ContainerLayoutItemImpl*)pDocLayout->GetPage(iPageNo);
if (!pLayoutPage) {
@@ -327,12 +327,12 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray(IXFA_DocLay
}
void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageContent(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 3) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"pageContent");
return;
}
- FX_INT32 iIndex = 0;
+ int32_t iIndex = 0;
CFX_WideString wsType;
FX_BOOL bOnPageArea = FALSE;
if (iLength >= 1) {
@@ -370,7 +370,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_AbsPageCountInBatch(CFX
return;
}
IXFA_Doc* hDoc = pNotify->GetHDOC();
- FX_INT32 iPageCount = pNotify->GetDocProvider()->AbsPageCountInBatch(hDoc);
+ int32_t iPageCount = pNotify->GetDocProvider()->AbsPageCountInBatch(hDoc);
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
FXJSE_Value_SetInteger(hValue, iPageCount);
@@ -383,7 +383,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_SheetCountInBatch(CFXJS
return;
}
IXFA_Doc* hDoc = pNotify->GetHDOC();
- FX_INT32 iPageCount = pNotify->GetDocProvider()->SheetCountInBatch(hDoc);
+ int32_t iPageCount = pNotify->GetDocProvider()->SheetCountInBatch(hDoc);
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
FXJSE_Value_SetInteger(hValue, iPageCount);
@@ -407,7 +407,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_AbsPageSpan(CFXJSE_Argu
}
void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_AbsPageInBatch(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"absPageInBatch");
return;
@@ -432,7 +432,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_AbsPageInBatch(CFXJSE_A
return;
}
IXFA_Doc* hDoc = pNotify->GetHDOC();
- FX_INT32 iPageCount = pNotify->GetDocProvider()->AbsPageInBatch(hDoc, hWidget);
+ int32_t iPageCount = pNotify->GetDocProvider()->AbsPageInBatch(hDoc, hWidget);
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
FXJSE_Value_SetInteger(hValue, iPageCount);
@@ -440,7 +440,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_AbsPageInBatch(CFXJSE_A
}
void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_SheetInBatch(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"sheetInBatch");
return;
@@ -465,7 +465,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_SheetInBatch(CFXJSE_Arg
return;
}
IXFA_Doc* hDoc = pNotify->GetHDOC();
- FX_INT32 iPageCount = pNotify->GetDocProvider()->SheetInBatch(hDoc, hWidget);
+ int32_t iPageCount = pNotify->GetDocProvider()->SheetInBatch(hDoc, hWidget);
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
FXJSE_Value_SetInteger(hValue, iPageCount);
@@ -488,7 +488,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_AbsPage(CFXJSE_Argument
}
void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageImp(CFXJSE_Arguments* pArguments, FX_BOOL bAbsPage)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
FX_LPCWSTR methodName;
if (bAbsPage) {
@@ -503,7 +503,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageImp(CFXJSE_Argument
if (iLength >= 1) {
pNode = (CXFA_Node*)pArguments->GetObject(0);
}
- FX_INT32 iPage = 0;
+ int32_t iPage = 0;
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (!pNode && hValue) {
FXJSE_Value_SetInteger(hValue, iPage);
diff --git a/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.h b/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.h
index c94742aa3f..d5ee57f77f 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.h
+++ b/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.h
@@ -42,7 +42,7 @@ public:
void Script_LayoutPseudoModel_SheetCount(CFXJSE_Arguments* pArguments);
void Script_LayoutPseudoModel_AbsPage(CFXJSE_Arguments* pArguments);
protected:
- void Script_LayoutPseudoModel_GetObjArray(IXFA_DocLayout* pDocLayout, FX_INT32 iPageNo, const CFX_WideString &wsType, FX_BOOL bOnPageArea, CXFA_NodeArray &retArray);
+ void Script_LayoutPseudoModel_GetObjArray(IXFA_DocLayout* pDocLayout, int32_t iPageNo, const CFX_WideString &wsType, FX_BOOL bOnPageArea, CXFA_NodeArray &retArray);
void Script_LayoutPseudoModel_PageImp(CFXJSE_Arguments* pArguments, FX_BOOL bAbsPage);
};
#endif
diff --git a/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp b/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp
index fc757e689d..0c793b2692 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_nodehelper.cpp
@@ -33,14 +33,14 @@ CXFA_Node* CXFA_NodeHelper::XFA_ResolveNodes_GetOneChild(CXFA_Node* parent, FX_
return NULL;
}
CXFA_NodeArray siblings;
- FX_UINT32 uNameHash = FX_HashCode_String_GetW(pwsName, FXSYS_wcslen(pwsName));
+ uint32_t uNameHash = FX_HashCode_String_GetW(pwsName, FXSYS_wcslen(pwsName));
XFA_NodeAcc_TraverseAnySiblings(parent, uNameHash, &siblings, bIsClassName);
if (siblings.GetSize() == 0) {
return NULL;
}
return siblings[0];
}
-FX_INT32 CXFA_NodeHelper::XFA_CountSiblings(CXFA_Node* pNode, XFA_LOGIC_TYPE eLogicType, CXFA_NodeArray *pSiblings, FX_BOOL bIsClassName)
+int32_t CXFA_NodeHelper::XFA_CountSiblings(CXFA_Node* pNode, XFA_LOGIC_TYPE eLogicType, CXFA_NodeArray *pSiblings, FX_BOOL bIsClassName)
{
CXFA_Node* parent = XFA_ResolveNodes_GetParent(pNode, XFA_LOGIC_NoTransparent);
if(parent == NULL) {
@@ -59,16 +59,16 @@ FX_INT32 CXFA_NodeHelper::XFA_CountSiblings(CXFA_Node* pNode, XFA_LOGIC_TYPE eL
return XFA_NodeAcc_TraverseSiblings(parent, pNode->GetNameHash(), pSiblings, eLogicType, bIsClassName);
}
}
-FX_INT32 CXFA_NodeHelper::XFA_NodeAcc_TraverseAnySiblings(CXFA_Node* parent, FX_DWORD dNameHash, CXFA_NodeArray* pSiblings, FX_BOOL bIsClassName )
+int32_t CXFA_NodeHelper::XFA_NodeAcc_TraverseAnySiblings(CXFA_Node* parent, FX_DWORD dNameHash, CXFA_NodeArray* pSiblings, FX_BOOL bIsClassName )
{
if(parent == NULL || pSiblings == NULL) {
return 0;
}
- FX_INT32 nCount = 0;
- FX_INT32 i = 0;
+ int32_t nCount = 0;
+ int32_t i = 0;
CXFA_NodeArray properties;
parent->GetNodeList(properties, XFA_NODEFILTER_Properties);
- FX_INT32 nProperties = properties.GetSize();
+ int32_t nProperties = properties.GetSize();
for (i = 0; i < nProperties; ++i) {
CXFA_Node* child = properties[i];
if(bIsClassName) {
@@ -89,7 +89,7 @@ FX_INT32 CXFA_NodeHelper::XFA_NodeAcc_TraverseAnySiblings(CXFA_Node* parent, FX_
}
CXFA_NodeArray children;
parent->GetNodeList(children, XFA_NODEFILTER_Children);
- FX_INT32 nChildren = children.GetSize();
+ int32_t nChildren = children.GetSize();
for (i = 0; i < nChildren; i ++) {
CXFA_Node* child = children[i];
if(bIsClassName) {
@@ -114,17 +114,17 @@ FX_INT32 CXFA_NodeHelper::XFA_NodeAcc_TraverseAnySiblings(CXFA_Node* parent, FX_
}
return nCount;
}
-FX_INT32 CXFA_NodeHelper::XFA_NodeAcc_TraverseSiblings(CXFA_Node* parent, FX_DWORD dNameHash, CXFA_NodeArray* pSiblings, XFA_LOGIC_TYPE eLogicType, FX_BOOL bIsClassName, FX_BOOL bIsFindProperty)
+int32_t CXFA_NodeHelper::XFA_NodeAcc_TraverseSiblings(CXFA_Node* parent, FX_DWORD dNameHash, CXFA_NodeArray* pSiblings, XFA_LOGIC_TYPE eLogicType, FX_BOOL bIsClassName, FX_BOOL bIsFindProperty)
{
if (parent == NULL || pSiblings == NULL) {
return 0;
}
- FX_INT32 nCount = 0;
- FX_INT32 i = 0;
+ int32_t nCount = 0;
+ int32_t i = 0;
if(bIsFindProperty) {
CXFA_NodeArray properties;
parent->GetNodeList(properties, XFA_NODEFILTER_Properties);
- FX_INT32 nProperties = properties.GetSize();
+ int32_t nProperties = properties.GetSize();
for (i = 0; i < nProperties; ++i) {
CXFA_Node* child = properties[i];
if(bIsClassName) {
@@ -151,7 +151,7 @@ FX_INT32 CXFA_NodeHelper::XFA_NodeAcc_TraverseSiblings(CXFA_Node* parent, FX_DW
}
CXFA_NodeArray children;
parent->GetNodeList(children, XFA_NODEFILTER_Children);
- FX_INT32 nChildren = children.GetSize();
+ int32_t nChildren = children.GetSize();
for (i = 0; i < nChildren; i ++) {
CXFA_Node* child = children[i];
if(child->GetClassID() == XFA_ELEMENT_Variables) {
@@ -204,7 +204,7 @@ CXFA_Node* CXFA_NodeHelper::XFA_ResolveNodes_GetParent(CXFA_Node* pNode, XFA_LO
}
return parent;
}
-FX_INT32 CXFA_NodeHelper::XFA_GetIndex(CXFA_Node* pNode, XFA_LOGIC_TYPE eLogicType, FX_BOOL bIsProperty , FX_BOOL bIsClassIndex )
+int32_t CXFA_NodeHelper::XFA_GetIndex(CXFA_Node* pNode, XFA_LOGIC_TYPE eLogicType, FX_BOOL bIsProperty , FX_BOOL bIsClassIndex )
{
CXFA_Node* parent = XFA_ResolveNodes_GetParent(pNode, XFA_LOGIC_NoTransparent);
if(parent == NULL) {
@@ -221,8 +221,8 @@ FX_INT32 CXFA_NodeHelper::XFA_GetIndex(CXFA_Node* pNode, XFA_LOGIC_TYPE eLogicT
dwHashName = pNode->GetClassHashCode();
}
CXFA_NodeArray siblings;
- FX_INT32 iSize = XFA_NodeAcc_TraverseSiblings(parent, dwHashName, &siblings, eLogicType, bIsClassIndex);
- for (FX_INT32 i = 0; i < iSize; ++i) {
+ int32_t iSize = XFA_NodeAcc_TraverseSiblings(parent, dwHashName, &siblings, eLogicType, bIsClassIndex);
+ for (int32_t i = 0; i < iSize; ++i) {
CXFA_Node* child = siblings[i];
if (child == pNode) {
return i;
@@ -274,7 +274,7 @@ FX_BOOL CXFA_NodeHelper::XFA_NodeIsTransparent(CXFA_Node* refNode)
}
FX_BOOL CXFA_NodeHelper::XFA_CreateNode_ForCondition(CFX_WideString & wsCondition)
{
- FX_INT32 iLen = wsCondition.GetLength();
+ int32_t iLen = wsCondition.GetLength();
CFX_WideString wsIndex = FX_WSTRC(L"0");;
FX_BOOL bAll = FALSE;
if(iLen == 0) {
@@ -282,7 +282,7 @@ FX_BOOL CXFA_NodeHelper::XFA_CreateNode_ForCondition(CFX_WideString & wsConditio
return FALSE;
}
if(wsCondition.GetAt(0) == '[') {
- FX_INT32 i = 1;
+ int32_t i = 1;
for (; i < iLen; ++i) {
FX_WCHAR ch = wsCondition[i];
if (ch == ' ') {
@@ -304,7 +304,7 @@ FX_BOOL CXFA_NodeHelper::XFA_CreateNode_ForCondition(CFX_WideString & wsConditio
m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeOne;
wsIndex = wsCondition.Mid(i, iLen - 1 - i);
}
- FX_INT32 iIndex = wsIndex.GetInteger();
+ int32_t iIndex = wsIndex.GetInteger();
m_iCreateCount = iIndex;
return TRUE;
}
@@ -333,7 +333,7 @@ FX_BOOL CXFA_NodeHelper::XFA_ResolveNodes_CreateNode(CFX_WideString wsName, CFX_
if(lpElement == NULL) {
return FALSE;
}
- for(FX_INT32 iIndex = 0; iIndex < m_iCreateCount; iIndex ++) {
+ for(int32_t iIndex = 0; iIndex < m_iCreateCount; iIndex ++) {
CXFA_Node* pNewNode = m_pCreateParent->CreateSamePacketNode(lpElement->eName);
if(pNewNode) {
m_pCreateParent->InsertChild(pNewNode);
@@ -348,7 +348,7 @@ FX_BOOL CXFA_NodeHelper::XFA_ResolveNodes_CreateNode(CFX_WideString wsName, CFX_
if(bLastNode) {
eClassType = m_eLastCreateType;
}
- for(FX_INT32 iIndex = 0; iIndex < m_iCreateCount; iIndex ++) {
+ for(int32_t iIndex = 0; iIndex < m_iCreateCount; iIndex ++) {
CXFA_Node* pNewNode = m_pCreateParent->CreateSamePacketNode(eClassType);
if(pNewNode) {
pNewNode->SetAttribute(XFA_ATTRIBUTE_Name, wsName);
diff --git a/xfa/src/fxfa/src/parser/xfa_script_nodehelper.h b/xfa/src/fxfa/src/parser/xfa_script_nodehelper.h
index 2c3faea324..ea3e180385 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_nodehelper.h
+++ b/xfa/src/fxfa/src/parser/xfa_script_nodehelper.h
@@ -19,10 +19,10 @@ public:
CXFA_Node* XFA_ResolveNodes_GetOneChild(CXFA_Node* parent, FX_LPCWSTR pwsName, FX_BOOL bIsClassName = FALSE);
CXFA_Node* XFA_ResolveNodes_GetParent(CXFA_Node* pNode, XFA_LOGIC_TYPE eLogicType = XFA_LOGIC_NoTransparent);
- FX_INT32 XFA_NodeAcc_TraverseSiblings(CXFA_Node* parent, FX_DWORD dNameHash, CXFA_NodeArray* pSiblings, XFA_LOGIC_TYPE eLogicType, FX_BOOL bIsClassName = FALSE, FX_BOOL bIsFindProperty = TRUE);
- FX_INT32 XFA_NodeAcc_TraverseAnySiblings(CXFA_Node* parent, FX_DWORD dNameHash, CXFA_NodeArray* pSiblings, FX_BOOL bIsClassName = FALSE);
- FX_INT32 XFA_CountSiblings(CXFA_Node* pNode, XFA_LOGIC_TYPE eLogicType, CXFA_NodeArray *pSiblings, FX_BOOL bIsClassName = FALSE);
- FX_INT32 XFA_GetIndex(CXFA_Node* pNode, XFA_LOGIC_TYPE eLogicType = XFA_LOGIC_NoTransparent, FX_BOOL bIsProperty = FALSE, FX_BOOL bIsClassIndex = FALSE);
+ int32_t XFA_NodeAcc_TraverseSiblings(CXFA_Node* parent, FX_DWORD dNameHash, CXFA_NodeArray* pSiblings, XFA_LOGIC_TYPE eLogicType, FX_BOOL bIsClassName = FALSE, FX_BOOL bIsFindProperty = TRUE);
+ int32_t XFA_NodeAcc_TraverseAnySiblings(CXFA_Node* parent, FX_DWORD dNameHash, CXFA_NodeArray* pSiblings, FX_BOOL bIsClassName = FALSE);
+ int32_t XFA_CountSiblings(CXFA_Node* pNode, XFA_LOGIC_TYPE eLogicType, CXFA_NodeArray *pSiblings, FX_BOOL bIsClassName = FALSE);
+ int32_t XFA_GetIndex(CXFA_Node* pNode, XFA_LOGIC_TYPE eLogicType = XFA_LOGIC_NoTransparent, FX_BOOL bIsProperty = FALSE, FX_BOOL bIsClassIndex = FALSE);
void XFA_GetNameExpression(CXFA_Node* refNode, CFX_WideString &wsName, FX_BOOL bIsAllPath, XFA_LOGIC_TYPE eLogicType = XFA_LOGIC_NoTransparent);
FX_BOOL XFA_NodeIsTransparent(CXFA_Node* refNode);
FX_BOOL XFA_ResolveNodes_CreateNode(CFX_WideString wsName, CFX_WideString wsCondition, FX_BOOL bLastNode, CXFA_ScriptContext* pScriptContext);
@@ -32,9 +32,9 @@ public:
public:
XFA_ELEMENT m_eLastCreateType;
CXFA_Node* m_pCreateParent;
- FX_INT32 m_iCreateCount;
+ int32_t m_iCreateCount;
XFA_RESOVENODE_RSTYPE m_iCreateFlag;
- FX_INT32 m_iCurAllStart;
+ int32_t m_iCurAllStart;
CXFA_Node* m_pAllStartParent;
};
diff --git a/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp b/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp
index c133f6b6f1..a79a8bf9ca 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp
@@ -31,7 +31,7 @@ CXFA_ResolveProcessor::~CXFA_ResolveProcessor(void)
m_pNodeHelper = NULL;
}
}
-FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData &rnd)
+int32_t CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData &rnd)
{
if (rnd.m_CurNode == NULL) {
return -1;
@@ -77,13 +77,13 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData &rnd)
}
return rnd.m_Nodes.GetSize();
}
- FX_INT32 nRet = XFA_ResolveNodes_Normal(rnd);
+ int32_t nRet = XFA_ResolveNodes_Normal(rnd);
if (nRet < 1 && rnd.m_uHashName == XFA_HASHCODE_Xfa) {
rnd.m_Nodes.Add(rnd.m_pSC->GetDocument()->GetRoot());
}
return rnd.m_Nodes.GetSize();
}
-FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_AnyChild(CXFA_ResolveNodesData &rnd)
+int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_AnyChild(CXFA_ResolveNodesData &rnd)
{
CFX_WideString wsName = rnd.m_wsName.Right(rnd.m_wsName.GetLength() - 1);
CFX_WideString wsCondition = rnd.m_wsCondition;
@@ -106,12 +106,12 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_AnyChild(CXFA_ResolveNodesData
XFA_ResolveNode_FilterCondition(rnd, wsCondition);
return rnd.m_Nodes.GetSize();
}
-FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Dollar(CXFA_ResolveNodesData &rnd)
+int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Dollar(CXFA_ResolveNodesData &rnd)
{
CXFA_ObjArray &nodes = rnd.m_Nodes;
CFX_WideString wsName = rnd.m_wsName;
CFX_WideString wsCondition = rnd.m_wsCondition;
- FX_INT32 iNameLen = wsName.GetLength();
+ int32_t iNameLen = wsName.GetLength();
if (iNameLen == 1) {
nodes.Add(rnd.m_CurNode);
return 1;
@@ -133,7 +133,7 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Dollar(CXFA_ResolveNodesData &r
}
return rnd.m_Nodes.GetSize();
}
-FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Excalmatory(CXFA_ResolveNodesData &rnd)
+int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Excalmatory(CXFA_ResolveNodesData &rnd)
{
if (rnd.m_nLevel > 0) {
return 0;
@@ -157,7 +157,7 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Excalmatory(CXFA_ResolveNodesDa
}
return rnd.m_Nodes.GetSize();
}
-FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_NumberSign(CXFA_ResolveNodesData &rnd)
+int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_NumberSign(CXFA_ResolveNodesData &rnd)
{
FX_DWORD dwStyles = rnd.m_dwStyles;
CFX_WideString wsName = rnd.m_wsName.Right(rnd.m_wsName.GetLength() - 1);
@@ -187,7 +187,7 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_NumberSign(CXFA_ResolveNodesDat
}
return rnd.m_Nodes.GetSize();
}
-FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_ForAttributeRs(CXFA_Object* curNode, CXFA_ResolveNodesData &rnd, FX_WSTR strAttr)
+int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_ForAttributeRs(CXFA_Object* curNode, CXFA_ResolveNodesData &rnd, FX_WSTR strAttr)
{
XFA_LPCSCRIPTATTRIBUTEINFO lpScriptAttribute = XFA_GetScriptAttributeByName(curNode->GetClassID(), strAttr);
if(lpScriptAttribute) {
@@ -198,7 +198,7 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_ForAttributeRs(CXFA_Object* cur
}
return 0;
}
-FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Normal(CXFA_ResolveNodesData &rnd)
+int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal(CXFA_ResolveNodesData &rnd)
{
if (rnd.m_nLevel > 32) {
return 0;
@@ -208,10 +208,10 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Normal(CXFA_ResolveNodesData &r
}
CXFA_Node* curNode = (CXFA_Node*)rnd.m_CurNode;
CXFA_ObjArray &nodes = rnd.m_Nodes;
- FX_INT32 nNum = nodes.GetSize();
+ int32_t nNum = nodes.GetSize();
FX_DWORD dwStyles = rnd.m_dwStyles;
CFX_WideString &wsName = rnd.m_wsName;
- FX_UINT32 uNameHash = rnd.m_uHashName;
+ uint32_t uNameHash = rnd.m_uHashName;
CFX_WideString &wsCondition = rnd.m_wsCondition;
CXFA_ResolveNodesData rndFind;
rndFind.m_wsName = rnd.m_wsName;
@@ -244,7 +244,7 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Normal(CXFA_ResolveNodesData &r
pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling);
}
if((dwStyles & XFA_RESOLVENODE_Properties) && pVariablesNode) {
- FX_UINT32 uPropHash = pVariablesNode->GetClassHashCode();
+ uint32_t uPropHash = pVariablesNode->GetClassHashCode();
if (uPropHash == uNameHash) {
nodes.Add(pVariablesNode);
} else {
@@ -272,7 +272,7 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Normal(CXFA_ResolveNodesData &r
if(pPageSetNode && (dwStyles & XFA_RESOLVENODE_Properties)) {
children.Add(pPageSetNode);
}
- for(FX_INT32 i = 0; i < children.GetSize(); i++) {
+ for(int32_t i = 0; i < children.GetSize(); i++) {
CXFA_Node* child = children[i];
if (dwStyles & XFA_RESOLVENODE_TagName) {
if (child->GetClassHashCode() == uNameHash) {
@@ -324,10 +324,10 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Normal(CXFA_ResolveNodesData &r
}
if (dwStyles & XFA_RESOLVENODE_Properties) {
FX_BOOL bSetFlag = FALSE;
- for(FX_INT32 i = 0; i < properties.GetSize(); i++) {
+ for(int32_t i = 0; i < properties.GetSize(); i++) {
CXFA_Node* childProperty = properties[i];
if(childProperty->IsUnnamed()) {
- FX_UINT32 uPropHash = childProperty->GetClassHashCode();
+ uint32_t uPropHash = childProperty->GetClassHashCode();
XFA_ELEMENT eName = childProperty->GetClassID();
if (uPropHash == uNameHash) {
nodes.Add(childProperty);
@@ -362,7 +362,7 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Normal(CXFA_ResolveNodesData &r
}
}
CXFA_Node* parentNode = m_pNodeHelper->XFA_ResolveNodes_GetParent((CXFA_Node *)curNode, XFA_LOGIC_NoTransparent);
- FX_UINT32 uCurClassHash = curNode->GetClassHashCode();
+ uint32_t uCurClassHash = curNode->GetClassHashCode();
if (parentNode == NULL) {
if(uCurClassHash == uNameHash) {
nodes.Add((CXFA_Node*)curNode);
@@ -477,7 +477,7 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Normal(CXFA_ResolveNodesData &r
}
return 0;
}
-FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Asterisk(CXFA_ResolveNodesData &rnd)
+int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Asterisk(CXFA_ResolveNodesData &rnd)
{
CXFA_Node* curNode = (CXFA_Node*)rnd.m_CurNode;
CXFA_ObjArray &nodes = rnd.m_Nodes;
@@ -486,20 +486,20 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Asterisk(CXFA_ResolveNodesData
nodes.Append((CXFA_ObjArray &)array);
return nodes.GetSize();
}
-FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_PopStack(CFX_Int32Array &stack)
+int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_PopStack(CFX_Int32Array &stack)
{
- FX_INT32 nType = -1;
- FX_INT32 iSize = stack.GetSize() - 1;
+ int32_t nType = -1;
+ int32_t iSize = stack.GetSize() - 1;
if (iSize > -1) {
nType = stack[iSize];
stack.RemoveAt(iSize, 1);
}
return nType;
}
-FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_GetFilter(FX_WSTR wsExpression, FX_INT32 nStart, CXFA_ResolveNodesData &rnd)
+int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_GetFilter(FX_WSTR wsExpression, int32_t nStart, CXFA_ResolveNodesData &rnd)
{
FXSYS_assert(nStart > -1);
- FX_INT32 iLength = wsExpression.GetLength();
+ int32_t iLength = wsExpression.GetLength();
if (nStart >= iLength) {
return 0;
}
@@ -507,11 +507,11 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_GetFilter(FX_WSTR wsExpression,
CFX_WideString& wsCondition = rnd.m_wsCondition;
FX_LPWSTR pNameBuf = wsName.GetBuffer(iLength - nStart);
FX_LPWSTR pConditionBuf = wsCondition.GetBuffer(iLength - nStart);
- FX_INT32 nCount = 0;
- FX_INT32 nNameCount = 0;
- FX_INT32 nConditionCount = 0;
+ int32_t nCount = 0;
+ int32_t nNameCount = 0;
+ int32_t nConditionCount = 0;
CFX_Int32Array stack;
- FX_INT32 nType = -1;
+ int32_t nType = -1;
FX_LPCWSTR pSrc = wsExpression.GetPtr();
FX_WCHAR wPrev = 0, wCur;
FX_BOOL bIsCondition = FALSE;
@@ -594,13 +594,13 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_GetFilter(FX_WSTR wsExpression,
rnd.m_uHashName = FX_HashCode_String_GetW(wsName, wsName.GetLength());
return nStart;
}
-void CXFA_ResolveProcessor::XFA_ResolveNode_ConditionArray(FX_INT32 iCurIndex, CFX_WideString wsCondition, FX_INT32 iFoundCount, CXFA_ResolveNodesData &rnd)
+void CXFA_ResolveProcessor::XFA_ResolveNode_ConditionArray(int32_t iCurIndex, CFX_WideString wsCondition, int32_t iFoundCount, CXFA_ResolveNodesData &rnd)
{
CXFA_NodeArray &findNodes = (CXFA_NodeArray&)rnd.m_Nodes;
- FX_INT32 iLen = wsCondition.GetLength();
+ int32_t iLen = wsCondition.GetLength();
FX_BOOL bRelative = FALSE;
FX_BOOL bAll = FALSE;
- FX_INT32 i = 1;
+ int32_t i = 1;
for (; i < iLen; ++i) {
FX_WCHAR ch = wsCondition[i];
if (ch == ' ') {
@@ -642,7 +642,7 @@ void CXFA_ResolveProcessor::XFA_ResolveNode_ConditionArray(FX_INT32 iCurIndex, C
}
CFX_WideString wsIndex;
wsIndex = wsCondition.Mid(i, iLen - 1 - i);
- FX_INT32 iIndex = wsIndex.GetInteger();
+ int32_t iIndex = wsIndex.GetInteger();
if (bRelative) {
iIndex += iCurIndex;
}
@@ -658,7 +658,7 @@ void CXFA_ResolveProcessor::XFA_ResolveNode_ConditionArray(FX_INT32 iCurIndex, C
findNodes.Add(ret);
}
}
-void CXFA_ResolveProcessor::XFA_ResolveNode_DoPredicateFilter(FX_INT32 iCurIndex, CFX_WideString wsCondition, FX_INT32 iFoundCount, CXFA_ResolveNodesData &rnd)
+void CXFA_ResolveProcessor::XFA_ResolveNode_DoPredicateFilter(int32_t iCurIndex, CFX_WideString wsCondition, int32_t iFoundCount, CXFA_ResolveNodesData &rnd)
{
CXFA_NodeArray &findNodes = (CXFA_NodeArray&)rnd.m_Nodes;
FXSYS_assert(iFoundCount == findNodes.GetSize());
@@ -674,7 +674,7 @@ void CXFA_ResolveProcessor::XFA_ResolveNode_DoPredicateFilter(FX_INT32 iCurIndex
}
pContext = rnd.m_pSC;
wsExpression = wsCondition.Mid(2, wsCondition.GetLength() - 3);
- for(FX_INT32 i = iFoundCount - 1; i >= 0; i--) {
+ for(int32_t i = iFoundCount - 1; i >= 0; i--) {
CXFA_Object* node = findNodes[i];
FX_BOOL bRet = FALSE;
FXJSE_HVALUE pRetValue = FXJSE_Value_Create(rnd.m_pSC->GetRuntime());
@@ -689,9 +689,9 @@ void CXFA_ResolveProcessor::XFA_ResolveNode_DoPredicateFilter(FX_INT32 iCurIndex
void CXFA_ResolveProcessor::XFA_ResolveNode_FilterCondition(CXFA_ResolveNodesData &rnd, CFX_WideString wsCondition)
{
CXFA_NodeArray &findNodes = (CXFA_NodeArray&)rnd.m_Nodes;
- FX_INT32 iCurrIndex = 0;
+ int32_t iCurrIndex = 0;
const CXFA_NodeArray &array = rnd.m_pSC->GetUpObjectArray();
- FX_INT32 iSize = array.GetSize();
+ int32_t iSize = array.GetSize();
if (iSize) {
CXFA_Node* curNode = array[iSize - 1];
FX_BOOL bIsProperty = m_pNodeHelper->XFA_NodeIsProperty(curNode);
@@ -701,10 +701,10 @@ void CXFA_ResolveProcessor::XFA_ResolveNode_FilterCondition(CXFA_ResolveNodesDat
iCurrIndex = m_pNodeHelper->XFA_GetIndex(curNode, XFA_LOGIC_Transparent, bIsProperty, FALSE);
}
}
- FX_INT32 iFoundCount = findNodes.GetSize();
+ int32_t iFoundCount = findNodes.GetSize();
wsCondition.TrimLeft();
wsCondition.TrimRight();
- FX_INT32 iLen = wsCondition.GetLength();
+ int32_t iLen = wsCondition.GetLength();
if (!iLen) {
if (rnd.m_dwStyles & XFA_RESOLVENODE_ALL) {
return;
@@ -755,7 +755,7 @@ void CXFA_ResolveProcessor::XFA_ResolveNodes_SetStylesForChild(FX_DWORD dwParent
dwSubStyles |= XFA_RESOLVENODE_ALL;
rnd.m_dwStyles = dwSubStyles;
}
-FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNode_SetResultCreateNode(XFA_RESOLVENODE_RS& resolveNodeRS, CFX_WideString &wsLastCondition)
+int32_t CXFA_ResolveProcessor::XFA_ResolveNode_SetResultCreateNode(XFA_RESOLVENODE_RS& resolveNodeRS, CFX_WideString &wsLastCondition)
{
if(m_pNodeHelper->m_pCreateParent) {
resolveNodeRS.nodes.Add(m_pNodeHelper->m_pCreateParent);
@@ -770,7 +770,7 @@ FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNode_SetResultCreateNode(XFA_RESOLVEN
}
return resolveNodeRS.nodes.GetSize();
}
-void CXFA_ResolveProcessor::XFA_ResolveNode_SetIndexDataBind(CFX_WideString &wsNextCondition, FX_INT32 &iIndex, FX_INT32 iCount)
+void CXFA_ResolveProcessor::XFA_ResolveNode_SetIndexDataBind(CFX_WideString &wsNextCondition, int32_t &iIndex, int32_t iCount)
{
if(m_pNodeHelper->XFA_CreateNode_ForCondition(wsNextCondition)) {
if(m_pNodeHelper->m_eLastCreateType == XFA_ELEMENT_DataGroup) {
diff --git a/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.h b/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.h
index 3555b0a470..39153ecfcc 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.h
+++ b/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.h
@@ -31,9 +31,9 @@ public:
CXFA_ScriptContext* m_pSC;
CXFA_Object* m_CurNode;
CFX_WideString m_wsName;
- FX_UINT32 m_uHashName;
+ uint32_t m_uHashName;
CFX_WideString m_wsCondition;
- FX_INT32 m_nLevel;
+ int32_t m_nLevel;
CXFA_ObjArray m_Nodes;
FX_DWORD m_dwStyles;
XFA_LPCSCRIPTATTRIBUTEINFO m_pScriptAttribute;
@@ -44,22 +44,22 @@ class CXFA_ResolveProcessor
public:
CXFA_ResolveProcessor(void);
~CXFA_ResolveProcessor(void);
- FX_INT32 XFA_ResolveNodes(CXFA_ResolveNodesData &rnd);
- FX_INT32 XFA_ResolveNodes_AnyChild(CXFA_ResolveNodesData &rnd);
- FX_INT32 XFA_ResolveNodes_Dollar(CXFA_ResolveNodesData &rnd);
- FX_INT32 XFA_ResolveNodes_Excalmatory(CXFA_ResolveNodesData &rnd);
- FX_INT32 XFA_ResolveNodes_NumberSign(CXFA_ResolveNodesData &rnd);
- FX_INT32 XFA_ResolveNodes_Asterisk(CXFA_ResolveNodesData &rnd);
- FX_INT32 XFA_ResolveNodes_Normal(CXFA_ResolveNodesData &rnd);
- FX_INT32 XFA_ResolveNodes_ForAttributeRs(CXFA_Object* curNode, CXFA_ResolveNodesData &rnd, FX_WSTR strAttr);
- void XFA_ResolveNode_ConditionArray(FX_INT32 iCurIndex, CFX_WideString wsCondition, FX_INT32 iFoundCount, CXFA_ResolveNodesData &rnd);
- void XFA_ResolveNode_DoPredicateFilter(FX_INT32 iCurIndex, CFX_WideString wsCondition, FX_INT32 iFoundCount, CXFA_ResolveNodesData &rnd);
- FX_INT32 XFA_ResolveNodes_GetFilter(FX_WSTR wsExpression, FX_INT32 nStart, CXFA_ResolveNodesData &rnd);
+ int32_t XFA_ResolveNodes(CXFA_ResolveNodesData &rnd);
+ int32_t XFA_ResolveNodes_AnyChild(CXFA_ResolveNodesData &rnd);
+ int32_t XFA_ResolveNodes_Dollar(CXFA_ResolveNodesData &rnd);
+ int32_t XFA_ResolveNodes_Excalmatory(CXFA_ResolveNodesData &rnd);
+ int32_t XFA_ResolveNodes_NumberSign(CXFA_ResolveNodesData &rnd);
+ int32_t XFA_ResolveNodes_Asterisk(CXFA_ResolveNodesData &rnd);
+ int32_t XFA_ResolveNodes_Normal(CXFA_ResolveNodesData &rnd);
+ int32_t XFA_ResolveNodes_ForAttributeRs(CXFA_Object* curNode, CXFA_ResolveNodesData &rnd, FX_WSTR strAttr);
+ void XFA_ResolveNode_ConditionArray(int32_t iCurIndex, CFX_WideString wsCondition, int32_t iFoundCount, CXFA_ResolveNodesData &rnd);
+ void XFA_ResolveNode_DoPredicateFilter(int32_t iCurIndex, CFX_WideString wsCondition, int32_t iFoundCount, CXFA_ResolveNodesData &rnd);
+ int32_t XFA_ResolveNodes_GetFilter(FX_WSTR wsExpression, int32_t nStart, CXFA_ResolveNodesData &rnd);
void XFA_ResolveNode_FilterCondition(CXFA_ResolveNodesData &rnd, CFX_WideString wsCondition);
- FX_INT32 XFA_ResolveNodes_PopStack(CFX_Int32Array &stack);
+ int32_t XFA_ResolveNodes_PopStack(CFX_Int32Array &stack);
void XFA_ResolveNodes_SetStylesForChild(FX_DWORD dwParentStyles, CXFA_ResolveNodesData &rnd);
- FX_INT32 XFA_ResolveNode_SetResultCreateNode(XFA_RESOLVENODE_RS& resolveNodeRS, CFX_WideString &wsLastCondition);
- void XFA_ResolveNode_SetIndexDataBind(CFX_WideString &wsNextCondition, FX_INT32 &iIndex, FX_INT32 iCount);
+ int32_t XFA_ResolveNode_SetResultCreateNode(XFA_RESOLVENODE_RS& resolveNodeRS, CFX_WideString &wsLastCondition);
+ void XFA_ResolveNode_SetIndexDataBind(CFX_WideString &wsNextCondition, int32_t &iIndex, int32_t iCount);
CXFA_NodeHelper* GetNodeHelper()
{
return m_pNodeHelper;
@@ -67,6 +67,6 @@ public:
private:
CXFA_NodeHelper* m_pNodeHelper;
public:
- FX_INT32 m_iCurStart;
+ int32_t m_iCurStart;
};
#endif
diff --git a/xfa/src/fxfa/src/parser/xfa_script_signaturepseudomodel.cpp b/xfa/src/fxfa/src/parser/xfa_script_signaturepseudomodel.cpp
index 6e94791f40..3173d14ed4 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_signaturepseudomodel.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_signaturepseudomodel.cpp
@@ -27,7 +27,7 @@ CScript_SignaturePseudoModel::~CScript_SignaturePseudoModel()
}
void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Verify(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 4) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"verify");
return;
@@ -41,7 +41,7 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Verify(CFXJSE_Arg
if (iLength >= 1) {
pNode = (CXFA_Node*)pArguments->GetObject(0);
}
- FX_INT32 bVerify = pNotify->GetDocProvider()->Verify(hDoc, pNode);
+ int32_t bVerify = pNotify->GetDocProvider()->Verify(hDoc, pNode);
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
if (hValue) {
FXJSE_Value_SetInteger(hValue, bVerify);
@@ -49,7 +49,7 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Verify(CFXJSE_Arg
}
void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Sign(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 3 || iLength > 7) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"sign");
return;
@@ -81,7 +81,7 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Sign(CFXJSE_Argum
}
void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Enumerate(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength != 0) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"enumerate");
return;
@@ -96,7 +96,7 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Enumerate(CFXJSE_
}
void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Clear(CFXJSE_Arguments* pArguments)
{
- FX_INT32 iLength = pArguments->GetLength();
+ int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 2) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"clear");
return;
diff --git a/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp b/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp
index e4f7545f98..a15690cdcd 100644
--- a/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_utils_imp.cpp
@@ -146,7 +146,7 @@ CXFA_LocaleValue XFA_GetLocaleValue(CXFA_WidgetData* pWidgetData)
if (!pValueChild) {
return CXFA_LocaleValue();
}
- FX_INT32 iVTType = XFA_VT_NULL;
+ int32_t iVTType = XFA_VT_NULL;
XFA_ELEMENT eType = pValueChild->GetClassID();
switch (eType) {
case XFA_ELEMENT_Decimal:
@@ -189,7 +189,7 @@ void XFA_GetPlainTextFromRichText(IFDE_XMLNode *pXMLNode, CFX_WideString &wsPlai
IFDE_XMLElement *pXMLElement = (IFDE_XMLElement*)pXMLNode;
CFX_WideString wsTag;
pXMLElement->GetLocalTagName(wsTag);
- FX_UINT32 uTag = FX_HashCode_String_GetW(wsTag, wsTag.GetLength(), TRUE);
+ uint32_t uTag = FX_HashCode_String_GetW(wsTag, wsTag.GetLength(), TRUE);
if (uTag == 0x0001f714) {
wsPlainText += L"\n";
} else if (uTag == 0x00000070) {
@@ -301,20 +301,20 @@ FX_DOUBLE XFA_WideStringToDouble(const CFX_WideString &wsStringVal)
wsValue.TrimLeft();
wsValue.TrimRight();
FX_BOOL bValid = TRUE;
- FX_INT64 nIntegral = 0;
+ int64_t nIntegral = 0;
FX_DWORD dwFractional = 0;
- FX_INT32 nExponent = 0;
- FX_INT32 cc = 0;
+ int32_t nExponent = 0;
+ int32_t cc = 0;
FX_BOOL bNegative = FALSE, bExpSign = FALSE;
FX_LPCWSTR str = (FX_LPCWSTR)wsValue;
- FX_INT32 len = wsValue.GetLength();
+ int32_t len = wsValue.GetLength();
if (str[0] == '+') {
cc++;
} else if (str[0] == '-') {
bNegative = TRUE;
cc++;
}
- FX_INT32 nIntegralLen = 0;
+ int32_t nIntegralLen = 0;
while (cc < len) {
if (str[cc] == '.' || str[cc] == 'E' || str[cc] == 'e' || nIntegralLen > 17) {
break;
@@ -327,7 +327,7 @@ FX_DOUBLE XFA_WideStringToDouble(const CFX_WideString &wsStringVal)
nIntegralLen++;
}
nIntegral = bNegative ? -nIntegral : nIntegral;
- FX_INT32 scale = 0;
+ int32_t scale = 0;
FX_DOUBLE fraction = 0.0;
if (cc < len && str[cc] == '.') {
cc ++;
@@ -382,7 +382,7 @@ FX_DOUBLE XFA_ByteStringToDouble(FX_BSTR szStringVal)
return XFA_WideStringToDouble(wsValue);
}
-FX_INT32 XFA_MapRotation(FX_INT32 nRotation) {
+int32_t XFA_MapRotation(int32_t nRotation) {
nRotation = nRotation % 360;
nRotation = nRotation < 0 ? nRotation + 360 : nRotation;
return nRotation;