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

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

Issue 1477583002: Inflict PDF_ENABLE_XFA ifdefs on XFA fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Remove fsdk_actionhandler.cpp 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
259 FX_BOOL CFFL_ComboBox::IsFieldFull(CPDFSDK_PageView* pPageView) { 260 FX_BOOL CFFL_ComboBox::IsFieldFull(CPDFSDK_PageView* pPageView) {
260 if (CPWL_ComboBox* pComboBox = 261 if (CPWL_ComboBox* pComboBox =
261 static_cast<CPWL_ComboBox*>(GetPDFWindow(pPageView, FALSE))) { 262 static_cast<CPWL_ComboBox*>(GetPDFWindow(pPageView, FALSE))) {
262 if (CPWL_Edit* pEdit = pComboBox->GetEdit()) 263 if (CPWL_Edit* pEdit = pComboBox->GetEdit())
263 return pEdit->IsTextFull(); 264 return pEdit->IsTextFull();
264 } 265 }
265 return FALSE; 266 return FALSE;
266 } 267 }
267 268
269 #endif
268 void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) { 270 void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) {
269 ASSERT(m_pApp != NULL); 271 ASSERT(m_pApp != NULL);
270 272
271 ASSERT(pWnd != NULL); 273 ASSERT(pWnd != NULL);
272 274
273 if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) { 275 if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) {
274 CPWL_Edit* pEdit = (CPWL_Edit*)pWnd; 276 CPWL_Edit* pEdit = (CPWL_Edit*)pWnd;
275 pEdit->SetCharSet(134); 277 pEdit->SetCharSet(134);
276 pEdit->SetCodePage(936); 278 pEdit->SetCodePage(936);
277 279
(...skipping 30 matching lines...) Expand all
308 if (nExport >= 0) { 310 if (nExport >= 0) {
309 if (CPDF_FormField* pFormField = m_pWidget->GetFormField()) { 311 if (CPDF_FormField* pFormField = m_pWidget->GetFormField()) {
310 swRet = pFormField->GetOptionValue(nExport); 312 swRet = pFormField->GetOptionValue(nExport);
311 if (swRet.IsEmpty()) 313 if (swRet.IsEmpty())
312 swRet = pFormField->GetOptionLabel(nExport); 314 swRet = pFormField->GetOptionLabel(nExport);
313 } 315 }
314 } 316 }
315 317
316 return swRet; 318 return swRet;
317 } 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