| Index: core/fpdfdoc/cpdf_interform.cpp
|
| diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp
|
| index 196eeccfba6d26977cd87e20b9d07499ddbc8d83..54eedc6df9a7e05e84ca0a41abd368ea6ea1a0a7 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);
|
| uint32_t dwObjNum = pDocument->AddIndirectObject(pFormDict);
|
| CPDF_Dictionary* pRoot = pDocument->GetRoot();
|
| pRoot->SetReferenceFor("AcroForm", pDocument, dwObjNum);
|
| @@ -392,12 +392,12 @@ void AddFont(CPDF_Dictionary*& pFormDict,
|
|
|
| CPDF_Dictionary* pDR = pFormDict->GetDictFor("DR");
|
| if (!pDR) {
|
| - pDR = new CPDF_Dictionary;
|
| + pDR = new CPDF_Dictionary(pDocument);
|
| pFormDict->SetFor("DR", pDR);
|
| }
|
| CPDF_Dictionary* pFonts = pDR->GetDictFor("Font");
|
| if (!pFonts) {
|
| - pFonts = new CPDF_Dictionary;
|
| + pFonts = new CPDF_Dictionary(pDocument);
|
| pDR->SetFor("Font", pFonts);
|
| }
|
| if (csNameTag.IsEmpty())
|
| @@ -1496,7 +1496,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);
|
| filespec.SetFileName(pdf_path);
|
| pMainDict->SetFor("F", filespec.GetObj());
|
| }
|
| @@ -1519,7 +1519,7 @@ 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);
|
| pFieldDict->SetFor("T", new CPDF_String(fullname));
|
| if (pField->GetType() == CPDF_FormField::CheckBox ||
|
| pField->GetType() == CPDF_FormField::RadioButton) {
|
|
|