diff options
author | Lei Zhang <thestig@chromium.org> | 2015-10-30 23:55:35 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-10-30 23:55:35 -0700 |
commit | 1b700c3c452429dacde3c163a6edb2706f93d4a7 (patch) | |
tree | 4efaf4dcec5b28a4d6cac575727dc61356e8a4fe /fpdfsdk/src/fsdk_baseform.cpp | |
parent | de6088db8403e775e2963ce6e0bd55e5356beb73 (diff) | |
download | pdfium-1b700c3c452429dacde3c163a6edb2706f93d4a7.tar.xz |
Merge to XFA: Clean up CPDF_AnnotList.
- Remove dead code
- Stop using CFX_PtrArray
- Mark more things const
- Fix style nits
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1425093003 .
(cherry picked from commit c88c42f317c0e94c4c7b98949bfe1a495aef07a9)
Review URL: https://codereview.chromium.org/1430803003 .
Diffstat (limited to 'fpdfsdk/src/fsdk_baseform.cpp')
-rw-r--r-- | fpdfsdk/src/fsdk_baseform.cpp | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp index 54b607a382..e486310ba2 100644 --- a/fpdfsdk/src/fsdk_baseform.cpp +++ b/fpdfsdk/src/fsdk_baseform.cpp @@ -566,37 +566,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; } |