summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfannot.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-16 15:34:05 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-16 21:00:57 +0000
commit90fffb31e2ec6cf66fe1b85b466cd2f12ee9c87f (patch)
tree38ac9992765ed34727da873eefe4ece39c0c63e2 /fpdfsdk/fpdfannot.cpp
parent9521036052646f60dc5c1ccd4821108eac4bca55 (diff)
downloadpdfium-90fffb31e2ec6cf66fe1b85b466cd2f12ee9c87f.tar.xz
Simplify CPVT_GenerateAP interface
This CL moves the annotation decision inside GenerateAnnotAP and hides the individual annotation AP generation methods. The form methods are hidden inside GenerateFormAP and a general GenerateEmptyAP has been added. Change-Id: I9e761cb10ceca70681df4e546631a7859f1bfc7c Reviewed-on: https://pdfium-review.googlesource.com/16130 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfannot.cpp')
-rw-r--r--fpdfsdk/fpdfannot.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/fpdfsdk/fpdfannot.cpp b/fpdfsdk/fpdfannot.cpp
index a671032b1e..09bf42af92 100644
--- a/fpdfsdk/fpdfannot.cpp
+++ b/fpdfsdk/fpdfannot.cpp
@@ -357,14 +357,7 @@ FPDFAnnot_AppendObject(FPDF_ANNOTATION annot, FPDF_PAGEOBJECT obj) {
CPDF_Stream* pStream = FPDFDOC_GetAnnotAP(pAnnot->GetAnnotDict(),
CPDF_Annot::AppearanceMode::Normal);
if (!pStream) {
- auto pExtGStateDict =
- CPVT_GenerateAP::GenerateExtGStateDict(*pAnnotDict, "GS", "Normal");
- auto pResourceDict = CPVT_GenerateAP::GenerateResourceDict(
- pPage->m_pDocument.Get(), std::move(pExtGStateDict), nullptr);
- std::ostringstream sStream;
- CPVT_GenerateAP::GenerateAndSetAPDict(pPage->m_pDocument.Get(), pAnnotDict,
- &sStream, std::move(pResourceDict),
- false);
+ CPVT_GenerateAP::GenerateEmptyAP(pPage->m_pDocument.Get(), pAnnotDict);
pStream =
FPDFDOC_GetAnnotAP(pAnnotDict, CPDF_Annot::AppearanceMode::Normal);
if (!pStream)