summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseform.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-10-30 23:42:33 -0700
committerLei Zhang <thestig@chromium.org>2015-10-30 23:42:33 -0700
commitc88c42f317c0e94c4c7b98949bfe1a495aef07a9 (patch)
tree338bce5904097056be9afc47796ad1ba22f05c53 /fpdfsdk/src/fsdk_baseform.cpp
parent1630dffdc1d554d8f2319e83cdbd7b12f480362d (diff)
downloadpdfium-c88c42f317c0e94c4c7b98949bfe1a495aef07a9.tar.xz
Clean up CPDF_AnnotList.
- Remove dead code - Stop using CFX_PtrArray - Mark more things const - Fix style nits R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425093003 .
Diffstat (limited to 'fpdfsdk/src/fsdk_baseform.cpp')
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp24
1 files changed, 5 insertions, 19 deletions
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index fc45cd931b..e3536e0a19 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -99,37 +99,23 @@ CFX_ByteString CPDFSDK_Widget::GetSubType() const {
}
CPDF_FormField* CPDFSDK_Widget::GetFormField() const {
- ASSERT(m_pInterForm != NULL);
-
- CPDF_FormControl* pCtrl = GetFormControl();
- ASSERT(pCtrl != NULL);
-
- return pCtrl->GetField();
+ return GetFormControl()->GetField();
}
CPDF_FormControl* CPDFSDK_Widget::GetFormControl() const {
- ASSERT(m_pInterForm != NULL);
-
CPDF_InterForm* pPDFInterForm = m_pInterForm->GetInterForm();
- ASSERT(pPDFInterForm != NULL);
-
return pPDFInterForm->GetControlByDict(GetAnnotDict());
}
-CPDF_FormControl* CPDFSDK_Widget::GetFormControl(CPDF_InterForm* pInterForm,
- CPDF_Dictionary* pAnnotDict) {
- ASSERT(pInterForm != NULL);
+CPDF_FormControl* CPDFSDK_Widget::GetFormControl(
+ CPDF_InterForm* pInterForm,
+ const CPDF_Dictionary* pAnnotDict) {
ASSERT(pAnnotDict != NULL);
-
- CPDF_FormControl* pControl = pInterForm->GetControlByDict(pAnnotDict);
-
- return pControl;
+ return pInterForm->GetControlByDict(pAnnotDict);
}
int CPDFSDK_Widget::GetRotate() const {
CPDF_FormControl* pCtrl = GetFormControl();
- ASSERT(pCtrl != NULL);
-
return pCtrl->GetRotation() % 360;
}