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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 CPDFSDK_InterForm* pInterForm = pDocument->GetInterForm(); | 717 CPDFSDK_InterForm* pInterForm = pDocument->GetInterForm(); |
718 | 718 |
719 FX_BOOL bFormatted = FALSE; | 719 FX_BOOL bFormatted = FALSE; |
720 CFX_WideString sValue = | 720 CFX_WideString sValue = |
721 pInterForm->OnFormat(pWidget->GetFormField(), bFormatted); | 721 pInterForm->OnFormat(pWidget->GetFormField(), bFormatted); |
722 | 722 |
723 if (bExit) | 723 if (bExit) |
724 return; | 724 return; |
725 | 725 |
726 if (bFormatted) { | 726 if (bFormatted) { |
727 pInterForm->ResetFieldAppearance(pWidget->GetFormField(), sValue.c_str(), | 727 pInterForm->ResetFieldAppearance(pWidget->GetFormField(), &sValue, TRUE); |
728 TRUE); | |
729 pInterForm->UpdateField(pWidget->GetFormField()); | 728 pInterForm->UpdateField(pWidget->GetFormField()); |
730 } | 729 } |
731 | 730 |
732 m_bNotifying = FALSE; | 731 m_bNotifying = FALSE; |
733 } | 732 } |
734 } | 733 } |
735 | 734 |
736 #ifdef PDF_ENABLE_XFA | 735 #ifdef PDF_ENABLE_XFA |
737 void CFFL_IFormFiller::OnClick(CPDFSDK_Widget* pWidget, | 736 void CFFL_IFormFiller::OnClick(CPDFSDK_Widget* pWidget, |
738 CPDFSDK_PageView* pPageView, | 737 CPDFSDK_PageView* pPageView, |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 bExit = TRUE; | 996 bExit = TRUE; |
998 m_bNotifying = FALSE; | 997 m_bNotifying = FALSE; |
999 return; | 998 return; |
1000 } | 999 } |
1001 } | 1000 } |
1002 | 1001 |
1003 m_bNotifying = FALSE; | 1002 m_bNotifying = FALSE; |
1004 } | 1003 } |
1005 } | 1004 } |
1006 } | 1005 } |
OLD | NEW |