diff options
author | Lei Zhang <thestig@chromium.org> | 2015-10-02 10:22:14 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-10-02 10:22:14 -0700 |
commit | 421b4612439ee3a81d675b542038c6c3ff25e977 (patch) | |
tree | 5cc05d8c1cbf7825dfd60dc8219af390f8066e78 /fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp | |
parent | db5256fb4ad0678ab7f895c40391cb77a3ba40fa (diff) | |
download | pdfium-421b4612439ee3a81d675b542038c6c3ff25e977.tar.xz |
XFA: Remove test for new.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1377853004 .
Diffstat (limited to 'fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp')
-rw-r--r-- | fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp index 9378735c24..249efae759 100644 --- a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp +++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp @@ -200,16 +200,8 @@ void CPDFXFA_Document::RemovePage(CPDFXFA_Page* page) { CPDFSDK_Document* CPDFXFA_Document::GetSDKDocument(
CPDFDoc_Environment* pFormFillEnv) {
- if (!pFormFillEnv)
- return m_pSDKDoc;
-
- if (m_pSDKDoc)
- return m_pSDKDoc;
-
- m_pSDKDoc = new CPDFSDK_Document(this, pFormFillEnv);
- if (!m_pSDKDoc)
- return NULL;
-
+ if (!m_pSDKDoc && pFormFillEnv)
+ m_pSDKDoc = new CPDFSDK_Document(this, pFormFillEnv);
return m_pSDKDoc;
}
@@ -999,8 +991,7 @@ IFX_FileRead* CPDFXFA_Document::OpenLinkedFile(IXFA_Doc* hDoc, if (pFileHandler == NULL)
return NULL;
- CFPDF_FileStream* pFileRead = new CFPDF_FileStream(pFileHandler);
- return pFileRead;
+ return new CFPDF_FileStream(pFileHandler);
}
FX_BOOL CPDFXFA_Document::_ExportSubmitFile(FPDF_FILEHANDLER* pFileHandler,
int fileType,
|