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

Side by Side Diff: fpdfsdk/cpdfsdk_formfillenvironment.cpp

Issue 2449783008: Fix one more FX_BOOL / int issue in fpdfsdk (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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 "fpdfsdk/cpdfsdk_formfillenvironment.h" 7 #include "fpdfsdk/cpdfsdk_formfillenvironment.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 dstRect.left = static_cast<float>(left); 423 dstRect.left = static_cast<float>(left);
424 dstRect.top = static_cast<float>(top < bottom ? bottom : top); 424 dstRect.top = static_cast<float>(top < bottom ? bottom : top);
425 dstRect.bottom = static_cast<float>(top < bottom ? top : bottom); 425 dstRect.bottom = static_cast<float>(top < bottom ? top : bottom);
426 dstRect.right = static_cast<float>(right); 426 dstRect.right = static_cast<float>(right);
427 } 427 }
428 428
429 FX_BOOL CPDFSDK_FormFillEnvironment::PopupMenu(FPDF_PAGE page, 429 FX_BOOL CPDFSDK_FormFillEnvironment::PopupMenu(FPDF_PAGE page,
430 FPDF_WIDGET hWidget, 430 FPDF_WIDGET hWidget,
431 int menuFlag, 431 int menuFlag,
432 CFX_PointF pt) { 432 CFX_PointF pt) {
433 if (!m_pInfo || !m_pInfo->FFI_PopupMenu) 433 return m_pInfo && m_pInfo->FFI_PopupMenu &&
434 return FALSE; 434 m_pInfo->FFI_PopupMenu(m_pInfo, page, hWidget, menuFlag, pt.x, pt.y);
435 return m_pInfo->FFI_PopupMenu(m_pInfo, page, hWidget, menuFlag, pt.x, pt.y);
436 } 435 }
437 436
438 void CPDFSDK_FormFillEnvironment::Alert(FPDF_WIDESTRING Msg, 437 void CPDFSDK_FormFillEnvironment::Alert(FPDF_WIDESTRING Msg,
439 FPDF_WIDESTRING Title, 438 FPDF_WIDESTRING Title,
440 int Type, 439 int Type,
441 int Icon) { 440 int Icon) {
442 if (m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->app_alert) { 441 if (m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->app_alert) {
443 m_pInfo->m_pJsPlatform->app_alert(m_pInfo->m_pJsPlatform, Msg, Title, Type, 442 m_pInfo->m_pJsPlatform->app_alert(m_pInfo->m_pJsPlatform, Msg, Title, Type,
444 Icon); 443 Icon);
445 } 444 }
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 } else { 760 } else {
762 m_pFocusAnnot.Reset(pFocusAnnot.Get()); 761 m_pFocusAnnot.Reset(pFocusAnnot.Get());
763 } 762 }
764 } 763 }
765 return FALSE; 764 return FALSE;
766 } 765 }
767 766
768 FX_BOOL CPDFSDK_FormFillEnvironment::GetPermissions(int nFlag) { 767 FX_BOOL CPDFSDK_FormFillEnvironment::GetPermissions(int nFlag) {
769 return !!(GetPDFDocument()->GetUserPermissions() & nFlag); 768 return !!(GetPDFDocument()->GetUserPermissions() & nFlag);
770 } 769 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698