summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_interform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpdf_interform.cpp')
-rw-r--r--core/fpdfdoc/cpdf_interform.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp
index 2e5c17508a..de3770901b 100644
--- a/core/fpdfdoc/cpdf_interform.cpp
+++ b/core/fpdfdoc/cpdf_interform.cpp
@@ -43,8 +43,8 @@ void InitDict(CPDF_Dictionary*& pFormDict, CPDF_Document* pDocument) {
if (!pFormDict) {
pFormDict = pDocument->NewIndirect<CPDF_Dictionary>();
- pDocument->GetRoot()->SetNewFor<CPDF_Reference>("AcroForm", pDocument,
- pFormDict->GetObjNum());
+ pDocument->GetRoot()->SetFor("AcroForm",
+ pFormDict->MakeReference(pDocument));
}
ByteString csDA;
@@ -248,8 +248,7 @@ void AddFont(CPDF_Dictionary*& pFormDict,
csNameTag->Remove(' ');
*csNameTag = CPDF_InterForm::GenerateNewResourceName(pDR, "Font", 4,
csNameTag->c_str());
- pFonts->SetNewFor<CPDF_Reference>(*csNameTag, pDocument,
- pFont->GetFontDict()->GetObjNum());
+ pFonts->SetFor(*csNameTag, pFont->GetFontDict()->MakeReference(pDocument));
}
CPDF_Font* AddNativeFont(CPDF_Dictionary*& pFormDict,