summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-11-10 10:28:56 -0800
committerLei Zhang <thestig@chromium.org>2015-11-10 10:28:56 -0800
commit61aad4fbb6fb1081a40b2e144106f57cf443846c (patch)
treeb15ec4b3f7af763a7cf55d19a8b9a409afc6d479 /fpdfsdk
parent5044cab9c228ecd39e0ba07f0f5cced0a1cf6dd4 (diff)
downloadpdfium-61aad4fbb6fb1081a40b2e144106f57cf443846c.tar.xz
Merge to XFA: Cleanup CPDF_Stream:
- Remove CPDF_Stream::Create() and checks that it might fail. - Remove m_pCryptoHandler that's always a nullptr. - Remove m_FileOffset that's always 0. - Rename file version of InitStream() to InitStreamFromFile(). - Use IsMemoryBased() in more places. TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1415163009 . (cherry picked from commit e6e16954f0cdc324849fca9da883be8f131b3834) Review URL: https://codereview.chromium.org/1418493006 .
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/src/fpdfsave.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/src/fpdfsave.cpp b/fpdfsdk/src/fpdfsave.cpp
index a9e285ad84..ee8d02b026 100644
--- a/fpdfsdk/src/fpdfsave.cpp
+++ b/fpdfsdk/src/fpdfsave.cpp
@@ -181,10 +181,10 @@ FX_BOOL _SaveXFADocumentData(CPDFXFA_Document* pDocument,
CPDF_Dictionary* pDataDict = new CPDF_Dictionary;
if (iDataSetsIndex != -1) {
if (pDataSetsStream)
- pDataSetsStream->InitStream(pDsfileWrite, pDataDict);
+ pDataSetsStream->InitStreamFromFile(pDsfileWrite, pDataDict);
} else {
CPDF_Stream* pData = new CPDF_Stream(NULL, 0, NULL);
- pData->InitStream(pDsfileWrite, pDataDict);
+ pData->InitStreamFromFile(pDsfileWrite, pDataDict);
pPDFDocument->AddIndirectObject(pData);
iLast = pArray->GetCount() - 2;
pArray->InsertAt(iLast, CPDF_String::Create("datasets"));
@@ -208,10 +208,10 @@ FX_BOOL _SaveXFADocumentData(CPDFXFA_Document* pDocument,
CPDF_Dictionary* pDataDict = new CPDF_Dictionary;
if (iFormIndex != -1) {
if (pFormStream)
- pFormStream->InitStream(pfileWrite, pDataDict);
+ pFormStream->InitStreamFromFile(pfileWrite, pDataDict);
} else {
CPDF_Stream* pData = new CPDF_Stream(NULL, 0, NULL);
- pData->InitStream(pfileWrite, pDataDict);
+ pData->InitStreamFromFile(pfileWrite, pDataDict);
pPDFDocument->AddIndirectObject(pData);
iLast = pArray->GetCount() - 2;
pArray->InsertAt(iLast, CPDF_String::Create("form"));