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 "../../../include/fpdfapi/fpdf_serial.h" | 7 #include "../../../include/fpdfapi/fpdf_serial.h" |
8 #include "editint.h" | 8 #include "editint.h" |
9 #define PDF_OBJECTSTREAM_MAXLENGTH (256 * 1024) | 9 #define PDF_OBJECTSTREAM_MAXLENGTH (256 * 1024) |
10 #define PDF_XREFSTREAM_MAXSIZE 10000 | 10 #define PDF_XREFSTREAM_MAXSIZE 10000 |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 offset += len + encryptor.m_dwSize; | 537 offset += len + encryptor.m_dwSize; |
538 } | 538 } |
539 if ((len = pFile->AppendString(FX_BSTRC("\r\nendstream\r\nendobj\r\n"))) < 0
) { | 539 if ((len = pFile->AppendString(FX_BSTRC("\r\nendstream\r\nendobj\r\n"))) < 0
) { |
540 return -1; | 540 return -1; |
541 } | 541 } |
542 offset += len; | 542 offset += len; |
543 return ObjOffset; | 543 return ObjOffset; |
544 } | 544 } |
545 CPDF_XRefStream::CPDF_XRefStream() | 545 CPDF_XRefStream::CPDF_XRefStream() |
546 : m_PrevOffset(0) | 546 : m_PrevOffset(0) |
| 547 , m_dwTempObjNum(0) |
547 , m_iSeg(0) | 548 , m_iSeg(0) |
548 , m_dwTempObjNum(0) | |
549 { | 549 { |
550 } | 550 } |
551 FX_BOOL CPDF_XRefStream::Start() | 551 FX_BOOL CPDF_XRefStream::Start() |
552 { | 552 { |
553 m_IndexArray.RemoveAll(); | 553 m_IndexArray.RemoveAll(); |
554 m_Buffer.Clear(); | 554 m_Buffer.Clear(); |
555 m_iSeg = 0; | 555 m_iSeg = 0; |
556 return TRUE; | 556 return TRUE; |
557 } | 557 } |
558 FX_INT32 CPDF_XRefStream::CompressIndirectObject(FX_DWORD dwObjNum, const CPDF_O
bject *pObj, CPDF_Creator *pCreator) | 558 FX_INT32 CPDF_XRefStream::CompressIndirectObject(FX_DWORD dwObjNum, const CPDF_O
bject *pObj, CPDF_Creator *pCreator) |
(...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2130 m_bNewCrypto = FALSE; | 2130 m_bNewCrypto = FALSE; |
2131 if (!m_bStandardSecurity) { | 2131 if (!m_bStandardSecurity) { |
2132 return; | 2132 return; |
2133 } | 2133 } |
2134 if (m_pEncryptDict) { | 2134 if (m_pEncryptDict) { |
2135 m_pEncryptDict->Release(); | 2135 m_pEncryptDict->Release(); |
2136 m_pEncryptDict = NULL; | 2136 m_pEncryptDict = NULL; |
2137 } | 2137 } |
2138 m_bStandardSecurity = FALSE; | 2138 m_bStandardSecurity = FALSE; |
2139 } | 2139 } |
OLD | NEW |