| 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/formfiller/cffl_iformfiller.h" | 7 #include "fpdfsdk/formfiller/cffl_iformfiller.h" |
| 8 | 8 |
| 9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" | 9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" |
| 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 | 709 |
| 710 void CFFL_IFormFiller::OnFormat(CPDFSDK_Widget* pWidget, | 710 void CFFL_IFormFiller::OnFormat(CPDFSDK_Widget* pWidget, |
| 711 CPDFSDK_PageView* pPageView, | 711 CPDFSDK_PageView* pPageView, |
| 712 FX_BOOL& bExit, | 712 FX_BOOL& bExit, |
| 713 uint32_t nFlag) { | 713 uint32_t nFlag) { |
| 714 if (!m_bNotifying) { | 714 if (!m_bNotifying) { |
| 715 ASSERT(pWidget); | 715 ASSERT(pWidget); |
| 716 CPDFSDK_Document* pDocument = pPageView->GetSDKDocument(); | 716 CPDFSDK_Document* pDocument = pPageView->GetSDKDocument(); |
| 717 CPDFSDK_InterForm* pInterForm = pDocument->GetInterForm(); | 717 CPDFSDK_InterForm* pInterForm = pDocument->GetInterForm(); |
| 718 | 718 |
| 719 FX_BOOL bFormated = FALSE; | 719 FX_BOOL bFormatted = FALSE; |
| 720 CFX_WideString sValue = | 720 CFX_WideString sValue = |
| 721 pInterForm->OnFormat(pWidget->GetFormField(), bFormated); | 721 pInterForm->OnFormat(pWidget->GetFormField(), bFormatted); |
| 722 | 722 |
| 723 if (bExit) | 723 if (bExit) |
| 724 return; | 724 return; |
| 725 | 725 |
| 726 if (bFormated) { | 726 if (bFormatted) { |
| 727 pInterForm->ResetFieldAppearance(pWidget->GetFormField(), sValue.c_str(), | 727 pInterForm->ResetFieldAppearance(pWidget->GetFormField(), sValue.c_str(), |
| 728 TRUE); | 728 TRUE); |
| 729 pInterForm->UpdateField(pWidget->GetFormField()); | 729 pInterForm->UpdateField(pWidget->GetFormField()); |
| 730 } | 730 } |
| 731 | 731 |
| 732 m_bNotifying = FALSE; | 732 m_bNotifying = FALSE; |
| 733 } | 733 } |
| 734 } | 734 } |
| 735 | 735 |
| 736 #ifdef PDF_ENABLE_XFA | 736 #ifdef PDF_ENABLE_XFA |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 bExit = TRUE; | 997 bExit = TRUE; |
| 998 m_bNotifying = FALSE; | 998 m_bNotifying = FALSE; |
| 999 return; | 999 return; |
| 1000 } | 1000 } |
| 1001 } | 1001 } |
| 1002 | 1002 |
| 1003 m_bNotifying = FALSE; | 1003 m_bNotifying = FALSE; |
| 1004 } | 1004 } |
| 1005 } | 1005 } |
| 1006 } | 1006 } |
| OLD | NEW |