summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_save.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdf_save.cpp')
-rw-r--r--fpdfsdk/fpdf_save.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/fpdfsdk/fpdf_save.cpp b/fpdfsdk/fpdf_save.cpp
index 6064a73629..52b87264e7 100644
--- a/fpdfsdk/fpdf_save.cpp
+++ b/fpdfsdk/fpdf_save.cpp
@@ -138,8 +138,7 @@ bool SaveXFADocumentData(CPDFXFA_Context* pContext,
pData->InitStreamFromFile(pDsfileWrite, std::move(pDataDict));
iLast = pArray->GetCount() - 2;
pArray->InsertNewAt<CPDF_String>(iLast, "datasets", false);
- pArray->InsertNewAt<CPDF_Reference>(iLast + 1, pPDFDocument,
- pData->GetObjNum());
+ pArray->InsertAt(iLast + 1, pData->MakeReference(pPDFDocument));
}
fileList->push_back(std::move(pDsfileWrite));
}
@@ -164,8 +163,7 @@ bool SaveXFADocumentData(CPDFXFA_Context* pContext,
pData->InitStreamFromFile(pfileWrite, std::move(pDataDict));
iLast = pArray->GetCount() - 2;
pArray->InsertNewAt<CPDF_String>(iLast, "form", false);
- pArray->InsertNewAt<CPDF_Reference>(iLast + 1, pPDFDocument,
- pData->GetObjNum());
+ pArray->InsertAt(iLast + 1, pData->MakeReference(pPDFDocument));
}
fileList->push_back(std::move(pfileWrite));
}