Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(436)

Side by Side Diff: core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp

Issue 1783023002: Re-enable MSVC warning 4800 for compiling with chromium_code (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: remove cast change on security_handler file Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/include/fxge/fx_ge.h ('k') | core/src/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1946 void CPDF_Creator::Clear() { 1946 void CPDF_Creator::Clear() {
1947 delete m_pXRefStream; 1947 delete m_pXRefStream;
1948 m_pXRefStream = NULL; 1948 m_pXRefStream = NULL;
1949 m_File.Clear(); 1949 m_File.Clear();
1950 m_NewObjNumArray.RemoveAll(); 1950 m_NewObjNumArray.RemoveAll();
1951 if (m_pIDArray) { 1951 if (m_pIDArray) {
1952 m_pIDArray->Release(); 1952 m_pIDArray->Release();
1953 m_pIDArray = NULL; 1953 m_pIDArray = NULL;
1954 } 1954 }
1955 } 1955 }
1956 FX_BOOL CPDF_Creator::Create(IFX_StreamWrite* pFile, FX_DWORD flags) { 1956
1957 bool CPDF_Creator::Create(IFX_StreamWrite* pFile, FX_DWORD flags) {
1957 m_File.AttachFile(pFile); 1958 m_File.AttachFile(pFile);
1958 return Create(flags); 1959 return Create(flags);
1959 } 1960 }
1960 FX_BOOL CPDF_Creator::Create(FX_DWORD flags) { 1961
1962 bool CPDF_Creator::Create(FX_DWORD flags) {
1961 m_dwFlags = flags; 1963 m_dwFlags = flags;
1962 m_iStage = 0; 1964 m_iStage = 0;
1963 m_Offset = 0; 1965 m_Offset = 0;
1964 m_dwLastObjNum = m_pDocument->GetLastObjNum(); 1966 m_dwLastObjNum = m_pDocument->GetLastObjNum();
1965 m_ObjectOffset.Clear(); 1967 m_ObjectOffset.Clear();
1966 m_NewObjNumArray.RemoveAll(); 1968 m_NewObjNumArray.RemoveAll();
1967 InitID(); 1969 InitID();
1968 if (flags & FPDFCREATE_PROGRESSIVE) { 1970 if (flags & FPDFCREATE_PROGRESSIVE) {
1969 return TRUE; 1971 return true;
1970 } 1972 }
1971 return Continue(NULL) > -1; 1973 return Continue(NULL) > -1;
1972 } 1974 }
1973 void CPDF_Creator::InitID(FX_BOOL bDefault) { 1975 void CPDF_Creator::InitID(FX_BOOL bDefault) {
1974 CPDF_Array* pOldIDArray = m_pParser ? m_pParser->GetIDArray() : NULL; 1976 CPDF_Array* pOldIDArray = m_pParser ? m_pParser->GetIDArray() : NULL;
1975 FX_BOOL bNewId = !m_pIDArray; 1977 FX_BOOL bNewId = !m_pIDArray;
1976 if (!m_pIDArray) { 1978 if (!m_pIDArray) {
1977 m_pIDArray = new CPDF_Array; 1979 m_pIDArray = new CPDF_Array;
1978 CPDF_Object* pID1 = pOldIDArray ? pOldIDArray->GetElement(0) : NULL; 1980 CPDF_Object* pID1 = pOldIDArray ? pOldIDArray->GetElement(0) : NULL;
1979 if (pID1) { 1981 if (pID1) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 m_bNewCrypto = FALSE; 2067 m_bNewCrypto = FALSE;
2066 if (!m_bStandardSecurity) { 2068 if (!m_bStandardSecurity) {
2067 return; 2069 return;
2068 } 2070 }
2069 if (m_pEncryptDict) { 2071 if (m_pEncryptDict) {
2070 m_pEncryptDict->Release(); 2072 m_pEncryptDict->Release();
2071 m_pEncryptDict = NULL; 2073 m_pEncryptDict = NULL;
2072 } 2074 }
2073 m_bStandardSecurity = FALSE; 2075 m_bStandardSecurity = FALSE;
2074 } 2076 }
OLDNEW
« no previous file with comments | « core/include/fxge/fx_ge.h ('k') | core/src/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698