summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_annot.cpp
diff options
context:
space:
mode:
authorjaepark <jaepark@google.com>2016-07-29 19:53:40 -0700
committerCommit bot <commit-bot@chromium.org>2016-07-29 19:53:40 -0700
commitab47acec5252d4a09da3cbde1a118b5255fe52ae (patch)
treea138249d262390c0058239552db53c070eca5b4f /core/fpdfdoc/cpdf_annot.cpp
parentc54bb4340324fab9e860fd625b4b380b6135c385 (diff)
downloadpdfium-ab47acec5252d4a09da3cbde1a118b5255fe52ae.tar.xz
Generate default AP stream for highlight annotation.
This patch generates a default AP stream for highlight annotation so that highlight annotations without AP stream can be displayed. BUG=62625 Review-Url: https://codereview.chromium.org/2193983002
Diffstat (limited to 'core/fpdfdoc/cpdf_annot.cpp')
-rw-r--r--core/fpdfdoc/cpdf_annot.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/fpdfdoc/cpdf_annot.cpp b/core/fpdfdoc/cpdf_annot.cpp
index 18b1e9d946..a8578fc28d 100644
--- a/core/fpdfdoc/cpdf_annot.cpp
+++ b/core/fpdfdoc/cpdf_annot.cpp
@@ -12,13 +12,17 @@
#include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
#include "core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h"
#include "core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h"
+#include "core/fpdfdoc/cpvt_generateap.h"
#include "core/fxcrt/include/fx_memory.h"
#include "core/fxge/include/fx_ge.h"
CPDF_Annot::CPDF_Annot(CPDF_Dictionary* pDict, CPDF_Document* pDocument)
: m_pAnnotDict(pDict),
m_pDocument(pDocument),
- m_sSubtype(m_pAnnotDict->GetStringBy("Subtype")) {}
+ m_sSubtype(m_pAnnotDict->GetStringBy("Subtype")) {
+ if (m_sSubtype == "Highlight")
+ CPVT_GenerateAP::GenerateHighlightAP(m_pDocument, m_pAnnotDict);
+}
CPDF_Annot::~CPDF_Annot() {
ClearCachedAP();