| 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/fsdk_baseform.h" | 7 #include "fpdfsdk/include/fsdk_baseform.h" | 
| 8 | 8 | 
| 9 #include <algorithm> | 9 #include <algorithm> | 
| 10 #include <memory> | 10 #include <memory> | 
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 711   return m_bAppModified; | 711   return m_bAppModified; | 
| 712 } | 712 } | 
| 713 | 713 | 
| 714 #ifdef PDF_ENABLE_XFA | 714 #ifdef PDF_ENABLE_XFA | 
| 715 void CPDFSDK_Widget::ResetAppearance(FX_BOOL bValueChanged) { | 715 void CPDFSDK_Widget::ResetAppearance(FX_BOOL bValueChanged) { | 
| 716   switch (GetFieldType()) { | 716   switch (GetFieldType()) { | 
| 717     case FIELDTYPE_TEXTFIELD: | 717     case FIELDTYPE_TEXTFIELD: | 
| 718     case FIELDTYPE_COMBOBOX: { | 718     case FIELDTYPE_COMBOBOX: { | 
| 719       FX_BOOL bFormated = FALSE; | 719       FX_BOOL bFormated = FALSE; | 
| 720       CFX_WideString sValue = OnFormat(bFormated); | 720       CFX_WideString sValue = OnFormat(bFormated); | 
| 721       ResetAppearance(bFormated ? sValue : nullptr, TRUE); | 721       ResetAppearance(bFormated ? sValue.c_str() : nullptr, TRUE); | 
| 722     } break; | 722     } break; | 
| 723     default: | 723     default: | 
| 724       ResetAppearance(nullptr, FALSE); | 724       ResetAppearance(nullptr, FALSE); | 
| 725       break; | 725       break; | 
| 726   } | 726   } | 
| 727 } | 727 } | 
| 728 #endif  // PDF_ENABLE_XFA | 728 #endif  // PDF_ENABLE_XFA | 
| 729 | 729 | 
| 730 void CPDFSDK_Widget::ResetAppearance(const FX_WCHAR* sValue, | 730 void CPDFSDK_Widget::ResetAppearance(const FX_WCHAR* sValue, | 
| 731                                      FX_BOOL bValueChanged) { | 731                                      FX_BOOL bValueChanged) { | 
| (...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1539     } | 1539     } | 
| 1540 | 1540 | 
| 1541     int nMaxLen = pField->GetMaxLen(); | 1541     int nMaxLen = pField->GetMaxLen(); | 
| 1542     FX_BOOL bCharArray = (dwFieldFlags >> 24) & 1; | 1542     FX_BOOL bCharArray = (dwFieldFlags >> 24) & 1; | 
| 1543     FX_FLOAT fFontSize = GetFontSize(); | 1543     FX_FLOAT fFontSize = GetFontSize(); | 
| 1544 | 1544 | 
| 1545 #ifdef PDF_ENABLE_XFA | 1545 #ifdef PDF_ENABLE_XFA | 
| 1546     CFX_WideString sValueTmp; | 1546     CFX_WideString sValueTmp; | 
| 1547     if (!sValue && GetMixXFAWidget()) { | 1547     if (!sValue && GetMixXFAWidget()) { | 
| 1548       sValueTmp = GetValue(TRUE); | 1548       sValueTmp = GetValue(TRUE); | 
| 1549       sValue = sValueTmp; | 1549       sValue = sValueTmp.c_str(); | 
| 1550     } | 1550     } | 
| 1551 #endif  // PDF_ENABLE_XFA | 1551 #endif  // PDF_ENABLE_XFA | 
| 1552 | 1552 | 
| 1553     if (nMaxLen > 0) { | 1553     if (nMaxLen > 0) { | 
| 1554       if (bCharArray) { | 1554       if (bCharArray) { | 
| 1555         pEdit->SetCharArray(nMaxLen); | 1555         pEdit->SetCharArray(nMaxLen); | 
| 1556 | 1556 | 
| 1557         if (IsFloatZero(fFontSize)) { | 1557         if (IsFloatZero(fFontSize)) { | 
| 1558           fFontSize = CPWL_Edit::GetCharArrayAutoFontSize( | 1558           fFontSize = CPWL_Edit::GetCharArrayAutoFontSize( | 
| 1559               font_map.GetPDFFont(0), rcClient, nMaxLen); | 1559               font_map.GetPDFFont(0), rcClient, nMaxLen); | 
| (...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2825       break; | 2825       break; | 
| 2826     } | 2826     } | 
| 2827   } | 2827   } | 
| 2828 } | 2828 } | 
| 2829 | 2829 | 
| 2830 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { | 2830 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { | 
| 2831   CFX_FloatRect rcAnnot; | 2831   CFX_FloatRect rcAnnot; | 
| 2832   pAnnot->GetPDFAnnot()->GetRect(rcAnnot); | 2832   pAnnot->GetPDFAnnot()->GetRect(rcAnnot); | 
| 2833   return rcAnnot; | 2833   return rcAnnot; | 
| 2834 } | 2834 } | 
| OLD | NEW | 
|---|