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

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

Issue 2338303002: Remove FFI_ from CPDFSDK_Environment method names (Closed)
Patch Set: Review feedback 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_pageview.cpp ('k') | fpdfsdk/formfiller/cffl_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/formfiller/cffl_combobox.h" 7 #include "fpdfsdk/formfiller/cffl_combobox.h"
8 8
9 #include "fpdfsdk/formfiller/cba_fontmap.h" 9 #include "fpdfsdk/formfiller/cba_fontmap.h"
10 #include "fpdfsdk/formfiller/cffl_formfiller.h" 10 #include "fpdfsdk/formfiller/cffl_formfiller.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) { 264 if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) {
265 CPWL_Edit* pEdit = (CPWL_Edit*)pWnd; 265 CPWL_Edit* pEdit = (CPWL_Edit*)pWnd;
266 pEdit->SetCharSet(FXFONT_GB2312_CHARSET); 266 pEdit->SetCharSet(FXFONT_GB2312_CHARSET);
267 pEdit->SetCodePage(936); 267 pEdit->SetCodePage(936);
268 268
269 pEdit->SetReadyToInput(); 269 pEdit->SetReadyToInput();
270 CFX_WideString wsText = pEdit->GetText(); 270 CFX_WideString wsText = pEdit->GetText();
271 int nCharacters = wsText.GetLength(); 271 int nCharacters = wsText.GetLength();
272 CFX_ByteString bsUTFText = wsText.UTF16LE_Encode(); 272 CFX_ByteString bsUTFText = wsText.UTF16LE_Encode();
273 unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str(); 273 unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str();
274 m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, 274 m_pApp->OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer,
275 nCharacters, TRUE); 275 nCharacters, TRUE);
276 } 276 }
277 } 277 }
278 278
279 CFX_WideString CFFL_ComboBox::GetSelectExportText() { 279 CFX_WideString CFFL_ComboBox::GetSelectExportText() {
280 CFX_WideString swRet; 280 CFX_WideString swRet;
281 281
282 int nExport = -1; 282 int nExport = -1;
283 CPDFSDK_PageView* pPageView = GetCurPageView(true); 283 CPDFSDK_PageView* pPageView = GetCurPageView(true);
284 if (CPWL_ComboBox* pComboBox = 284 if (CPWL_ComboBox* pComboBox =
285 (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE)) { 285 (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE)) {
286 nExport = pComboBox->GetSelect(); 286 nExport = pComboBox->GetSelect();
287 } 287 }
288 288
289 if (nExport >= 0) { 289 if (nExport >= 0) {
290 if (CPDF_FormField* pFormField = m_pWidget->GetFormField()) { 290 if (CPDF_FormField* pFormField = m_pWidget->GetFormField()) {
291 swRet = pFormField->GetOptionValue(nExport); 291 swRet = pFormField->GetOptionValue(nExport);
292 if (swRet.IsEmpty()) 292 if (swRet.IsEmpty())
293 swRet = pFormField->GetOptionLabel(nExport); 293 swRet = pFormField->GetOptionLabel(nExport);
294 } 294 }
295 } 295 }
296 296
297 return swRet; 297 return swRet;
298 } 298 }
OLDNEW
« no previous file with comments | « fpdfsdk/cpdfsdk_pageview.cpp ('k') | fpdfsdk/formfiller/cffl_formfiller.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698