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

Unified Diff: core/fpdfdoc/doc_annot.cpp

Issue 2166883002: Pass CPDF_Document instead of CPDF_AnnotList when constructing CPDF_Annot. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | core/fpdfdoc/include/fpdf_doc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/doc_annot.cpp
diff --git a/core/fpdfdoc/doc_annot.cpp b/core/fpdfdoc/doc_annot.cpp
index c9e5d8ea9d5b504181d6401b7ff6ae6c6e269587..e1a976005b9cb6fc0c7948a396f9186fee410d23 100644
--- a/core/fpdfdoc/doc_annot.cpp
+++ b/core/fpdfdoc/doc_annot.cpp
@@ -42,7 +42,7 @@ CPDF_AnnotList::CPDF_AnnotList(CPDF_Page* pPage)
pDict = pAnnots->GetDictAt(i);
}
m_AnnotList.push_back(
- std::unique_ptr<CPDF_Annot>(new CPDF_Annot(pDict, this)));
+ std::unique_ptr<CPDF_Annot>(new CPDF_Annot(pDict, m_pDocument)));
if (bRegenerateAP && pDict->GetStringBy("Subtype") == "Widget" &&
CPDF_InterForm::IsUpdateAPEnabled()) {
FPDF_GenerateAP(m_pDocument, pDict);
@@ -121,9 +121,9 @@ void CPDF_AnnotList::DisplayAnnots(CPDF_Page* pPage,
}
}
-CPDF_Annot::CPDF_Annot(CPDF_Dictionary* pDict, CPDF_AnnotList* pList)
+CPDF_Annot::CPDF_Annot(CPDF_Dictionary* pDict, CPDF_Document* pDocument)
: m_pAnnotDict(pDict),
- m_pList(pList),
+ m_pDocument(pDocument),
m_sSubtype(m_pAnnotDict->GetStringBy("Subtype")) {}
CPDF_Annot::~CPDF_Annot() {
@@ -200,7 +200,7 @@ CPDF_Form* CPDF_Annot::GetAPForm(const CPDF_Page* pPage, AppearanceMode mode) {
return it->second;
CPDF_Form* pNewForm =
- new CPDF_Form(m_pList->GetDocument(), pPage->m_pResources, pStream);
+ new CPDF_Form(m_pDocument, pPage->m_pResources, pStream);
pNewForm->ParseContent(nullptr, nullptr, nullptr);
m_APMap[pStream] = pNewForm;
return pNewForm;
« no previous file with comments | « no previous file | core/fpdfdoc/include/fpdf_doc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698