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

Unified Diff: fpdfsdk/cpdfsdk_annothandlermgr.cpp

Issue 2510223002: Make CPDF_Dictionary use unique pointers. (Closed)
Patch Set: rebase Created 4 years, 1 month 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/fxge/dib/fx_dib_engine_unittest.cpp ('k') | fpdfsdk/cpdfsdk_baannot.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/cpdfsdk_annothandlermgr.cpp
diff --git a/fpdfsdk/cpdfsdk_annothandlermgr.cpp b/fpdfsdk/cpdfsdk_annothandlermgr.cpp
index 51ce88e21fc7fbc24ee2bbaebacbbf15dddd5259..898b9ccc0fdec3243ce77b2d10246e633d4286ee 100644
--- a/fpdfsdk/cpdfsdk_annothandlermgr.cpp
+++ b/fpdfsdk/cpdfsdk_annothandlermgr.cpp
@@ -6,6 +6,8 @@
#include "fpdfsdk/cpdfsdk_annothandlermgr.h"
+#include "core/fpdfapi/parser/cpdf_number.h"
+#include "core/fpdfapi/parser/cpdf_string.h"
#include "core/fpdfdoc/cpdf_annot.h"
#include "fpdfsdk/cba_annotiterator.h"
#include "fpdfsdk/cpdfsdk_annot.h"
@@ -62,8 +64,9 @@ void CPDFSDK_AnnotHandlerMgr::Annot_OnCreate(CPDFSDK_Annot* pAnnot) {
CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot();
CPDFSDK_DateTime curTime;
- pPDFAnnot->GetAnnotDict()->SetStringFor("M", curTime.ToPDFDateTimeString());
- pPDFAnnot->GetAnnotDict()->SetNumberFor("F", 0);
+ pPDFAnnot->GetAnnotDict()->SetNewFor<CPDF_String>(
+ "M", curTime.ToPDFDateTimeString(), false);
+ pPDFAnnot->GetAnnotDict()->SetNewFor<CPDF_Number>("F", 0);
}
void CPDFSDK_AnnotHandlerMgr::Annot_OnLoad(CPDFSDK_Annot* pAnnot) {
« no previous file with comments | « core/fxge/dib/fx_dib_engine_unittest.cpp ('k') | fpdfsdk/cpdfsdk_baannot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698