summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-14 18:27:25 -0800
committerLei Zhang <thestig@chromium.org>2015-12-14 18:27:25 -0800
commit96660d6f382204339d6b1aadc3913303d436e252 (patch)
treeb5f84756e1a89251831cebc05b9d4e1f6cb2027b /fpdfsdk/src/formfiller/FFL_ComboBox.cpp
parentd983b09c3ae29a97cba8e9ec9c6351545f6087ee (diff)
downloadpdfium-96660d6f382204339d6b1aadc3913303d436e252.tar.xz
Merge to XFA: Get rid of most instance of 'foo != NULL'
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512763013 . (cherry picked from commit e3c7c2b54348da4a6939f6672f6c6bff126815a7) Review URL: https://codereview.chromium.org/1529553003 .
Diffstat (limited to 'fpdfsdk/src/formfiller/FFL_ComboBox.cpp')
-rw-r--r--fpdfsdk/src/formfiller/FFL_ComboBox.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
index 84992ae5c5..8d801c8352 100644
--- a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
@@ -27,10 +27,7 @@ CFFL_ComboBox::~CFFL_ComboBox() {
PWL_CREATEPARAM CFFL_ComboBox::GetCreateParam() {
PWL_CREATEPARAM cp = CFFL_FormFiller::GetCreateParam();
- ASSERT(m_pWidget != NULL);
-
int nFlags = m_pWidget->GetFieldFlags();
-
if (nFlags & FIELDFLAG_EDIT) {
cp.dwFlags |= PCBS_ALLOWCUSTOMTEXT;
}
@@ -93,8 +90,6 @@ FX_BOOL CFFL_ComboBox::IsDataChanged(CPDFSDK_PageView* pPageView) {
}
void CFFL_ComboBox::SaveData(CPDFSDK_PageView* pPageView) {
- ASSERT(m_pWidget != NULL);
-
if (CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE)) {
CFX_WideString swText = pWnd->GetText();
int32_t nCurSel = pWnd->GetSelect();
@@ -165,7 +160,6 @@ void CFFL_ComboBox::GetActionData(CPDFSDK_PageView* pPageView,
break;
case CPDF_AAction::LoseFocus:
case CPDF_AAction::GetFocus:
- ASSERT(m_pWidget != NULL);
fa.sValue = m_pWidget->GetValue();
break;
default:
@@ -207,7 +201,7 @@ FX_BOOL CFFL_ComboBox::IsActionDataChanged(CPDF_AAction::AActionType type,
}
void CFFL_ComboBox::SaveState(CPDFSDK_PageView* pPageView) {
- ASSERT(pPageView != NULL);
+ ASSERT(pPageView);
if (CPWL_ComboBox* pComboBox =
static_cast<CPWL_ComboBox*>(GetPDFWindow(pPageView, FALSE))) {
@@ -221,7 +215,7 @@ void CFFL_ComboBox::SaveState(CPDFSDK_PageView* pPageView) {
}
void CFFL_ComboBox::RestoreState(CPDFSDK_PageView* pPageView) {
- ASSERT(pPageView != NULL);
+ ASSERT(pPageView);
if (CPWL_ComboBox* pComboBox =
static_cast<CPWL_ComboBox*>(GetPDFWindow(pPageView, TRUE))) {
@@ -268,9 +262,7 @@ FX_BOOL CFFL_ComboBox::IsFieldFull(CPDFSDK_PageView* pPageView) {
#endif // PDF_ENABLE_XFA
void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) {
- ASSERT(m_pApp != NULL);
-
- ASSERT(pWnd != NULL);
+ ASSERT(m_pApp);
if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) {
CPWL_Edit* pEdit = (CPWL_Edit*)pWnd;
@@ -290,11 +282,11 @@ void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) {
}
void CFFL_ComboBox::OnKillFocus(CPWL_Wnd* pWnd) {
- ASSERT(m_pApp != NULL);
+ ASSERT(m_pApp);
}
void CFFL_ComboBox::OnAddUndo(CPWL_Edit* pEdit) {
- ASSERT(pEdit != NULL);
+ ASSERT(pEdit);
}
CFX_WideString CFFL_ComboBox::GetSelectExportText() {