Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: fpdfsdk/src/fsdk_baseform.cpp

Issue 1157773012: Cleanup: Make CPDF_Annot::m_pAnnotDict private. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fsdk_baseannot.cpp ('k') | fpdfsdk/src/fsdk_mgr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fsdk_baseform.cpp
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 0cbc4baa4423e0004a4c398d7a2e2a20a7b4d315..8b0738a8d45e3b8ce14bdbd09e526cb1ff8452c9 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -39,10 +39,7 @@ CPDFSDK_Widget::~CPDFSDK_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
@@ -96,7 +93,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();
}
@@ -1538,13 +1535,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);
@@ -1579,10 +1573,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);
}
« no previous file with comments | « fpdfsdk/src/fsdk_baseannot.cpp ('k') | fpdfsdk/src/fsdk_mgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698