Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1232)

Unified Diff: fpdfsdk/src/fpdfsave.cpp

Issue 1422113003: Fix XFA compilation noise, part 1. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Nits. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/include/fsdk_baseform.h ('k') | fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfsave.cpp
diff --git a/fpdfsdk/src/fpdfsave.cpp b/fpdfsdk/src/fpdfsave.cpp
index 2cfbb81cd0790edc78164d6abfef4b8ebbbdf5fb..3a85ba750cdff42f4582528fa3195b6797f9c897 100644
--- a/fpdfsdk/src/fpdfsave.cpp
+++ b/fpdfsdk/src/fpdfsave.cpp
@@ -135,7 +135,6 @@ FX_BOOL _SaveXFADocumentData(CPDFXFA_Document* pDocument,
// Get form CPDF_Stream
CPDF_Object* pFormPDFObj = pArray->GetElement(iFormIndex);
if (pFormPDFObj->GetType() == PDFOBJ_REFERENCE) {
- CPDF_Reference* pFormRefObj = (CPDF_Reference*)pFormPDFObj;
CPDF_Object* pFormDircetObj = pFormPDFObj->GetDirect();
if (NULL != pFormDircetObj &&
pFormDircetObj->GetType() == PDFOBJ_STREAM) {
@@ -185,14 +184,10 @@ FX_BOOL _SaveXFADocumentData(CPDFXFA_Document* pDocument,
} else {
CPDF_Stream* pData = new CPDF_Stream(NULL, 0, NULL);
pData->InitStream(pDsfileWrite, pDataDict);
- FX_DWORD AppStreamobjnum = pPDFDocument->AddIndirectObject(pData);
- CPDF_Reference* pRef =
- (CPDF_Reference*)pPDFDocument->GetIndirectObject(AppStreamobjnum);
- {
- iLast = pArray->GetCount() - 2;
- pArray->InsertAt(iLast, CPDF_String::Create("datasets"));
- pArray->InsertAt(iLast + 1, pData, pPDFDocument);
- }
+ pPDFDocument->AddIndirectObject(pData);
+ iLast = pArray->GetCount() - 2;
+ pArray->InsertAt(iLast, CPDF_String::Create("datasets"));
+ pArray->InsertAt(iLast + 1, pData, pPDFDocument);
}
fileList.Add(pDsfileWrite);
}
@@ -216,14 +211,10 @@ FX_BOOL _SaveXFADocumentData(CPDFXFA_Document* pDocument,
} else {
CPDF_Stream* pData = new CPDF_Stream(NULL, 0, NULL);
pData->InitStream(pfileWrite, pDataDict);
- FX_DWORD AppStreamobjnum = pPDFDocument->AddIndirectObject(pData);
- CPDF_Reference* pRef =
- (CPDF_Reference*)pPDFDocument->GetIndirectObject(AppStreamobjnum);
- {
- iLast = pArray->GetCount() - 2;
- pArray->InsertAt(iLast, CPDF_String::Create("form"));
- pArray->InsertAt(iLast + 1, pData, pPDFDocument);
- }
+ pPDFDocument->AddIndirectObject(pData);
+ iLast = pArray->GetCount() - 2;
+ pArray->InsertAt(iLast, CPDF_String::Create("form"));
+ pArray->InsertAt(iLast + 1, pData, pPDFDocument);
}
fileList.Add(pfileWrite);
}
« no previous file with comments | « fpdfsdk/include/fsdk_baseform.h ('k') | fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698