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

Unified Diff: core/fpdfdoc/doc_annot.cpp

Issue 1879683002: Remove CPDF_Object::GetConstString and overrides (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Move bLuminosity down. Created 4 years, 8 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 | « core/fpdfdoc/cpvt_generateap.cpp ('k') | core/fpdfdoc/doc_basic.cpp » ('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 8650fbd23d70183c4d6a8f10bfc08652efbdfc13..3b90b0b4b57a0b9ffbdad5940bdff3bcbb2bab58 100644
--- a/core/fpdfdoc/doc_annot.cpp
+++ b/core/fpdfdoc/doc_annot.cpp
@@ -43,7 +43,7 @@ CPDF_AnnotList::CPDF_AnnotList(CPDF_Page* pPage)
pDict = pAnnots->GetDictAt(i);
}
m_AnnotList.push_back(new CPDF_Annot(pDict, this));
- if (bRegenerateAP && pDict->GetConstStringBy("Subtype") == "Widget" &&
+ if (bRegenerateAP && pDict->GetStringBy("Subtype") == "Widget" &&
CPDF_InterForm::UpdatingAPEnabled()) {
FPDF_GenerateAP(m_pDocument, pDict);
}
@@ -127,10 +127,12 @@ void CPDF_AnnotList::DisplayAnnots(CPDF_Page* pPage,
CPDF_Annot::CPDF_Annot(CPDF_Dictionary* pDict, CPDF_AnnotList* pList)
: m_pAnnotDict(pDict),
m_pList(pList),
- m_sSubtype(m_pAnnotDict->GetConstStringBy("Subtype")) {}
+ m_sSubtype(m_pAnnotDict->GetStringBy("Subtype")) {}
+
CPDF_Annot::~CPDF_Annot() {
ClearCachedAP();
}
+
void CPDF_Annot::ClearCachedAP() {
for (const auto& pair : m_APMap) {
delete pair.second;
« no previous file with comments | « core/fpdfdoc/cpvt_generateap.cpp ('k') | core/fpdfdoc/doc_basic.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698