summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-27 12:26:00 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-27 12:26:01 -0700
commit43854a5073602a4613131aa6dbac5f7b9a095bcd (patch)
tree653ebf0cd690e13d1ca9e315ffeb34f8ac85cfbb /xfa/fxfa/parser
parentb2f6f9158f54cee1825830c7ed57fe9d89cff26e (diff)
downloadpdfium-43854a5073602a4613131aa6dbac5f7b9a095bcd.tar.xz
Standardize on ASSERT.
There are currently three ways to assert in the code (ASSERT, FXSYS_assert and assert). This CL standardizes on ASSERT. The benefit of ASSERT is that it can be overridden if the platform requies and we can pickup the Chromium version if it has already been defined in the build. This does change behaviour. Currently FXSYS_assert is always defined but ASSERT is only defined in debug builds. So, the FXSYS_assert's would fire in Release builds. That will no longer happen. BUG=pdfium:219 Review-Url: https://codereview.chromium.org/1914303003
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp4
-rw-r--r--xfa/fxfa/parser/xfa_document_datadescription_imp.cpp6
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp42
-rw-r--r--xfa/fxfa/parser/xfa_document_serialize.cpp12
-rw-r--r--xfa/fxfa/parser/xfa_layout_itemlayout.cpp4
-rw-r--r--xfa/fxfa/parser/xfa_localemgr.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_localevalue.cpp10
-rw-r--r--xfa/fxfa/parser/xfa_object_imp.cpp50
-rw-r--r--xfa/fxfa/parser/xfa_parser_imp.cpp8
-rw-r--r--xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_script_resolveprocessor.cpp4
12 files changed, 73 insertions, 73 deletions
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index 0c3d065a39..7ca020fe6f 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -1565,7 +1565,7 @@ FX_BOOL CXFA_WidgetData::GetNormalizeDataValue(
if (wsPicture.IsEmpty())
return TRUE;
- FXSYS_assert(GetNode());
+ ASSERT(GetNode());
CXFA_LocaleMgr* pLocalMgr = GetNode()->GetDocument()->GetLocalMgr();
IFX_Locale* pLocale = GetLocal();
CXFA_LocaleValue widgetValue = XFA_GetLocaleValue(this);
@@ -1590,7 +1590,7 @@ FX_BOOL CXFA_WidgetData::GetFormatDataValue(const CFX_WideString& wsValue,
return TRUE;
if (IFX_Locale* pLocale = GetLocal()) {
- FXSYS_assert(GetNode());
+ ASSERT(GetNode());
CXFA_Node* pNodeValue = GetNode()->GetChild(0, XFA_ELEMENT_Value);
if (!pNodeValue)
return FALSE;
diff --git a/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp b/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp
index ed392ff1b6..c988902b63 100644
--- a/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp
@@ -29,7 +29,7 @@ class CXFA_TraverseStrategy_DDGroup {
};
void XFA_DataDescription_UpdateDataRelation(CXFA_Node* pDataNode,
CXFA_Node* pDataDescriptionNode) {
- FXSYS_assert(pDataDescriptionNode);
+ ASSERT(pDataDescriptionNode);
for (CXFA_Node* pDataChild = pDataNode->GetNodeItem(XFA_NODEITEM_FirstChild);
pDataChild;
pDataChild = pDataChild->GetNodeItem(XFA_NODEITEM_NextSibling)) {
@@ -77,7 +77,7 @@ CXFA_Node* XFA_DataDescription_MaybeCreateDataNode(
if (!pParentDDNode) {
CXFA_Node* pDataNode =
pDocument->CreateNode(XFA_XDPPACKET_Datasets, eNodeType);
- FXSYS_assert(pDataNode);
+ ASSERT(pDataNode);
pDataNode->SetCData(XFA_ATTRIBUTE_Name, wsName);
pDataNode->CreateXMLMappingNode();
pDataParent->InsertChild(pDataNode);
@@ -107,7 +107,7 @@ CXFA_Node* XFA_DataDescription_MaybeCreateDataNode(
}
CXFA_Node* pDataNode =
pDocument->CreateNode(XFA_XDPPACKET_Datasets, eNodeType);
- FXSYS_assert(pDataNode);
+ ASSERT(pDataNode);
pDataNode->SetCData(XFA_ATTRIBUTE_Name, wsName);
pDataNode->CreateXMLMappingNode();
if (eNodeType == XFA_ELEMENT_DataValue &&
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index 59e663eec1..ccb69df1a1 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -52,7 +52,7 @@ static CXFA_Node* XFA_DataMerge_FormValueNode_CreateChild(
static void XFA_DataMerge_FormValueNode_MatchNoneCreateChild(
CXFA_Node* pFormNode) {
CXFA_WidgetData* pWidgetData = pFormNode->GetWidgetData();
- FXSYS_assert(pWidgetData);
+ ASSERT(pWidgetData);
pWidgetData->GetUIType();
}
static FX_BOOL XFA_DataMerge_FormValueNode_SetChildContent(
@@ -62,7 +62,7 @@ static FX_BOOL XFA_DataMerge_FormValueNode_SetChildContent(
if (!pValueNode) {
return FALSE;
}
- FXSYS_assert(pValueNode->GetPacketID() == XFA_XDPPACKET_Form);
+ ASSERT(pValueNode->GetPacketID() == XFA_XDPPACKET_Form);
CXFA_Node* pChildNode =
XFA_DataMerge_FormValueNode_CreateChild(pValueNode, iType);
if (!pChildNode) {
@@ -96,7 +96,7 @@ static FX_BOOL XFA_DataMerge_FormValueNode_SetChildContent(
pChildNode->SetCData(XFA_ATTRIBUTE_Value, wsContent);
} break;
default:
- FXSYS_assert(FALSE);
+ ASSERT(FALSE);
break;
}
return TRUE;
@@ -111,7 +111,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
return;
}
CXFA_WidgetData* pWidgetData = pFormNode->GetWidgetData();
- FXSYS_assert(pWidgetData);
+ ASSERT(pWidgetData);
FX_BOOL bNotify = FALSE;
XFA_ELEMENT eUIType = pWidgetData->GetUIType();
CXFA_Value defValue(pFormNode->GetProperty(0, XFA_ELEMENT_Value));
@@ -130,7 +130,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
}
CFDE_XMLElement* pXMLDataElement =
static_cast<CFDE_XMLElement*>(pDataNode->GetXMLMappingNode());
- FXSYS_assert(pXMLDataElement);
+ ASSERT(pXMLDataElement);
pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue);
pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
pDataNode->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType);
@@ -155,7 +155,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
}
} else {
CFDE_XMLNode* pXMLNode = pDataNode->GetXMLMappingNode();
- FXSYS_assert(pXMLNode->GetType() == FDE_XMLNODE_Element);
+ ASSERT(pXMLNode->GetType() == FDE_XMLNODE_Element);
static_cast<CFDE_XMLElement*>(pXMLNode)
->SetString(FX_WSTRC(L"xfa:dataNode"), FX_WSTRC(L"dataGroup"));
}
@@ -268,7 +268,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
if (image) {
CFDE_XMLElement* pXMLDataElement =
static_cast<CFDE_XMLElement*>(pDataNode->GetXMLMappingNode());
- FXSYS_assert(pXMLDataElement);
+ ASSERT(pXMLDataElement);
CFX_WideString wsContentType;
CFX_WideString wsHref;
pXMLDataElement->GetString(L"xfa:contentType", wsContentType);
@@ -296,7 +296,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode,
wsNormailizeValue += wsItem;
}
CXFA_ExData exData = defValue.GetExData();
- FXSYS_assert(exData);
+ ASSERT(exData);
exData.SetContentType((iCounts == 1) ? FX_WSTRC(L"text/plain")
: FX_WSTRC(L"text/xml"));
}
@@ -591,7 +591,7 @@ static CXFA_Node* XFA_NodeMerge_CloneOrMergeInstanceManager(
}
CXFA_Node* pNewNode = pDocument->GetParser()->GetFactory()->CreateNode(
XFA_XDPPACKET_Form, XFA_ELEMENT_InstanceManager);
- FXSYS_assert(pNewNode);
+ ASSERT(pNewNode);
wsInstMgrNodeName =
FX_WSTRC(L"_") + pTemplateNode->GetCData(XFA_ATTRIBUTE_Name);
pNewNode->SetCData(XFA_ATTRIBUTE_Name, wsInstMgrNodeName);
@@ -831,7 +831,7 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet(
pFirstInstance = pSubformNode;
}
XFA_DataMerge_CreateDataBinding(pSubformNode, pDataNode);
- FXSYS_assert(pSubformNode);
+ ASSERT(pSubformNode);
subformMapArray.SetAt(pSubformNode, pDataNode);
subformArray.Add(pSubformNode);
}
@@ -872,7 +872,7 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet(
eRelation == XFA_ATTRIBUTEENUM_Unordered) {
CXFA_Node* pSubformSetNode = XFA_NodeMerge_CloneOrMergeContainer(
pDocument, pFormParentNode, pTemplateNode, FALSE, pSearchArray);
- FXSYS_assert(pSubformSetNode);
+ ASSERT(pSubformSetNode);
if (!pFirstInstance) {
pFirstInstance = pSubformSetNode;
}
@@ -908,7 +908,7 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet(
}
switch (eRelation) {
case XFA_ATTRIBUTEENUM_Choice: {
- FXSYS_assert(rgItemMatchList.GetSize());
+ ASSERT(rgItemMatchList.GetSize());
XFA_DataMerge_SortRecurseRecord(rgItemMatchList, pDataScope, TRUE);
pDocument->DataMerge_CopyContainer(
rgItemMatchList[0].pTemplateChild, pSubformSetNode, pDataScope);
@@ -935,7 +935,7 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet(
} else {
CXFA_Node* pSubformSetNode = XFA_NodeMerge_CloneOrMergeContainer(
pDocument, pFormParentNode, pTemplateNode, FALSE, pSearchArray);
- FXSYS_assert(pSubformSetNode);
+ ASSERT(pSubformSetNode);
if (!pFirstInstance) {
pFirstInstance = pSubformSetNode;
}
@@ -977,7 +977,7 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet(
}
CXFA_Node* pSubformNode = XFA_NodeMerge_CloneOrMergeContainer(
pDocument, pFormParentNode, pTemplateNode, FALSE, pSearchArray);
- FXSYS_assert(pSubformNode);
+ ASSERT(pSubformNode);
if (!pFirstInstance) {
pFirstInstance = pSubformNode;
}
@@ -1001,7 +1001,7 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet(
for (; iCurRepeatIndex < iMinimalLimit; iCurRepeatIndex++) {
CXFA_Node* pSubformSetNode = XFA_NodeMerge_CloneOrMergeContainer(
pDocument, pFormParentNode, pTemplateNode, FALSE, pSearchArray);
- FXSYS_assert(pSubformSetNode);
+ ASSERT(pSubformSetNode);
if (!pFirstInstance) {
pFirstInstance = pSubformSetNode;
}
@@ -1034,7 +1034,7 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_Field(CXFA_Document* pDocument,
FX_BOOL bUpLevel = TRUE) {
CXFA_Node* pFieldNode = XFA_NodeMerge_CloneOrMergeContainer(
pDocument, pFormNode, pTemplateNode, FALSE);
- FXSYS_assert(pFieldNode);
+ ASSERT(pFieldNode);
for (CXFA_Node* pTemplateChildNode =
pTemplateNode->GetNodeItem(XFA_NODEITEM_FirstChild);
pTemplateChildNode; pTemplateChildNode = pTemplateChildNode->GetNodeItem(
@@ -1089,7 +1089,7 @@ CXFA_Node* CXFA_Document::DataMerge_CopyContainer(CXFA_Node* pTemplateNode,
case XFA_ELEMENT_Variables:
break;
default:
- FXSYS_assert(FALSE);
+ ASSERT(FALSE);
break;
}
return NULL;
@@ -1142,7 +1142,7 @@ static void XFA_DataMerge_UpdateBindingRelations(CXFA_Document* pDocument,
CXFA_Node* pDataParent =
pDataNode->GetNodeItem(XFA_NODEITEM_Parent);
if (pDataParent != pDataScope) {
- FXSYS_assert(pDataParent);
+ ASSERT(pDataParent);
pDataParent->RemoveChild(pDataNode);
pDataScope->InsertChild(pDataNode);
}
@@ -1334,7 +1334,7 @@ void CXFA_Document::DoDataMerge() {
if (!pFormRoot) {
bEmptyForm = TRUE;
pFormRoot = CreateNode(XFA_XDPPACKET_Form, XFA_ELEMENT_Form);
- FXSYS_assert(pFormRoot);
+ ASSERT(pFormRoot);
pFormRoot->SetCData(XFA_ATTRIBUTE_Name, FX_WSTRC(L"form"));
m_pRootNode->InsertChild(pFormRoot, NULL);
} else {
@@ -1347,7 +1347,7 @@ void CXFA_Document::DoDataMerge() {
}
CXFA_Node* pSubformSetNode = XFA_NodeMerge_CloneOrMergeContainer(
this, pFormRoot, pTemplateChosen, FALSE);
- FXSYS_assert(pSubformSetNode);
+ ASSERT(pSubformSetNode);
if (!pDataTopLevel) {
CFX_WideStringC wsFormName = pSubformSetNode->GetCData(XFA_ATTRIBUTE_Name);
CFX_WideString wsDataTopLevelName =
@@ -1361,7 +1361,7 @@ void CXFA_Document::DoDataMerge() {
CXFA_Node* pBeforeNode = pDataRoot->GetNodeItem(XFA_NODEITEM_FirstChild);
pDataRoot->InsertChild(pDataTopLevel, pBeforeNode);
}
- FXSYS_assert(pDataTopLevel);
+ ASSERT(pDataTopLevel);
XFA_DataMerge_CreateDataBinding(pSubformSetNode, pDataTopLevel);
for (CXFA_Node* pTemplateChild =
pTemplateChosen->GetNodeItem(XFA_NODEITEM_FirstChild);
diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp
index 09b51914ca..fce951420d 100644
--- a/xfa/fxfa/parser/xfa_document_serialize.cpp
+++ b/xfa/fxfa/parser/xfa_document_serialize.cpp
@@ -165,7 +165,7 @@ FX_BOOL XFA_DataExporter_ContentNodeNeedtoExport(CXFA_Node* pContentNode) {
if (!pContentNode->TryContent(wsContent, FALSE, FALSE)) {
return FALSE;
}
- FXSYS_assert(pContentNode->GetObjectType() == XFA_OBJECTTYPE_ContentNode);
+ ASSERT(pContentNode->GetObjectType() == XFA_OBJECTTYPE_ContentNode);
CXFA_Node* pParentNode = pContentNode->GetNodeItem(XFA_NODEITEM_Parent);
if (!pParentNode || pParentNode->GetClassID() != XFA_ELEMENT_Value) {
return TRUE;
@@ -282,10 +282,10 @@ static void XFA_DataExporter_RegenerateFormFile_Changed(
iEnd = wsRawValue.Find(L'\n', iStart);
}
CXFA_Node* pParentNode = pNode->GetNodeItem(XFA_NODEITEM_Parent);
- FXSYS_assert(pParentNode);
+ ASSERT(pParentNode);
CXFA_Node* pGrandparentNode =
pParentNode->GetNodeItem(XFA_NODEITEM_Parent);
- FXSYS_assert(pGrandparentNode);
+ ASSERT(pGrandparentNode);
CFX_WideString bodyTagName;
bodyTagName = pGrandparentNode->GetCData(XFA_ATTRIBUTE_Name);
if (bodyTagName.IsEmpty()) {
@@ -512,7 +512,7 @@ FX_BOOL CXFA_DataExporter::Export(IFX_Stream* pStream,
return FALSE;
}
CXFA_Node* pDataNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
- FXSYS_assert(pDataNode);
+ ASSERT(pDataNode);
XFA_DataExporter_DealWithDataGroupNode(pDataNode);
pXMLDoc->SaveXMLNode(pStream, pElement);
} break;
@@ -568,14 +568,14 @@ void XFA_DataExporter_DealWithDataGroupNode(CXFA_Node* pDataNode) {
if (pDataNode->GetClassID() == XFA_ELEMENT_DataGroup) {
if (iChildNum > 0) {
CFDE_XMLNode* pXMLNode = pDataNode->GetXMLMappingNode();
- FXSYS_assert(pXMLNode->GetType() == FDE_XMLNODE_Element);
+ ASSERT(pXMLNode->GetType() == FDE_XMLNODE_Element);
CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLNode);
if (pXMLElement->HasAttribute(L"xfa:dataNode")) {
pXMLElement->RemoveAttribute(L"xfa:dataNode");
}
} else {
CFDE_XMLNode* pXMLNode = pDataNode->GetXMLMappingNode();
- FXSYS_assert(pXMLNode->GetType() == FDE_XMLNODE_Element);
+ ASSERT(pXMLNode->GetType() == FDE_XMLNODE_Element);
static_cast<CFDE_XMLElement*>(pXMLNode)
->SetString(FX_WSTRC(L"xfa:dataNode"), FX_WSTRC(L"dataGroup"));
}
diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
index b5d3bff885..ef2df840c9 100644
--- a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
@@ -46,8 +46,8 @@ CXFA_ItemLayoutProcessor::CXFA_ItemLayoutProcessor(CXFA_Node* pNode,
m_bUseInheriated(FALSE),
m_ePreProcessRs(XFA_ItemLayoutProcessorResult_Done),
m_bHasAvailHeight(TRUE) {
- FXSYS_assert(m_pFormNode && (m_pFormNode->IsContainerNode() ||
- m_pFormNode->GetClassID() == XFA_ELEMENT_Form));
+ ASSERT(m_pFormNode && (m_pFormNode->IsContainerNode() ||
+ m_pFormNode->GetClassID() == XFA_ELEMENT_Form));
m_pOldLayoutItem =
(CXFA_ContentLayoutItem*)m_pFormNode->GetUserData(XFA_LAYOUTITEMKEY);
}
diff --git a/xfa/fxfa/parser/xfa_localemgr.cpp b/xfa/fxfa/parser/xfa_localemgr.cpp
index 90c9824b76..069279cdc5 100644
--- a/xfa/fxfa/parser/xfa_localemgr.cpp
+++ b/xfa/fxfa/parser/xfa_localemgr.cpp
@@ -1271,7 +1271,7 @@ static CXFA_TimeZoneProvider* g_pProvider = NULL;
// Static.
CXFA_TimeZoneProvider* CXFA_TimeZoneProvider::Create() {
- FXSYS_assert(!g_pProvider);
+ ASSERT(!g_pProvider);
g_pProvider = new CXFA_TimeZoneProvider();
return g_pProvider;
}
diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp
index 2c018ea72d..7530d80f5a 100644
--- a/xfa/fxfa/parser/xfa_localevalue.cpp
+++ b/xfa/fxfa/parser/xfa_localevalue.cpp
@@ -371,7 +371,7 @@ CFX_Unitime CXFA_LocaleValue::GetDate() const {
CFX_Unitime CXFA_LocaleValue::GetTime() const {
if (m_bValid && m_dwType == XFA_VT_TIME) {
CFX_Unitime dt(0);
- FXSYS_assert(m_pLocaleMgr);
+ ASSERT(m_pLocaleMgr);
FX_TimeFromCanonical(m_wsValue.AsStringC(), dt,
m_pLocaleMgr->GetDefLocale());
return dt;
@@ -383,7 +383,7 @@ CFX_Unitime CXFA_LocaleValue::GetDateTime() const {
int32_t index = m_wsValue.Find('T');
CFX_Unitime dt;
FX_DateFromCanonical(m_wsValue.Left(index), dt);
- FXSYS_assert(m_pLocaleMgr);
+ ASSERT(m_pLocaleMgr);
FX_TimeFromCanonical(
m_wsValue.Right(m_wsValue.GetLength() - index - 1).AsStringC(), dt,
m_pLocaleMgr->GetDefLocale());
@@ -890,8 +890,8 @@ 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);
+ ASSERT(wsFormat.IsEmpty());
+ ASSERT(nIntLen >= -1 && nDecLen >= -1);
int32_t nTotalLen = (nIntLen >= 0 ? nIntLen : 2) + (bSign ? 1 : 0) +
(nDecLen >= 0 ? nDecLen : 2) + (nDecLen == 0 ? 0 : 1);
FX_WCHAR* lpBuf = wsFormat.GetBuffer(nTotalLen);
@@ -963,7 +963,7 @@ FX_BOOL CXFA_LocaleValue::ValidateNumericTemp(CFX_WideString& wsNumeric,
return FALSE;
}
while (nf < nCountFmt && (cf = pFmt[nf]) != L'.') {
- FXSYS_assert(cf == L'z' || cf == L'*');
+ ASSERT(cf == L'z' || cf == L'*');
++nf;
}
CFX_WideString wsDecimalSymbol;
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp
index fd54b1509b..6b438387be 100644
--- a/xfa/fxfa/parser/xfa_object_imp.cpp
+++ b/xfa/fxfa/parser/xfa_object_imp.cpp
@@ -64,7 +64,7 @@ void CXFA_Object::Script_ObjectClass_ClassName(FXJSE_HVALUE hValue,
}
void CXFA_Object::ThrowScriptErrorMessage(int32_t iStringID, ...) {
IXFA_AppProvider* pAppProvider = m_pDocument->GetNotify()->GetAppProvider();
- FXSYS_assert(pAppProvider);
+ ASSERT(pAppProvider);
CFX_WideString wsFormat;
pAppProvider->LoadString(iStringID, wsFormat);
CFX_WideString wsMessage;
@@ -108,7 +108,7 @@ CXFA_Node::CXFA_Node(CXFA_Document* pDoc,
ASSERT(m_pDocument);
}
CXFA_Node::~CXFA_Node() {
- FXSYS_assert(m_pParent == NULL);
+ ASSERT(m_pParent == NULL);
RemoveMapModuleKey();
CXFA_Node *pNext, *pNode = m_pChild;
while (pNode) {
@@ -316,7 +316,7 @@ CXFA_Node* CXFA_Node::CreateSamePacketNode(XFA_ELEMENT eElement,
return pNode;
}
CXFA_Node* CXFA_Node::CloneTemplateToForm(FX_BOOL bRecursive) {
- FXSYS_assert(m_ePacket == XFA_XDPPACKET_Template);
+ ASSERT(m_ePacket == XFA_XDPPACKET_Template);
CXFA_Document* pFactory = m_pDocument->GetParser()->GetFactory();
CXFA_Node* pClone = pFactory->CreateNode(XFA_XDPPACKET_Form, m_eNodeClass);
if (!pClone) {
@@ -500,7 +500,7 @@ CXFA_WidgetData* CXFA_Node::GetContainerWidgetData() {
FX_BOOL CXFA_Node::GetLocaleName(CFX_WideString& wsLocaleName) {
CXFA_Node* pForm = GetDocument()->GetXFAObject(XFA_HASHCODE_Form)->AsNode();
CXFA_Node* pTopSubform = pForm->GetFirstChildByClass(XFA_ELEMENT_Subform);
- FXSYS_assert(pTopSubform);
+ ASSERT(pTopSubform);
CXFA_Node* pLocaleNode = this;
FX_BOOL bLocale = FALSE;
do {
@@ -623,7 +623,7 @@ CXFA_Node* CXFA_Node::GetDataDescriptionNode() {
return NULL;
}
void CXFA_Node::SetDataDescriptionNode(CXFA_Node* pDataDescriptionNode) {
- FXSYS_assert(m_ePacket == XFA_XDPPACKET_Datasets);
+ ASSERT(m_ePacket == XFA_XDPPACKET_Datasets);
m_pAuxNode = pDataDescriptionNode;
}
void CXFA_Node::Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments) {
@@ -748,7 +748,7 @@ void CXFA_Node::Script_TreeClass_Nodes(FXJSE_HVALUE hValue,
}
if (bSetting) {
IXFA_AppProvider* pAppProvider = m_pDocument->GetNotify()->GetAppProvider();
- FXSYS_assert(pAppProvider);
+ ASSERT(pAppProvider);
CFX_WideString wsMessage;
pAppProvider->LoadString(XFA_IDS_Unable_TO_SET, wsMessage);
FXJSE_ThrowMessage(
@@ -1928,7 +1928,7 @@ void CXFA_Node::Script_Draw_DefaultValue(FXJSE_HVALUE hValue,
if (bSetting) {
if (FXJSE_Value_IsUTF8String(hValue)) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
- FXSYS_assert(pWidgetData);
+ ASSERT(pWidgetData);
XFA_ELEMENT uiType = pWidgetData->GetUIType();
if (uiType == XFA_ELEMENT_Text) {
CFX_ByteString newValue;
@@ -3297,7 +3297,7 @@ int32_t CXFA_Node::InstanceManager_SetInstances(int32_t iDesired) {
continue;
}
if (pRemoveInstance->GetClassID() == XFA_ELEMENT_InstanceManager) {
- FXSYS_assert(FALSE);
+ ASSERT(FALSE);
break;
}
if (pRemoveInstance->GetNameHash() == dInstanceNameHash) {
@@ -3691,7 +3691,7 @@ void CXFA_Node::Script_Xfa_This(FXJSE_HVALUE hValue,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
CXFA_Object* pThis = m_pDocument->GetScriptContext()->GetThisObject();
- FXSYS_assert(pThis);
+ ASSERT(pThis);
FXJSE_Value_Set(hValue,
m_pDocument->GetScriptContext()->GetJSValueFromMap(pThis));
}
@@ -3981,14 +3981,14 @@ FX_BOOL CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr,
static_cast<CFDE_XMLText*>(m_pXMLNode)->SetText(wsValue);
break;
default:
- FXSYS_assert(0);
+ ASSERT(0);
}
return TRUE;
}
const XFA_ATTRIBUTEINFO* pInfo = XFA_GetAttributeByID(eAttr);
if (pInfo) {
- FXSYS_assert(m_pXMLNode->GetType() == FDE_XMLNODE_Element);
+ ASSERT(m_pXMLNode->GetType() == FDE_XMLNODE_Element);
CFX_WideString wsAttrName = pInfo->pName;
if (pInfo->eName == XFA_ATTRIBUTE_ContentType) {
wsAttrName = FX_WSTRC(L"xfa:") + wsAttrName;
@@ -4038,7 +4038,7 @@ FX_BOOL CXFA_Node::SetAttributeValue(const CFX_WideString& wsValue,
static_cast<CFDE_XMLText*>(m_pXMLNode)->SetText(wsXMLValue);
break;
default:
- FXSYS_assert(0);
+ ASSERT(0);
}
}
return TRUE;
@@ -4119,7 +4119,7 @@ FX_BOOL CXFA_Node::SetValue(XFA_ATTRIBUTE eAttr,
SetMapModuleValue(pKey, pValue);
OnChanged(eAttr, bNotify, FALSE);
if (IsNeedSavingXMLNode()) {
- FXSYS_assert(m_pXMLNode->GetType() == FDE_XMLNODE_Element);
+ ASSERT(m_pXMLNode->GetType() == FDE_XMLNODE_Element);
const XFA_ATTRIBUTEINFO* pInfo = XFA_GetAttributeByID(eAttr);
if (pInfo) {
switch (eType) {
@@ -4140,7 +4140,7 @@ FX_BOOL CXFA_Node::SetValue(XFA_ATTRIBUTE eAttr,
->SetInteger(pInfo->pName, (int32_t)(uintptr_t)pValue);
break;
default:
- FXSYS_assert(0);
+ ASSERT(0);
}
}
}
@@ -4189,7 +4189,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
if (XFA_FieldIsMultiListBox(this)) {
CXFA_Node* pValue = GetProperty(0, XFA_ELEMENT_Value);
CXFA_Node* pChildValue = pValue->GetNodeItem(XFA_NODEITEM_FirstChild);
- FXSYS_assert(pChildValue);
+ ASSERT(pChildValue);
pChildValue->SetCData(XFA_ATTRIBUTE_ContentType, FX_WSTRC(L"text/xml"));
pChildValue->SetScriptContent(wsContent, wsContent, bNotify,
bScriptModify, FALSE);
@@ -4268,7 +4268,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
} else {
CXFA_Node* pValue = GetProperty(0, XFA_ELEMENT_Value);
CXFA_Node* pChildValue = pValue->GetNodeItem(XFA_NODEITEM_FirstChild);
- FXSYS_assert(pChildValue);
+ ASSERT(pChildValue);
pChildValue->SetScriptContent(wsContent, wsContent, bNotify,
bScriptModify, FALSE);
}
@@ -4551,7 +4551,7 @@ int32_t CXFA_Node::CountChildren(XFA_ELEMENT eElement, FX_BOOL bOnlyChild) {
CXFA_Node* CXFA_Node::GetChild(int32_t index,
XFA_ELEMENT eElement,
FX_BOOL bOnlyChild) {
- FXSYS_assert(index > -1);
+ ASSERT(index > -1);
CXFA_Node* pNode = m_pChild;
int32_t iCount = 0;
for (; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
@@ -4576,7 +4576,7 @@ int32_t CXFA_Node::InsertChild(int32_t index, CXFA_Node* pNode) {
pNode->m_pParent = this;
FX_BOOL bWasPurgeNode = m_pDocument->RemovePurgeNode(pNode);
if (!bWasPurgeNode)
- FXSYS_assert(false);
+ ASSERT(false);
if (m_pChild == NULL || index == 0) {
if (index > 0) {
@@ -4611,7 +4611,7 @@ int32_t CXFA_Node::InsertChild(int32_t index, CXFA_Node* pNode) {
pNotify->OnChildAdded(this);
if (IsNeedSavingXMLNode() && pNode->m_pXMLNode) {
- FXSYS_assert(pNode->m_pXMLNode->GetNodeItem(CFDE_XMLNode::Parent) == NULL);
+ ASSERT(pNode->m_pXMLNode->GetNodeItem(CFDE_XMLNode::Parent) == NULL);
m_pXMLNode->InsertChildNode(pNode->m_pXMLNode, index);
pNode->ClearFlag(XFA_NODEFLAG_OwnXMLNode);
}
@@ -4620,12 +4620,12 @@ int32_t CXFA_Node::InsertChild(int32_t index, CXFA_Node* pNode) {
FX_BOOL CXFA_Node::InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode) {
if (!pNode || pNode->m_pParent ||
(pBeforeNode && pBeforeNode->m_pParent != this)) {
- FXSYS_assert(false);
+ ASSERT(false);
return FALSE;
}
FX_BOOL bWasPurgeNode = m_pDocument->RemovePurgeNode(pNode);
if (!bWasPurgeNode)
- FXSYS_assert(false);
+ ASSERT(false);
int32_t nIndex = -1;
pNode->m_pParent = this;
@@ -4657,7 +4657,7 @@ FX_BOOL CXFA_Node::InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode) {
pNotify->OnChildAdded(this);
if (IsNeedSavingXMLNode() && pNode->m_pXMLNode) {
- FXSYS_assert(pNode->m_pXMLNode->GetNodeItem(CFDE_XMLNode::Parent) == NULL);
+ ASSERT(pNode->m_pXMLNode->GetNodeItem(CFDE_XMLNode::Parent) == NULL);
m_pXMLNode->InsertChildNode(pNode->m_pXMLNode, nIndex);
pNode->ClearFlag(XFA_NODEFLAG_OwnXMLNode);
}
@@ -4677,7 +4677,7 @@ CXFA_Node* CXFA_Node::Deprecated_GetPrevSibling() {
}
FX_BOOL CXFA_Node::RemoveChild(CXFA_Node* pNode, bool bNotify) {
if (pNode == NULL || pNode->m_pParent != this) {
- FXSYS_assert(FALSE);
+ ASSERT(FALSE);
return FALSE;
}
if (m_pChild == pNode) {
@@ -4702,8 +4702,8 @@ FX_BOOL CXFA_Node::RemoveChild(CXFA_Node* pNode, bool bNotify) {
m_pDocument->AddPurgeNode(pNode);
if (IsNeedSavingXMLNode() && pNode->m_pXMLNode) {
if (pNode->IsAttributeInXML()) {
- FXSYS_assert(pNode->m_pXMLNode == m_pXMLNode &&
- m_pXMLNode->GetType() == FDE_XMLNODE_Element);
+ ASSERT(pNode->m_pXMLNode == m_pXMLNode &&
+ m_pXMLNode->GetType() == FDE_XMLNODE_Element);
if (pNode->m_pXMLNode->GetType() == FDE_XMLNODE_Element) {
CFDE_XMLElement* pXMLElement =
static_cast<CFDE_XMLElement*>(pNode->m_pXMLNode);
diff --git a/xfa/fxfa/parser/xfa_parser_imp.cpp b/xfa/fxfa/parser/xfa_parser_imp.cpp
index 4c53d3f512..7eef2bd403 100644
--- a/xfa/fxfa/parser/xfa_parser_imp.cpp
+++ b/xfa/fxfa/parser/xfa_parser_imp.cpp
@@ -668,7 +668,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Data(
if (pParentXMLNode) {
pParentXMLNode->RemoveChildNode(pXMLDocumentNode);
}
- FXSYS_assert(pXMLDocumentNode->GetType() == FDE_XMLNODE_Element);
+ ASSERT(pXMLDocumentNode->GetType() == FDE_XMLNODE_Element);
if (pXMLDocumentNode->GetType() == FDE_XMLNODE_Element) {
static_cast<CFDE_XMLElement*>(pXMLDocumentNode)
->RemoveAttribute(L"xmlns:xfa");
@@ -958,7 +958,7 @@ void XFA_ConvertXMLToPlainText(CFDE_XMLElement* pRootXMLNode,
}
} break;
default:
- FXSYS_assert(FALSE);
+ ASSERT(FALSE);
break;
}
}
@@ -1014,7 +1014,7 @@ void CXFA_SimpleParser::ParseContentNode(CXFA_Node* pXFANode,
if (pXFANode->GetObjectType() == XFA_OBJECTTYPE_ContentNode) {
CXFA_Node* pContentRawDataNode =
m_pFactory->CreateNode(ePacketID, element);
- FXSYS_assert(pContentRawDataNode);
+ ASSERT(pContentRawDataNode);
pContentRawDataNode->SetCData(XFA_ATTRIBUTE_Value, wsValue);
pXFANode->InsertChild(pContentRawDataNode);
} else {
@@ -1363,7 +1363,7 @@ int32_t CXFA_DocumentParser::StartParse(IFX_FileRead* pStream,
int32_t CXFA_DocumentParser::DoParse(IFX_Pause* pPause) {
int32_t nRetStatus = m_nodeParser.DoParse(pPause);
if (nRetStatus >= XFA_PARSESTATUS_Done) {
- FXSYS_assert(m_pDocument);
+ ASSERT(m_pDocument);
m_pDocument->SetRoot(m_nodeParser.GetRootNode());
}
return nRetStatus;
diff --git a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
index 6a8700c670..c771000ebd 100644
--- a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
@@ -405,7 +405,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_DocumentInBatch(
static int32_t XFA_FilterName(const CFX_WideStringC& wsExpression,
int32_t nStart,
CFX_WideString& wsFilter) {
- FXSYS_assert(nStart > -1);
+ ASSERT(nStart > -1);
int32_t iLength = wsExpression.GetLength();
if (nStart >= iLength) {
return iLength;
diff --git a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
index 1094beb31b..e46b7060a1 100644
--- a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
@@ -422,7 +422,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_Relayout(
CFXJSE_Arguments* pArguments) {
CXFA_Node* pRootNode = m_pDocument->GetRoot();
CXFA_Node* pFormRoot = pRootNode->GetFirstChildByClass(XFA_ELEMENT_Form);
- FXSYS_assert(pFormRoot);
+ ASSERT(pFormRoot);
CXFA_Node* pContentRootNode = pFormRoot->GetNodeItem(XFA_NODEITEM_FirstChild);
CXFA_LayoutProcessor* pLayoutProcessor = m_pDocument->GetLayoutProcessor();
if (pContentRootNode) {
diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
index fcd24bf949..6ea1a331c1 100644
--- a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
+++ b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
@@ -522,7 +522,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_GetFilter(
const CFX_WideStringC& wsExpression,
int32_t nStart,
CXFA_ResolveNodesData& rnd) {
- FXSYS_assert(nStart > -1);
+ ASSERT(nStart > -1);
int32_t iLength = wsExpression.GetLength();
if (nStart >= iLength) {
return 0;
@@ -691,7 +691,7 @@ void CXFA_ResolveProcessor::XFA_ResolveNode_DoPredicateFilter(
int32_t iFoundCount,
CXFA_ResolveNodesData& rnd) {
CXFA_NodeArray& findNodes = (CXFA_NodeArray&)rnd.m_Nodes;
- FXSYS_assert(iFoundCount == findNodes.GetSize());
+ ASSERT(iFoundCount == findNodes.GetSize());
CFX_WideString wsExpression;
XFA_SCRIPTLANGTYPE eLangType = XFA_SCRIPTLANGTYPE_Unkown;
if (wsCondition.Left(2) == FX_WSTRC(L".[") &&