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

Unified Diff: fpdfsdk/fpdfsave.cpp

Issue 2345063002: Use string pools in some dictionaries (Closed)
Patch Set: windows compile Created 4 years, 3 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 | « fpdfsdk/fpdfppo.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfsave.cpp
diff --git a/fpdfsdk/fpdfsave.cpp b/fpdfsdk/fpdfsave.cpp
index 8293c371dc0bf66b046e4d0da04cff14ea8bceca..aa03e6d13cdd6b0496e07f5f8570d261102f5e99 100644
--- a/fpdfsdk/fpdfsave.cpp
+++ b/fpdfsdk/fpdfsave.cpp
@@ -178,7 +178,8 @@ bool SaveXFADocumentData(CPDFXFA_Document* pDocument,
// Datasets
pContext->UpdateChecksum(pDsfileWrite.get());
pContext->FinishChecksum();
- CPDF_Dictionary* pDataDict = new CPDF_Dictionary;
+ CPDF_Dictionary* pDataDict =
+ new CPDF_Dictionary(pPDFDocument->GetByteStringPool());
if (iDataSetsIndex != -1) {
if (pDataSetsStream)
pDataSetsStream->InitStreamFromFile(pDsfileWrite.get(), pDataDict);
@@ -201,7 +202,8 @@ bool SaveXFADocumentData(CPDFXFA_Document* pDocument,
if (pXFADocView->GetDoc()->SavePackage(XFA_HASHCODE_Form, pfileWrite.get(),
pContext.get()) &&
pfileWrite->GetSize() > 0) {
- CPDF_Dictionary* pDataDict = new CPDF_Dictionary;
+ CPDF_Dictionary* pDataDict =
+ new CPDF_Dictionary(pPDFDocument->GetByteStringPool());
if (iFormIndex != -1) {
if (pFormStream)
pFormStream->InitStreamFromFile(pfileWrite.get(), pDataDict);
« no previous file with comments | « fpdfsdk/fpdfppo.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698