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

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

Issue 1472363003: XFA: More underlying types (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Missing include 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/src/formfiller/FFL_FormFiller.cpp ('k') | fpdfsdk/src/fpdfformfill.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_TextField.h" 8 #include "fpdfsdk/include/formfiller/FFL_TextField.h"
9 9
10 /* ------------------------------- CFFL_TextField 10 /* ------------------------------- CFFL_TextField
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 FX_BOOL CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, 112 FX_BOOL CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot,
113 FX_UINT nChar, 113 FX_UINT nChar,
114 FX_UINT nFlags) { 114 FX_UINT nFlags) {
115 switch (nChar) { 115 switch (nChar) {
116 case FWL_VKEY_Return: 116 case FWL_VKEY_Return:
117 if (!(m_pWidget->GetFieldFlags() & FIELDFLAG_MULTILINE)) { 117 if (!(m_pWidget->GetFieldFlags() & FIELDFLAG_MULTILINE)) {
118 CPDFSDK_PageView* pPageView = GetCurPageView(); 118 CPDFSDK_PageView* pPageView = GetCurPageView();
119 ASSERT(pPageView != NULL); 119 ASSERT(pPageView != NULL);
120 m_bValid = !m_bValid; 120 m_bValid = !m_bValid;
121 CPDF_Rect rcAnnot = pAnnot->GetRect(); 121 CPDF_Rect rcAnnot = pAnnot->GetRect();
122 m_pApp->FFI_Invalidate(pAnnot->GetPDFXFAPage(), rcAnnot.left, 122 m_pApp->FFI_Invalidate(pAnnot->GetUnderlyingPage(), rcAnnot.left,
123 rcAnnot.top, rcAnnot.right, rcAnnot.bottom); 123 rcAnnot.top, rcAnnot.right, rcAnnot.bottom);
124 124
125 if (m_bValid) { 125 if (m_bValid) {
126 if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, TRUE)) 126 if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, TRUE))
127 pWnd->SetFocus(); 127 pWnd->SetFocus();
128 } else { 128 } else {
129 if (CommitData(pPageView, nFlags)) { 129 if (CommitData(pPageView, nFlags)) {
130 DestroyPDFWindow(pPageView); 130 DestroyPDFWindow(pPageView);
131 return TRUE; 131 return TRUE;
132 } 132 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, 294 m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer,
295 nCharacters, TRUE); 295 nCharacters, TRUE);
296 296
297 pEdit->SetEditNotify(this); 297 pEdit->SetEditNotify(this);
298 } 298 }
299 } 299 }
300 300
301 void CFFL_TextField::OnKillFocus(CPWL_Wnd* pWnd) {} 301 void CFFL_TextField::OnKillFocus(CPWL_Wnd* pWnd) {}
302 302
303 void CFFL_TextField::OnAddUndo(CPWL_Edit* pEdit) {} 303 void CFFL_TextField::OnAddUndo(CPWL_Edit* pEdit) {}
OLDNEW
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_FormFiller.cpp ('k') | fpdfsdk/src/fpdfformfill.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698