From a7ff4dc7c27c7940daec9cf740f4b7e7638a45ec Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 14 May 2018 20:13:40 +0000 Subject: Cleanup CPDF_Form parsing code This CL folds the StartParse() method of CPDF_Form into the ParserContent method. The no arguments ParseContent is removed and ParseContentWithParams renamed to ParseContent. The callsites are updated to pass the nullptr's. Bug: chromium:813349 Change-Id: I304b77aef1de1b9aa20e4a3044db5023f5701584 Reviewed-on: https://pdfium-review.googlesource.com/32511 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- core/fpdfdoc/cpdf_annot.cpp | 2 +- core/fpdfdoc/cpdf_formcontrol.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fpdfdoc') diff --git a/core/fpdfdoc/cpdf_annot.cpp b/core/fpdfdoc/cpdf_annot.cpp index 3b84baf8db..dc2e8acfdf 100644 --- a/core/fpdfdoc/cpdf_annot.cpp +++ b/core/fpdfdoc/cpdf_annot.cpp @@ -198,7 +198,7 @@ CPDF_Form* CPDF_Annot::GetAPForm(const CPDF_Page* pPage, AppearanceMode mode) { auto pNewForm = pdfium::MakeUnique( m_pDocument.Get(), pPage->m_pResources.Get(), pStream); - pNewForm->ParseContent(); + pNewForm->ParseContent(nullptr, nullptr, nullptr, nullptr); CPDF_Form* pResult = pNewForm.get(); m_APMap[pStream] = std::move(pNewForm); diff --git a/core/fpdfdoc/cpdf_formcontrol.cpp b/core/fpdfdoc/cpdf_formcontrol.cpp index a78a24db9d..2100d4ecee 100644 --- a/core/fpdfdoc/cpdf_formcontrol.cpp +++ b/core/fpdfdoc/cpdf_formcontrol.cpp @@ -180,7 +180,7 @@ void CPDF_FormControl::DrawControl(CFX_RenderDevice* pDevice, matrix.Concat(*pMatrix); CPDF_Form form(m_pField->GetForm()->GetDocument(), m_pField->GetForm()->GetFormDict()->GetDictFor("DR"), pStream); - form.ParseContent(); + form.ParseContent(nullptr, nullptr, nullptr, nullptr); CPDF_RenderContext context(pPage); context.AppendLayer(&form, &matrix); context.Render(pDevice, pOptions, nullptr); -- cgit v1.2.3