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

Side by Side Diff: fpdfsdk/src/formfiller/FFL_CheckBox.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
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 "fpdfsdk/include/formfiller/FFL_CheckBox.h" 7 #include "fpdfsdk/include/formfiller/FFL_CheckBox.h"
8 8
9 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" 9 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h"
10 #include "fpdfsdk/include/fsdk_mgr.h" 10 #include "fpdfsdk/include/fsdk_mgr.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return TRUE; 89 return TRUE;
90 } 90 }
91 91
92 FX_BOOL CFFL_CheckBox::IsDataChanged(CPDFSDK_PageView* pPageView) { 92 FX_BOOL CFFL_CheckBox::IsDataChanged(CPDFSDK_PageView* pPageView) {
93 CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, FALSE); 93 CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, FALSE);
94 return pWnd && pWnd->IsChecked() != m_pWidget->IsChecked(); 94 return pWnd && pWnd->IsChecked() != m_pWidget->IsChecked();
95 } 95 }
96 96
97 void CFFL_CheckBox::SaveData(CPDFSDK_PageView* pPageView) { 97 void CFFL_CheckBox::SaveData(CPDFSDK_PageView* pPageView) {
98 if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, FALSE)) { 98 if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, FALSE)) {
99 FX_BOOL bNewChecked = pWnd->IsChecked(); 99 bool bNewChecked = pWnd->IsChecked();
100 100
101 if (bNewChecked) { 101 if (bNewChecked) {
102 CPDF_FormField* pField = m_pWidget->GetFormField(); 102 CPDF_FormField* pField = m_pWidget->GetFormField();
103 for (int32_t i = 0, sz = pField->CountControls(); i < sz; i++) { 103 for (int32_t i = 0, sz = pField->CountControls(); i < sz; i++) {
104 if (CPDF_FormControl* pCtrl = pField->GetControl(i)) { 104 if (CPDF_FormControl* pCtrl = pField->GetControl(i)) {
105 if (pCtrl->IsChecked()) { 105 if (pCtrl->IsChecked()) {
106 break; 106 break;
107 } 107 }
108 } 108 }
109 } 109 }
110 } 110 }
111 111
112 m_pWidget->SetCheck(bNewChecked, FALSE); 112 m_pWidget->SetCheck(bNewChecked, false);
113 m_pWidget->UpdateField(); 113 m_pWidget->UpdateField();
114 SetChangeMark(); 114 SetChangeMark();
115 } 115 }
116 } 116 }
OLDNEW
« no previous file with comments | « fpdfsdk/include/pdfwindow/PWL_SpecialButton.h ('k') | fpdfsdk/src/formfiller/FFL_RadioButton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698