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

Side by Side Diff: fpdfsdk/src/fpdf_dataavail.cpp

Issue 1254703002: FX_BOOL considered harmful, part 2. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 5 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 | « fpdfsdk/src/formfiller/FFL_Utils.cpp ('k') | fpdfsdk/src/fpdf_ext.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 "../../public/fpdf_dataavail.h" 7 #include "../../public/fpdf_dataavail.h"
8 #include "../include/fsdk_define.h" 8 #include "../include/fsdk_define.h"
9 9
10 extern void ProcessParseError(FX_DWORD err_code); 10 extern void ProcessParseError(FX_DWORD err_code);
11 class CFPDF_FileAvailWrap : public IFX_FileAvail 11 class CFPDF_FileAvailWrap : public IFX_FileAvail
12 { 12 {
13 public: 13 public:
14 CFPDF_FileAvailWrap() 14 CFPDF_FileAvailWrap()
15 { 15 {
16 m_pfileAvail = NULL; 16 m_pfileAvail = NULL;
17 } 17 }
18 18
19 void Set(FX_FILEAVAIL* pfileAvail) 19 void Set(FX_FILEAVAIL* pfileAvail)
20 { 20 {
21 m_pfileAvail = pfileAvail; 21 m_pfileAvail = pfileAvail;
22 } 22 }
23 23
24 » virtual FX_BOOL»» » IsDataAvail( FX_FILESIZE offset, FX_DWOR D size) 24 » virtual bool» » » IsDataAvail( FX_FILESIZE offset, FX_DWOR D size)
25 { 25 {
26 return m_pfileAvail->IsDataAvail(m_pfileAvail, offset, size); 26 return m_pfileAvail->IsDataAvail(m_pfileAvail, offset, size);
27 } 27 }
28 28
29 private: 29 private:
30 FX_FILEAVAIL* m_pfileAvail; 30 FX_FILEAVAIL* m_pfileAvail;
31 }; 31 };
32 32
33 class CFPDF_FileAccessWrap : public IFX_FileRead 33 class CFPDF_FileAccessWrap : public IFX_FileRead
34 { 34 {
35 public: 35 public:
36 CFPDF_FileAccessWrap() 36 CFPDF_FileAccessWrap()
37 { 37 {
38 m_pFileAccess = NULL; 38 m_pFileAccess = NULL;
39 } 39 }
40 40
41 void Set(FPDF_FILEACCESS* pFile) 41 void Set(FPDF_FILEACCESS* pFile)
42 { 42 {
43 m_pFileAccess = pFile; 43 m_pFileAccess = pFile;
44 } 44 }
45 45
46 virtual FX_FILESIZE GetSize() 46 virtual FX_FILESIZE GetSize()
47 { 47 {
48 return m_pFileAccess->m_FileLen; 48 return m_pFileAccess->m_FileLen;
49 } 49 }
50 50
51 » virtual FX_BOOL»» » ReadBlock(void* buffer, FX_FILESIZE offs et, size_t size) 51 » virtual bool» » » ReadBlock(void* buffer, FX_FILESIZE offs et, size_t size)
52 { 52 {
53 return m_pFileAccess->m_GetBlock(m_pFileAccess->m_Param, offset, (uint8_t*)buffer, size); 53 return m_pFileAccess->m_GetBlock(m_pFileAccess->m_Param, offset, (uint8_t*)buffer, size);
54 } 54 }
55 55
56 virtual void Release() 56 virtual void Release()
57 { 57 {
58 } 58 }
59 59
60 private: 60 private:
61 FPDF_FILEACCESS* m_pFileAccess; 61 FPDF_FILEACCESS* m_pFileAccess;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 CFPDF_DownloadHintsWrap hints_wrap(hints); 155 CFPDF_DownloadHintsWrap hints_wrap(hints);
156 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsFormAvail(&hints_wrap) ; 156 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsFormAvail(&hints_wrap) ;
157 } 157 }
158 158
159 DLLEXPORT FPDF_BOOL STDCALL FPDFAvail_IsLinearized(FPDF_AVAIL avail) 159 DLLEXPORT FPDF_BOOL STDCALL FPDFAvail_IsLinearized(FPDF_AVAIL avail)
160 { 160 {
161 if (avail == NULL) return -1; 161 if (avail == NULL) return -1;
162 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsLinearizedPDF(); 162 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsLinearizedPDF();
163 163
164 } 164 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_Utils.cpp ('k') | fpdfsdk/src/fpdf_ext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698