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

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

Issue 1399273003: fpdfsdk/ differences with XFA (for didactic purposes only). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Regenerate after taking juns patch Created 5 years 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 "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h" 7 #include "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h"
8 #include "fpdfsdk/include/formfiller/FFL_ComboBox.h" 8 #include "fpdfsdk/include/formfiller/FFL_ComboBox.h"
9 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" 9 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h"
10 #include "fpdfsdk/include/formfiller/FFL_IFormFiller.h" 10 #include "fpdfsdk/include/formfiller/FFL_IFormFiller.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 #ifdef PDF_ENABLE_XFA
260 FX_BOOL CFFL_ComboBox::IsFieldFull(CPDFSDK_PageView* pPageView) {
261 if (CPWL_ComboBox* pComboBox =
262 static_cast<CPWL_ComboBox*>(GetPDFWindow(pPageView, FALSE))) {
263 if (CPWL_Edit* pEdit = pComboBox->GetEdit())
264 return pEdit->IsTextFull();
265 }
266 return FALSE;
267 }
268
269 #endif
259 void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) { 270 void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) {
260 ASSERT(m_pApp != NULL); 271 ASSERT(m_pApp != NULL);
261 272
262 ASSERT(pWnd != NULL); 273 ASSERT(pWnd != NULL);
263 274
264 if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) { 275 if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) {
265 CPWL_Edit* pEdit = (CPWL_Edit*)pWnd; 276 CPWL_Edit* pEdit = (CPWL_Edit*)pWnd;
266 pEdit->SetCharSet(134); 277 pEdit->SetCharSet(134);
267 pEdit->SetCodePage(936); 278 pEdit->SetCodePage(936);
268 279
(...skipping 30 matching lines...) Expand all
299 if (nExport >= 0) { 310 if (nExport >= 0) {
300 if (CPDF_FormField* pFormField = m_pWidget->GetFormField()) { 311 if (CPDF_FormField* pFormField = m_pWidget->GetFormField()) {
301 swRet = pFormField->GetOptionValue(nExport); 312 swRet = pFormField->GetOptionValue(nExport);
302 if (swRet.IsEmpty()) 313 if (swRet.IsEmpty())
303 swRet = pFormField->GetOptionLabel(nExport); 314 swRet = pFormField->GetOptionLabel(nExport);
304 } 315 }
305 } 316 }
306 317
307 return swRet; 318 return swRet;
308 } 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