diff options
author | tsepez <tsepez@chromium.org> | 2016-09-28 16:47:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-28 16:47:07 -0700 |
commit | 698c5716d005860360527e4cfe15b4a185589117 (patch) | |
tree | 7e82388a12f3de2b6fb179181d77b47d2c547df7 /core/fpdfdoc/cpdf_interform.cpp | |
parent | 4ba37c6f6964f6a24fc4b8b48bc82c02edb70370 (diff) | |
download | pdfium-698c5716d005860360527e4cfe15b4a185589117.tar.xz |
Use string pools in some dictionaries, names, and strings.
BUG=pdfium:597
Review-Url: https://codereview.chromium.org/2345063002
Diffstat (limited to 'core/fpdfdoc/cpdf_interform.cpp')
-rw-r--r-- | core/fpdfdoc/cpdf_interform.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp index d2a842262e..29063f534b 100644 --- a/core/fpdfdoc/cpdf_interform.cpp +++ b/core/fpdfdoc/cpdf_interform.cpp @@ -58,7 +58,7 @@ void InitDict(CPDF_Dictionary*& pFormDict, CPDF_Document* pDocument) { return; if (!pFormDict) { - pFormDict = new CPDF_Dictionary; + pFormDict = new CPDF_Dictionary(pDocument->GetByteStringPool()); pDocument->GetRoot()->SetReferenceFor( "AcroForm", pDocument, pDocument->AddIndirectObject(pFormDict)); } @@ -259,12 +259,12 @@ void AddFont(CPDF_Dictionary*& pFormDict, CPDF_Dictionary* pDR = pFormDict->GetDictFor("DR"); if (!pDR) { - pDR = new CPDF_Dictionary; + pDR = new CPDF_Dictionary(pDocument->GetByteStringPool()); pFormDict->SetFor("DR", pDR); } CPDF_Dictionary* pFonts = pDR->GetDictFor("Font"); if (!pFonts) { - pFonts = new CPDF_Dictionary; + pFonts = new CPDF_Dictionary(pDocument->GetByteStringPool()); pDR->SetFor("Font", pFonts); } if (csNameTag.IsEmpty()) @@ -1212,7 +1212,7 @@ CFDF_Document* CPDF_InterForm::ExportToFDF( pMainDict->SetStringFor("F", CFX_ByteString::FromUnicode(wsFilePath)); pMainDict->SetStringFor("UF", PDF_EncodeText(wsFilePath)); } else { - CPDF_FileSpec filespec; + CPDF_FileSpec filespec(pDoc->GetByteStringPool()); filespec.SetFileName(pdf_path); pMainDict->SetFor("F", filespec.GetObj()); } @@ -1235,7 +1235,8 @@ CFDF_Document* CPDF_InterForm::ExportToFDF( continue; CFX_WideString fullname = FPDF_GetFullName(pField->GetFieldDict()); - CPDF_Dictionary* pFieldDict = new CPDF_Dictionary; + CPDF_Dictionary* pFieldDict = + new CPDF_Dictionary(pDoc->GetByteStringPool()); pFieldDict->SetFor("T", new CPDF_String(fullname)); if (pField->GetType() == CPDF_FormField::CheckBox || pField->GetType() == CPDF_FormField::RadioButton) { |