OLD | NEW |
---|---|
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_TextField.h" | 7 #include "fpdfsdk/include/formfiller/FFL_TextField.h" |
8 | 8 |
9 #include "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h" | 9 #include "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h" |
10 #include "fpdfsdk/include/fsdk_common.h" | 10 #include "fpdfsdk/include/fsdk_common.h" |
11 #include "fpdfsdk/include/fsdk_mgr.h" | 11 #include "fpdfsdk/include/fsdk_mgr.h" |
12 | 12 |
13 CFFL_TextField::CFFL_TextField(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot) | 13 CFFL_TextField::CFFL_TextField(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot) |
14 : CFFL_FormFiller(pApp, pAnnot), m_pFontMap(NULL) { | 14 : CFFL_FormFiller(pApp, pAnnot), m_pFontMap(NULL) { |
15 m_State.nStart = m_State.nEnd = 0; | 15 m_State.nStart = m_State.nEnd = 0; |
16 } | 16 } |
17 | 17 |
18 CFFL_TextField::~CFFL_TextField() { | 18 CFFL_TextField::~CFFL_TextField() { |
19 for (auto& it : m_Maps) { | |
20 CPWL_Wnd* pWnd = it.second; | |
Tom Sepez
2016/01/06 19:58:26
nitto
Lei Zhang
2016/01/06 22:08:38
Done.
| |
21 pWnd->InvalidateFocusHandler(this); | |
22 } | |
19 delete m_pFontMap; | 23 delete m_pFontMap; |
20 } | 24 } |
21 | 25 |
22 PWL_CREATEPARAM CFFL_TextField::GetCreateParam() { | 26 PWL_CREATEPARAM CFFL_TextField::GetCreateParam() { |
23 PWL_CREATEPARAM cp = CFFL_FormFiller::GetCreateParam(); | 27 PWL_CREATEPARAM cp = CFFL_FormFiller::GetCreateParam(); |
24 | 28 |
25 int nFlags = m_pWidget->GetFieldFlags(); | 29 int nFlags = m_pWidget->GetFieldFlags(); |
26 | 30 |
27 if (nFlags & FIELDFLAG_PASSWORD) { | 31 if (nFlags & FIELDFLAG_PASSWORD) { |
28 cp.dwFlags |= PES_PASSWORD; | 32 cp.dwFlags |= PES_PASSWORD; |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
271 m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, | 275 m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, |
272 nCharacters, TRUE); | 276 nCharacters, TRUE); |
273 | 277 |
274 pEdit->SetEditNotify(this); | 278 pEdit->SetEditNotify(this); |
275 } | 279 } |
276 } | 280 } |
277 | 281 |
278 void CFFL_TextField::OnKillFocus(CPWL_Wnd* pWnd) {} | 282 void CFFL_TextField::OnKillFocus(CPWL_Wnd* pWnd) {} |
279 | 283 |
280 void CFFL_TextField::OnAddUndo(CPWL_Edit* pEdit) {} | 284 void CFFL_TextField::OnAddUndo(CPWL_Edit* pEdit) {} |
OLD | NEW |