summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseform.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-06-05 15:50:32 -0700
committerLei Zhang <thestig@chromium.org>2015-06-05 15:50:32 -0700
commit64adf195e2c1da338567220d3bd1b45861f79ee2 (patch)
tree4122e569026653c4dfc47d583d73024f3ee71502 /fpdfsdk/src/fsdk_baseform.cpp
parentca7db372a6379580c0e81a7f3b123eb91eae95b8 (diff)
downloadpdfium-64adf195e2c1da338567220d3bd1b45861f79ee2.tar.xz
Merge to XFA: Cleanup: Make CPDF_Annot::m_pAnnotDict private.
Remove dead code in CPDF_Annot as well. R=tsepez@chromium.org TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1157773012 (cherry picked from commit b7eb193dcec1594952cbc1dca356a40f66724159) Review URL: https://codereview.chromium.org/1157323005
Diffstat (limited to 'fpdfsdk/src/fsdk_baseform.cpp')
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 6fcdeac3af..efdcfc0c85 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -564,10 +564,7 @@ void CPDFSDK_Widget::SynchronizeXFAItems(IXFA_DocView* pXFADocView, IXFA_Widget*
FX_BOOL CPDFSDK_Widget::IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode)
{
- ASSERT(m_pAnnot != NULL);
- ASSERT(m_pAnnot->m_pAnnotDict != NULL);
-
- CPDF_Dictionary* pAP = m_pAnnot->m_pAnnotDict->GetDict("AP");
+ CPDF_Dictionary* pAP = m_pAnnot->GetAnnotDict()->GetDict("AP");
if (pAP == NULL) return FALSE;
// Choose the right sub-ap
@@ -638,7 +635,7 @@ int CPDFSDK_Widget::GetFieldFlags() const
CPDF_InterForm* pPDFInterForm = m_pInterForm->GetInterForm();
ASSERT(pPDFInterForm != NULL);
- CPDF_FormControl* pFormControl = pPDFInterForm->GetControlByDict(m_pAnnot->m_pAnnotDict);
+ CPDF_FormControl* pFormControl = pPDFInterForm->GetControlByDict(m_pAnnot->GetAnnotDict());
CPDF_FormField* pFormField = pFormControl->GetField();
return pFormField->GetFieldFlags();
}
@@ -2182,13 +2179,10 @@ void CPDFSDK_Widget::AddImageToAppearance(const CFX_ByteString& sAPType, CPDF_St
{
ASSERT(pImage != NULL);
- ASSERT(m_pAnnot != NULL);
- ASSERT(m_pAnnot->m_pAnnotDict != NULL);
-
CPDF_Document* pDoc = m_pPageView->GetPDFDocument();//pDocument->GetDocument();
ASSERT(pDoc != NULL);
- CPDF_Dictionary* pAPDict = m_pAnnot->m_pAnnotDict->GetDict("AP");
+ CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDict("AP");
ASSERT(pAPDict != NULL);
CPDF_Stream* pStream = pAPDict->GetStream(sAPType);
@@ -2223,10 +2217,7 @@ void CPDFSDK_Widget::AddImageToAppearance(const CFX_ByteString& sAPType, CPDF_St
void CPDFSDK_Widget::RemoveAppearance(const CFX_ByteString& sAPType)
{
- ASSERT(m_pAnnot != NULL);
- ASSERT(m_pAnnot->m_pAnnotDict != NULL);
-
- if (CPDF_Dictionary* pAPDict = m_pAnnot->m_pAnnotDict->GetDict("AP"))
+ if (CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDict("AP"))
{
pAPDict->RemoveAt(sAPType);
}