Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: core/fpdfdoc/cpdf_formfield.cpp

Issue 2226113002: Add CPDF_Array::IsEmpty(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add CPDF_Array::IsEmpty(). Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fpdfapi/fpdf_parser/include/cpdf_array.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_parser/include/cpdf_array.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698