Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: fpdfsdk/src/fsdk_baseform.cpp

Issue 1720043003: Remove foo != NULL outside of xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fsdk_annothandler.cpp ('k') | fpdfsdk/src/fsdk_mgr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fsdk_baseform.cpp
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index f05545a6726fd5ce2686749c569c8214582444e7..9da74036e11d8121dbc73f67d95951414f068155 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -260,15 +260,11 @@ void CPDFSDK_Widget::Synchronize(FX_BOOL bSynchronizeElse) {
if (IXFA_Widget* hWidget = this->GetMixXFAWidget()) {
if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler()) {
CPDF_FormField* pFormField = GetFormField();
- ASSERT(pFormField != NULL);
-
if (CXFA_WidgetAcc* pWidgetAcc = pXFAWidgetHandler->GetDataAcc(hWidget)) {
switch (GetFieldType()) {
case FIELDTYPE_CHECKBOX:
case FIELDTYPE_RADIOBUTTON: {
CPDF_FormControl* pFormCtrl = GetFormControl();
- ASSERT(pFormCtrl != NULL);
-
XFA_CHECKSTATE eCheckState =
pFormCtrl->IsChecked() ? XFA_CHECKSTATE_On : XFA_CHECKSTATE_Off;
pWidgetAcc->SetCheckState(eCheckState);
@@ -340,12 +336,10 @@ void CPDFSDK_Widget::SynchronizeXFAValue(IXFA_DocView* pXFADocView,
IXFA_Widget* hWidget,
CPDF_FormField* pFormField,
CPDF_FormControl* pFormControl) {
- ASSERT(pXFADocView != NULL);
- ASSERT(hWidget != NULL);
+ ASSERT(hWidget);
if (IXFA_WidgetHandler* pXFAWidgetHandler = pXFADocView->GetWidgetHandler()) {
- ASSERT(pFormField != NULL);
- ASSERT(pFormControl != NULL);
+ ASSERT(pFormControl);
switch (pFormField->GetFieldType()) {
case FIELDTYPE_CHECKBOX: {
@@ -414,12 +408,9 @@ void CPDFSDK_Widget::SynchronizeXFAItems(IXFA_DocView* pXFADocView,
IXFA_Widget* hWidget,
CPDF_FormField* pFormField,
CPDF_FormControl* pFormControl) {
- ASSERT(pXFADocView != NULL);
- ASSERT(hWidget != NULL);
+ ASSERT(hWidget);
if (IXFA_WidgetHandler* pXFAWidgetHandler = pXFADocView->GetWidgetHandler()) {
- ASSERT(pFormField != NULL);
-
switch (pFormField->GetFieldType()) {
case FIELDTYPE_LISTBOX: {
pFormField->ClearSelection(FALSE);
@@ -2500,17 +2491,14 @@ FX_BOOL CPDFSDK_InterForm::ExportFieldsToFDFTextBuf(
#ifdef PDF_ENABLE_XFA
void CPDFSDK_InterForm::SynchronizeField(CPDF_FormField* pFormField,
FX_BOOL bSynchronizeElse) {
- ASSERT(pFormField != NULL);
-
int x = 0;
if (m_FieldSynchronizeMap.Lookup(pFormField, x))
return;
for (int i = 0, sz = pFormField->CountControls(); i < sz; i++) {
CPDF_FormControl* pFormCtrl = pFormField->GetControl(i);
- ASSERT(pFormCtrl != NULL);
-
- ASSERT(m_pInterForm != NULL);
+ ASSERT(pFormCtrl);
+ ASSERT(m_pInterForm);
if (CPDFSDK_Widget* pWidget = GetWidget(pFormCtrl)) {
pWidget->Synchronize(bSynchronizeElse);
}
« no previous file with comments | « fpdfsdk/src/fsdk_annothandler.cpp ('k') | fpdfsdk/src/fsdk_mgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698