diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-11-02 09:54:54 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-11-02 09:54:54 -0800 |
commit | 3343d146f2d9cd2f9eaa3a40fed3a5b94f3f107e (patch) | |
tree | ab220ffcea223cacd136054603c63324a1d9d5f4 /fpdfsdk/src/fpdfsave.cpp | |
parent | 1b700c3c452429dacde3c163a6edb2706f93d4a7 (diff) | |
download | pdfium-3343d146f2d9cd2f9eaa3a40fed3a5b94f3f107e.tar.xz |
Fix XFA compilation noise, part 1.
Mainly:
volatile/override/method shadowing.
unused variables.
intialization list init order.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1422113003 .
Diffstat (limited to 'fpdfsdk/src/fpdfsave.cpp')
-rw-r--r-- | fpdfsdk/src/fpdfsave.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/fpdfsdk/src/fpdfsave.cpp b/fpdfsdk/src/fpdfsave.cpp index 2cfbb81cd0..3a85ba750c 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); } |