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

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

Issue 1272653005: clang-format all pdfium code, again. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 4 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
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/include/fxcodec/fx_codec.h" 7 #include "../../core/include/fxcodec/fx_codec.h"
8 #include "../../core/include/fxcrt/fx_safe_types.h" 8 #include "../../core/include/fxcrt/fx_safe_types.h"
9 #include "../../public/fpdf_ext.h" 9 #include "../../public/fpdf_ext.h"
10 #include "../../public/fpdf_progressive.h" 10 #include "../../public/fpdf_progressive.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 break; 148 break;
149 } 149 }
150 SetLastError(err_code); 150 SetLastError(err_code);
151 } 151 }
152 152
153 DLLEXPORT void STDCALL FPDF_SetSandBoxPolicy(FPDF_DWORD policy, 153 DLLEXPORT void STDCALL FPDF_SetSandBoxPolicy(FPDF_DWORD policy,
154 FPDF_BOOL enable) { 154 FPDF_BOOL enable) {
155 return FSDK_SetSandBoxPolicy(policy, enable); 155 return FSDK_SetSandBoxPolicy(policy, enable);
156 } 156 }
157 157
158
159 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path, 158 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path,
160 FPDF_BYTESTRING password) { 159 FPDF_BYTESTRING password) {
161 // NOTE: the creation of the file needs to be by the embedder on the 160 // NOTE: the creation of the file needs to be by the embedder on the
162 // other side of this API. 161 // other side of this API.
163 IFX_FileRead* pFileAccess = FX_CreateFileRead((const FX_CHAR*)file_path); 162 IFX_FileRead* pFileAccess = FX_CreateFileRead((const FX_CHAR*)file_path);
164 if (!pFileAccess) { 163 if (!pFileAccess) {
165 return nullptr; 164 return nullptr;
166 } 165 }
167 166
168 CPDF_Parser* pParser = new CPDF_Parser; 167 CPDF_Parser* pParser = new CPDF_Parser;
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 if (!buffer) { 907 if (!buffer) {
909 *buflen = len; 908 *buflen = len;
910 } else if (*buflen >= len) { 909 } else if (*buflen >= len) {
911 memcpy(buffer, utf16Name.c_str(), len); 910 memcpy(buffer, utf16Name.c_str(), len);
912 *buflen = len; 911 *buflen = len;
913 } else { 912 } else {
914 *buflen = -1; 913 *buflen = -1;
915 } 914 }
916 return (FPDF_DEST)pDestObj; 915 return (FPDF_DEST)pDestObj;
917 } 916 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698