summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller/FFL_ListBox.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_ListBox.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_ListBox.cpp')
-rw-r--r--fpdfsdk/src/formfiller/FFL_ListBox.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_ListBox.cpp b/fpdfsdk/src/formfiller/FFL_ListBox.cpp
index 53a7570716..d00bfb12ff 100644
--- a/fpdfsdk/src/formfiller/FFL_ListBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ListBox.cpp
@@ -25,7 +25,6 @@ CFFL_ListBox::~CFFL_ListBox() {
PWL_CREATEPARAM CFFL_ListBox::GetCreateParam() {
PWL_CREATEPARAM cp = CFFL_FormFiller::GetCreateParam();
- ASSERT(m_pWidget != NULL);
FX_DWORD dwFieldFlag = m_pWidget->GetFieldFlags();
if (dwFieldFlag & FIELDFLAG_MULTISELECT) {
@@ -52,7 +51,6 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp,
pWnd->AttachFFLData(this);
pWnd->Create(cp);
- ASSERT(m_pApp != NULL);
CFFL_IFormFiller* pIFormFiller = m_pApp->GetIFormFiller();
pWnd->SetFillerNotify(pIFormFiller);
@@ -115,7 +113,7 @@ FX_BOOL CFFL_ListBox::IsDataChanged(CPDFSDK_PageView* pPageView) {
}
void CFFL_ListBox::SaveData(CPDFSDK_PageView* pPageView) {
- ASSERT(m_pWidget != NULL);
+ ASSERT(m_pWidget);
if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE)) {
CFX_IntArray aOldSelect, aNewSelect;
@@ -161,7 +159,6 @@ void CFFL_ListBox::GetActionData(CPDFSDK_PageView* pPageView,
} else {
if (CPWL_ListBox* pListBox =
(CPWL_ListBox*)GetPDFWindow(pPageView, FALSE)) {
- ASSERT(m_pWidget != NULL);
int32_t nCurSel = pListBox->GetCurSel();
if (nCurSel >= 0)
fa.sValue = m_pWidget->GetOptionLabel(nCurSel);
@@ -173,7 +170,6 @@ void CFFL_ListBox::GetActionData(CPDFSDK_PageView* pPageView,
if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT) {
fa.sValue = L"";
} else {
- ASSERT(m_pWidget != NULL);
int32_t nCurSel = m_pWidget->GetSelectedIndex(0);
if (nCurSel >= 0)
fa.sValue = m_pWidget->GetOptionLabel(nCurSel);
@@ -189,7 +185,7 @@ void CFFL_ListBox::SetActionData(CPDFSDK_PageView* pPageView,
const PDFSDK_FieldAction& fa) {}
void CFFL_ListBox::SaveState(CPDFSDK_PageView* pPageView) {
- ASSERT(pPageView != NULL);
+ ASSERT(pPageView);
if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE)) {
for (int32_t i = 0, sz = pListBox->GetCount(); i < sz; i++) {