| 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 "core/fpdfdoc/include/cpdf_formfield.h" | 7 #include "core/fpdfdoc/include/cpdf_formfield.h" |
| 8 | 8 |
| 9 #include "core/fpdfapi/fpdf_parser/include/cfdf_document.h" | 9 #include "core/fpdfapi/fpdf_parser/include/cfdf_document.h" |
| 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
| (...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 880 } | 880 } |
| 881 pArray->InsertAt(i, new CPDF_Number(iOptIndex)); | 881 pArray->InsertAt(i, new CPDF_Number(iOptIndex)); |
| 882 bReturn = TRUE; | 882 bReturn = TRUE; |
| 883 break; | 883 break; |
| 884 } | 884 } |
| 885 } | 885 } |
| 886 if (!bReturn) { | 886 if (!bReturn) { |
| 887 if (bSelected) | 887 if (bSelected) |
| 888 pArray->AddInteger(iOptIndex); | 888 pArray->AddInteger(iOptIndex); |
| 889 | 889 |
| 890 if (pArray->GetCount() == 0) | 890 if (pArray->IsEmpty()) |
| 891 m_pDict->RemoveAt("I"); | 891 m_pDict->RemoveAt("I"); |
| 892 } | 892 } |
| 893 if (bNotify) | 893 if (bNotify) |
| 894 NotifyListOrComboBoxAfterChange(); | 894 NotifyListOrComboBoxAfterChange(); |
| 895 | 895 |
| 896 return TRUE; | 896 return TRUE; |
| 897 } | 897 } |
| 898 | 898 |
| 899 FX_BOOL CPDF_FormField::ClearSelectedOptions(FX_BOOL bNotify) { | 899 FX_BOOL CPDF_FormField::ClearSelectedOptions(FX_BOOL bNotify) { |
| 900 if (bNotify && m_pForm->m_pFormNotify) { | 900 if (bNotify && m_pForm->m_pFormNotify) { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 case ListBox: | 988 case ListBox: |
| 989 NotifyAfterSelectionChange(); | 989 NotifyAfterSelectionChange(); |
| 990 break; | 990 break; |
| 991 case ComboBox: | 991 case ComboBox: |
| 992 NotifyAfterValueChange(); | 992 NotifyAfterValueChange(); |
| 993 break; | 993 break; |
| 994 default: | 994 default: |
| 995 break; | 995 break; |
| 996 } | 996 } |
| 997 } | 997 } |
| OLD | NEW |