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

Side by Side Diff: fpdfsdk/src/formfiller/FFL_ComboBox.cpp

Issue 1409743004: Remove dead code that was reactivated when fixing overrides. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 5 years, 2 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/include/pdfwindow/PWL_Edit.h ('k') | fpdfsdk/src/formfiller/FFL_FormFiller.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 "../../include/formfiller/FormFiller.h" 7 #include "../../include/formfiller/FormFiller.h"
8 #include "../../include/formfiller/FFL_FormFiller.h" 8 #include "../../include/formfiller/FFL_FormFiller.h"
9 #include "../../include/formfiller/FFL_IFormFiller.h" 9 #include "../../include/formfiller/FFL_IFormFiller.h"
10 #include "../../include/formfiller/FFL_CBA_Fontmap.h" 10 #include "../../include/formfiller/FFL_CBA_Fontmap.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 RestoreState(pPageView); 249 RestoreState(pPageView);
250 pRet = GetPDFWindow(pPageView, FALSE); 250 pRet = GetPDFWindow(pPageView, FALSE);
251 } else 251 } else
252 pRet = GetPDFWindow(pPageView, TRUE); 252 pRet = GetPDFWindow(pPageView, TRUE);
253 253
254 m_pWidget->UpdateField(); 254 m_pWidget->UpdateField();
255 255
256 return pRet; 256 return pRet;
257 } 257 }
258 258
259 void CFFL_ComboBox::OnKeyStroke(FX_BOOL bKeyDown, FX_UINT nFlag) {
260 ASSERT(m_pWidget != NULL);
261
262 int nFlags = m_pWidget->GetFieldFlags();
263
264 if (nFlags & FIELDFLAG_COMMITONSELCHANGE) {
265 if (m_bValid) {
266 CPDFSDK_PageView* pPageView = GetCurPageView();
267 ASSERT(pPageView != NULL);
268
269 if (CommitData(pPageView, nFlag)) {
270 DestroyPDFWindow(pPageView);
271 m_bValid = FALSE;
272 }
273 }
274 }
275 }
276
277 void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) { 259 void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) {
278 ASSERT(m_pApp != NULL); 260 ASSERT(m_pApp != NULL);
279 261
280 ASSERT(pWnd != NULL); 262 ASSERT(pWnd != NULL);
281 263
282 if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) { 264 if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) {
283 CPWL_Edit* pEdit = (CPWL_Edit*)pWnd; 265 CPWL_Edit* pEdit = (CPWL_Edit*)pWnd;
284 pEdit->SetCharSet(134); 266 pEdit->SetCharSet(134);
285 pEdit->SetCodePage(936); 267 pEdit->SetCodePage(936);
286 268
(...skipping 30 matching lines...) Expand all
317 if (nExport >= 0) { 299 if (nExport >= 0) {
318 if (CPDF_FormField* pFormField = m_pWidget->GetFormField()) { 300 if (CPDF_FormField* pFormField = m_pWidget->GetFormField()) {
319 swRet = pFormField->GetOptionValue(nExport); 301 swRet = pFormField->GetOptionValue(nExport);
320 if (swRet.IsEmpty()) 302 if (swRet.IsEmpty())
321 swRet = pFormField->GetOptionLabel(nExport); 303 swRet = pFormField->GetOptionLabel(nExport);
322 } 304 }
323 } 305 }
324 306
325 return swRet; 307 return swRet;
326 } 308 }
OLDNEW
« no previous file with comments | « fpdfsdk/include/pdfwindow/PWL_Edit.h ('k') | fpdfsdk/src/formfiller/FFL_FormFiller.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698