OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "xfa/fxfa/include/xfa_ffdoc.h" | 7 #include "xfa/fxfa/include/xfa_ffdoc.h" |
8 | 8 |
9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 pNode = m_pDocument->GetRoot(); | 405 pNode = m_pDocument->GetRoot(); |
406 } else { | 406 } else { |
407 pNode = ToNode(m_pDocument->GetXFAObject(packetHash)); | 407 pNode = ToNode(m_pDocument->GetXFAObject(packetHash)); |
408 } | 408 } |
409 FX_BOOL bFlags = FALSE; | 409 FX_BOOL bFlags = FALSE; |
410 if (pNode) { | 410 if (pNode) { |
411 CFX_ByteString bsChecksum; | 411 CFX_ByteString bsChecksum; |
412 if (pCSContext) { | 412 if (pCSContext) { |
413 pCSContext->GetChecksum(bsChecksum); | 413 pCSContext->GetChecksum(bsChecksum); |
414 } | 414 } |
415 bFlags = pExport->Export(pFile, pNode, 0, bsChecksum.GetLength() | 415 bFlags = pExport->Export( |
416 ? (const FX_CHAR*)bsChecksum | 416 pFile, pNode, 0, bsChecksum.GetLength() ? bsChecksum.c_str() : NULL); |
417 : NULL); | |
418 } else { | 417 } else { |
419 bFlags = pExport->Export(pFile); | 418 bFlags = pExport->Export(pFile); |
420 } | 419 } |
421 pExport->Release(); | 420 pExport->Release(); |
422 return bFlags; | 421 return bFlags; |
423 } | 422 } |
424 FX_BOOL CXFA_FFDoc::ImportData(IFX_FileRead* pStream, FX_BOOL bXDP) { | 423 FX_BOOL CXFA_FFDoc::ImportData(IFX_FileRead* pStream, FX_BOOL bXDP) { |
425 std::unique_ptr<CXFA_DataImporter, ReleaseDeleter<CXFA_DataImporter>> | 424 std::unique_ptr<CXFA_DataImporter, ReleaseDeleter<CXFA_DataImporter>> |
426 importer(new CXFA_DataImporter(m_pDocument)); | 425 importer(new CXFA_DataImporter(m_pDocument)); |
427 | 426 |
428 return importer->ImportData(pStream); | 427 return importer->ImportData(pStream); |
429 } | 428 } |
OLD | NEW |