| Index: core/fpdfdoc/cpdf_interform.cpp
|
| diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp
|
| index 3bef85ef9ce1b9b85f7724f8efd235f84b8e6041..cafc912569fb3ba2fa1eb99bf5850e0854cede72 100644
|
| --- a/core/fpdfdoc/cpdf_interform.cpp
|
| +++ b/core/fpdfdoc/cpdf_interform.cpp
|
| @@ -59,9 +59,9 @@ void InitDict(CPDF_Dictionary*& pFormDict, CPDF_Document* pDocument) {
|
| return;
|
|
|
| if (!pFormDict) {
|
| - pFormDict = new CPDF_Dictionary(pDocument->GetByteStringPool());
|
| - pDocument->GetRoot()->SetReferenceFor(
|
| - "AcroForm", pDocument, pDocument->AddIndirectObject(pFormDict));
|
| + pFormDict =
|
| + pDocument->AddIndirectDictionary(pDocument->GetByteStringPool());
|
| + pDocument->GetRoot()->SetReferenceFor("AcroForm", pDocument, pFormDict);
|
| }
|
|
|
| CFX_ByteString csDA;
|
| @@ -274,8 +274,7 @@ void AddFont(CPDF_Dictionary*& pFormDict,
|
| csNameTag.Remove(' ');
|
| csNameTag = CPDF_InterForm::GenerateNewResourceName(pDR, "Font", 4,
|
| csNameTag.c_str());
|
| - pFonts->SetReferenceFor(csNameTag, pDocument,
|
| - pFont->GetFontDict()->GetObjNum());
|
| + pFonts->SetReferenceFor(csNameTag, pDocument, pFont->GetFontDict());
|
| }
|
|
|
| CPDF_Font* AddNativeFont(CPDF_Dictionary*& pFormDict,
|
|
|