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

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

Issue 1411423002: Merge to XFA: Remove dead code that was reactivated when fixing overrides. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: fix up mismatches, round 2 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 FX_BOOL CFFL_ComboBox::IsFieldFull(CPDFSDK_PageView* pPageView) { 259 FX_BOOL CFFL_ComboBox::IsFieldFull(CPDFSDK_PageView* pPageView) {
278 if (CPWL_ComboBox* pComboBox = 260 if (CPWL_ComboBox* pComboBox =
279 (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE)) { 261 (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE)) {
280 if (CPWL_Edit* pEdit = (CPWL_Edit*)*pComboBox) { 262 if (CPWL_Edit* pEdit = (CPWL_Edit*)*pComboBox) {
281 return pEdit->IsTextFull(); 263 return pEdit->IsTextFull();
282 } 264 }
283 } 265 }
284 266
285 return FALSE; 267 return FALSE;
286 } 268 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 if (nExport >= 0) { 310 if (nExport >= 0) {
329 if (CPDF_FormField* pFormField = m_pWidget->GetFormField()) { 311 if (CPDF_FormField* pFormField = m_pWidget->GetFormField()) {
330 swRet = pFormField->GetOptionValue(nExport); 312 swRet = pFormField->GetOptionValue(nExport);
331 if (swRet.IsEmpty()) 313 if (swRet.IsEmpty())
332 swRet = pFormField->GetOptionLabel(nExport); 314 swRet = pFormField->GetOptionLabel(nExport);
333 } 315 }
334 } 316 }
335 317
336 return swRet; 318 return swRet;
337 } 319 }
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