summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseform.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-14 13:54:22 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-14 13:54:22 -0700
commiteca866c64ec0319d4723798290a3155957fa733e (patch)
tree59c7bb72df8d4df62934ab4002108a57bf2df37e /fpdfsdk/src/fsdk_baseform.cpp
parentae2d47b22d213cb36a66326c3167cfbbae90b9d4 (diff)
downloadpdfium-eca866c64ec0319d4723798290a3155957fa733e.tar.xz
Next round of master changes to match XFA
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1401423004 .
Diffstat (limited to 'fpdfsdk/src/fsdk_baseform.cpp')
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index f6b6b14483..7d0346c797 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -38,7 +38,7 @@ CPDFSDK_Widget::~CPDFSDK_Widget() {}
FX_BOOL CPDFSDK_Widget::IsWidgetAppearanceValid(
CPDF_Annot::AppearanceMode mode) {
CPDF_Dictionary* pAP = m_pAnnot->GetAnnotDict()->GetDict("AP");
- if (pAP == NULL)
+ if (!pAP)
return FALSE;
// Choose the right sub-ap
@@ -52,7 +52,7 @@ FX_BOOL CPDFSDK_Widget::IsWidgetAppearanceValid(
// Get the AP stream or subdirectory
CPDF_Object* psub = pAP->GetElementValue(ap_entry);
- if (psub == NULL)
+ if (!psub)
return FALSE;
int nFieldType = GetFieldType();
@@ -71,7 +71,6 @@ FX_BOOL CPDFSDK_Widget::IsWidgetAppearanceValid(
}
return FALSE;
}
-
return TRUE;
}
@@ -186,15 +185,11 @@ FX_FLOAT CPDFSDK_Widget::GetFontSize() const {
int CPDFSDK_Widget::GetSelectedIndex(int nIndex) const {
CPDF_FormField* pFormField = GetFormField();
- ASSERT(pFormField != NULL);
-
return pFormField->GetSelectedIndex(nIndex);
}
CFX_WideString CPDFSDK_Widget::GetValue() const {
CPDF_FormField* pFormField = GetFormField();
- ASSERT(pFormField != NULL);
-
return pFormField->GetValue();
}
@@ -221,8 +216,6 @@ int CPDFSDK_Widget::CountOptions() const {
FX_BOOL CPDFSDK_Widget::IsOptionSelected(int nIndex) const {
CPDF_FormField* pFormField = GetFormField();
- ASSERT(pFormField != NULL);
-
return pFormField->IsItemSelected(nIndex);
}
@@ -1464,19 +1457,11 @@ FX_BOOL CPDFSDK_Widget::OnAAction(CPDF_AAction::AActionType type,
if (action && action.GetType() != CPDF_Action::Unknown) {
CPDFSDK_Document* pDocument = pPageView->GetSDKDocument();
- ASSERT(pDocument != NULL);
-
CPDFDoc_Environment* pEnv = pDocument->GetEnv();
- ASSERT(pEnv != NULL);
-
- CPDFSDK_ActionHandler* pActionHandler =
- pEnv->GetActionHander(); /*(CPDFSDK_ActionHandler*)pApp->GetActionHandler();*/
- ASSERT(pActionHandler != NULL);
-
+ CPDFSDK_ActionHandler* pActionHandler = pEnv->GetActionHander();
return pActionHandler->DoAction_Field(action, type, pDocument,
GetFormField(), data);
}
-
return FALSE;
}