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

Side by Side Diff: fpdfsdk/fpdfview.cpp

Issue 1801383002: Re-enable several MSVC warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase again 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 | « fpdfsdk/fpdftext.cpp ('k') | fpdfsdk/fxedit/fxet_ap.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/fpdfview.h" 7 #include "public/fpdfview.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 void SetLastError(int err) { 275 void SetLastError(int err) {
276 g_LastError = err; 276 g_LastError = err;
277 } 277 }
278 278
279 int GetLastError() { 279 int GetLastError() {
280 return g_LastError; 280 return g_LastError;
281 } 281 }
282 #endif // _WIN32 282 #endif // _WIN32
283 283
284 void ProcessParseError(CPDF_Parser::Error err) { 284 void ProcessParseError(CPDF_Parser::Error err) {
285 FX_DWORD err_code; 285 FX_DWORD err_code = FPDF_ERR_SUCCESS;
286 // Translate FPDFAPI error code to FPDFVIEW error code 286 // Translate FPDFAPI error code to FPDFVIEW error code
287 switch (err) { 287 switch (err) {
288 case CPDF_Parser::SUCCESS: 288 case CPDF_Parser::SUCCESS:
289 err_code = FPDF_ERR_SUCCESS; 289 err_code = FPDF_ERR_SUCCESS;
290 break; 290 break;
291 case CPDF_Parser::FILE_ERROR: 291 case CPDF_Parser::FILE_ERROR:
292 err_code = FPDF_ERR_FILE; 292 err_code = FPDF_ERR_FILE;
293 break; 293 break;
294 case CPDF_Parser::FORMAT_ERROR: 294 case CPDF_Parser::FORMAT_ERROR:
295 err_code = FPDF_ERR_FORMAT; 295 err_code = FPDF_ERR_FORMAT;
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 if (!buffer) { 1158 if (!buffer) {
1159 *buflen = len; 1159 *buflen = len;
1160 } else if (*buflen >= len) { 1160 } else if (*buflen >= len) {
1161 memcpy(buffer, utf16Name.c_str(), len); 1161 memcpy(buffer, utf16Name.c_str(), len);
1162 *buflen = len; 1162 *buflen = len;
1163 } else { 1163 } else {
1164 *buflen = -1; 1164 *buflen = -1;
1165 } 1165 }
1166 return (FPDF_DEST)pDestObj; 1166 return (FPDF_DEST)pDestObj;
1167 } 1167 }
OLDNEW
« no previous file with comments | « fpdfsdk/fpdftext.cpp ('k') | fpdfsdk/fxedit/fxet_ap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698