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

Side by Side Diff: fpdfsdk/formfiller/cffl_checkbox.cpp

Issue 2357203003: Make the I in IFormFiller explicit (Closed)
Patch Set: Remove locals Created 4 years, 3 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/cpdfsdk_interform.cpp ('k') | fpdfsdk/formfiller/cffl_combobox.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 "fpdfsdk/formfiller/cffl_checkbox.h" 7 #include "fpdfsdk/formfiller/cffl_checkbox.h"
8 8
9 #include "fpdfsdk/formfiller/cffl_formfiller.h" 9 #include "fpdfsdk/formfiller/cffl_formfiller.h"
10 #include "fpdfsdk/include/cpdfsdk_environment.h" 10 #include "fpdfsdk/include/cpdfsdk_environment.h"
(...skipping 24 matching lines...) Expand all
35 default: 35 default:
36 return CFFL_FormFiller::OnKeyDown(pAnnot, nKeyCode, nFlags); 36 return CFFL_FormFiller::OnKeyDown(pAnnot, nKeyCode, nFlags);
37 } 37 }
38 } 38 }
39 FX_BOOL CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot, 39 FX_BOOL CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot,
40 uint32_t nChar, 40 uint32_t nChar,
41 uint32_t nFlags) { 41 uint32_t nFlags) {
42 switch (nChar) { 42 switch (nChar) {
43 case FWL_VKEY_Return: 43 case FWL_VKEY_Return:
44 case FWL_VKEY_Space: { 44 case FWL_VKEY_Space: {
45 CFFL_IFormFiller* pIFormFiller = m_pEnv->GetIFormFiller();
46 ASSERT(pIFormFiller);
47
48 CPDFSDK_PageView* pPageView = pAnnot->GetPageView(); 45 CPDFSDK_PageView* pPageView = pAnnot->GetPageView();
49 ASSERT(pPageView); 46 ASSERT(pPageView);
50 47
51 FX_BOOL bReset = FALSE; 48 FX_BOOL bReset = FALSE;
52 FX_BOOL bExit = FALSE; 49 FX_BOOL bExit = FALSE;
53 50 m_pEnv->GetInteractiveFormFiller()->OnButtonUp(m_pWidget, pPageView,
54 pIFormFiller->OnButtonUp(m_pWidget, pPageView, bReset, bExit, nFlags); 51 bReset, bExit, nFlags);
55
56 if (bReset) 52 if (bReset)
57 return TRUE; 53 return TRUE;
58 if (bExit) 54 if (bExit)
59 return TRUE; 55 return TRUE;
60 56
61 CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags); 57 CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
62 58
63 if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, TRUE)) 59 if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, TRUE))
64 pWnd->SetCheck(!pWnd->IsChecked()); 60 pWnd->SetCheck(!pWnd->IsChecked());
65 61
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 104 }
109 } 105 }
110 } 106 }
111 } 107 }
112 108
113 m_pWidget->SetCheck(bNewChecked, false); 109 m_pWidget->SetCheck(bNewChecked, false);
114 m_pWidget->UpdateField(); 110 m_pWidget->UpdateField();
115 SetChangeMark(); 111 SetChangeMark();
116 } 112 }
117 } 113 }
OLDNEW
« no previous file with comments | « fpdfsdk/cpdfsdk_interform.cpp ('k') | fpdfsdk/formfiller/cffl_combobox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698