Chromium Code Reviews| 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 "core/src/fpdfapi/fpdf_edit/editint.h" | 7 #include "core/src/fpdfapi/fpdf_edit/editint.h" |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1938 delete m_pXRefStream; | 1938 delete m_pXRefStream; |
| 1939 m_pXRefStream = NULL; | 1939 m_pXRefStream = NULL; |
| 1940 m_File.Clear(); | 1940 m_File.Clear(); |
| 1941 m_NewObjNumArray.RemoveAll(); | 1941 m_NewObjNumArray.RemoveAll(); |
| 1942 if (m_pIDArray) { | 1942 if (m_pIDArray) { |
| 1943 m_pIDArray->Release(); | 1943 m_pIDArray->Release(); |
| 1944 m_pIDArray = NULL; | 1944 m_pIDArray = NULL; |
| 1945 } | 1945 } |
| 1946 } | 1946 } |
| 1947 FX_BOOL CPDF_Creator::Create(IFX_StreamWrite* pFile, FX_DWORD flags) { | 1947 FX_BOOL CPDF_Creator::Create(IFX_StreamWrite* pFile, FX_DWORD flags) { |
| 1948 if (!pFile) { | 1948 if (!pFile) { |
|
Lei Zhang
2016/02/19 23:09:57
AFAICT, there's only 1 caller and |pFile| is alway
Tom Sepez
2016/02/19 23:24:26
Done.
| |
| 1949 return FALSE; | 1949 return FALSE; |
| 1950 } | 1950 } |
| 1951 if (!m_File.AttachFile(pFile, FALSE)) { | 1951 m_File.AttachFile(pFile); |
| 1952 return FALSE; | |
| 1953 } | |
| 1954 return Create(flags); | 1952 return Create(flags); |
| 1955 } | 1953 } |
| 1956 FX_BOOL CPDF_Creator::Create(FX_DWORD flags) { | 1954 FX_BOOL CPDF_Creator::Create(FX_DWORD flags) { |
| 1957 m_dwFlags = flags; | 1955 m_dwFlags = flags; |
| 1958 m_iStage = 0; | 1956 m_iStage = 0; |
| 1959 m_Offset = 0; | 1957 m_Offset = 0; |
| 1960 m_dwLastObjNum = m_pDocument->GetLastObjNum(); | 1958 m_dwLastObjNum = m_pDocument->GetLastObjNum(); |
| 1961 m_ObjectOffset.Clear(); | 1959 m_ObjectOffset.Clear(); |
| 1962 m_NewObjNumArray.RemoveAll(); | 1960 m_NewObjNumArray.RemoveAll(); |
| 1963 InitID(); | 1961 InitID(); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2061 m_bNewCrypto = FALSE; | 2059 m_bNewCrypto = FALSE; |
| 2062 if (!m_bStandardSecurity) { | 2060 if (!m_bStandardSecurity) { |
| 2063 return; | 2061 return; |
| 2064 } | 2062 } |
| 2065 if (m_pEncryptDict) { | 2063 if (m_pEncryptDict) { |
| 2066 m_pEncryptDict->Release(); | 2064 m_pEncryptDict->Release(); |
| 2067 m_pEncryptDict = NULL; | 2065 m_pEncryptDict = NULL; |
| 2068 } | 2066 } |
| 2069 m_bStandardSecurity = FALSE; | 2067 m_bStandardSecurity = FALSE; |
| 2070 } | 2068 } |
| OLD | NEW |