--- SpreadSheetPlugin.pm.orig 2005-03-23 22:56:06.055315918 -0600 +++ SpreadSheetPlugin.pm 2005-03-23 23:01:25.817309350 -0600 @@ -606,6 +606,28 @@ } $result =~ s|
$||o; + } elsif( $theFunc eq "LISTCOUNTITEMS" ) { + $result = ""; + my @arr = getList( $theAttr ); + my @arr2 = (); + my %items = (); + my $key = ""; + foreach $key ( @arr ) { + $key =~ s/^\s*(.*?)\s*$/$1/o if( $key ); + if( $key ) { + if( exists( $items{ $key } ) ) { + $items{ $key }++; + } else { + $items{ $key } = 1; + } + } + } + foreach $key ( sort keys %items ) { + push(@arr2, $key); + push(@arr2, $items{ $key }); + } + $result = _listToDelimitedString( @arr2 ); + } elsif( $theFunc =~ /^(FIND|SEARCH)$/ ) { my( $searchString, $string, $pos ) = split( /,\s*/, $theAttr, 3 ); $result = 0;