diff options
author | jaepark <jaepark@google.com> | 2016-07-20 11:20:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-20 11:20:01 -0700 |
commit | cc8ae2fd891f71c5d548a042f4d265463887ee6c (patch) | |
tree | b8b806c9a5da93b2676f820603d61acf313df353 /core/fpdfdoc/doc_annot.cpp | |
parent | 69f160df5a13bbf1eb3bd39e59c5890d212f98ad (diff) | |
download | pdfium-cc8ae2fd891f71c5d548a042f4d265463887ee6c.tar.xz |
Pass CPDF_Document instead of CPDF_AnnotList when constructing CPDF_Annot.
CPDF_AnnotList in CPDF_Annot is only used for getting CPDF_Document.
Review-Url: https://codereview.chromium.org/2166883002
Diffstat (limited to 'core/fpdfdoc/doc_annot.cpp')
-rw-r--r-- | core/fpdfdoc/doc_annot.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfdoc/doc_annot.cpp b/core/fpdfdoc/doc_annot.cpp index c9e5d8ea9d..e1a976005b 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; |