version 1.33, 2004/01/14 16:47:39
|
version 1.35, 2004/02/24 17:02:04
|
Line 615 parametername should be a string such as
|
Line 615 parametername should be a string such as
|
sub MINPARM { |
sub MINPARM { |
my ($expression) = @_; |
my ($expression) = @_; |
my $min = undef; |
my $min = undef; |
study($expression); |
|
foreach $parameter (keys(%c)) { |
foreach $parameter (keys(%c)) { |
next if ($parameter !~ /$expression/); |
next if ($parameter !~ /$expression/); |
if ((! defined($min)) || ($min > $c{$parameter})) { |
if ((! defined($min)) || ($min > $c{$parameter})) { |
Line 640 parametername should be a string such as
|
Line 639 parametername should be a string such as
|
sub MAXPARM { |
sub MAXPARM { |
my ($expression) = @_; |
my ($expression) = @_; |
my $max = undef; |
my $max = undef; |
study($expression); |
|
foreach $parameter (keys(%c)) { |
foreach $parameter (keys(%c)) { |
next if ($parameter !~ /$expression/); |
next if ($parameter !~ /$expression/); |
if ((! defined($min)) || ($max < $c{$parameter})) { |
if ((! defined($min)) || ($max < $c{$parameter})) { |
Line 846 sub expandnamed {
|
Line 844 sub expandnamed {
|
my @matches = (); |
my @matches = (); |
my @values = (); |
my @values = (); |
$#matches = -1; |
$#matches = -1; |
study $expression; |
|
while (my($parameter,$value) = each(%{$self->{'constants'}})) { |
while (my($parameter,$value) = each(%{$self->{'constants'}})) { |
next if ($parameter !~ /$expression/); |
next if ($parameter !~ /$expression/); |
push(@matches,$parameter); |
push(@matches,$parameter); |
Line 1557 sub outsheet_xml {
|
Line 1554 sub outsheet_xml {
|
## But not on this day |
## But not on this day |
my $Str = '<spreadsheet type="'.$self->{'type'}.'">'."\n"; |
my $Str = '<spreadsheet type="'.$self->{'type'}.'">'."\n"; |
while (my ($cell,$formula) = each(%{$self->{'formulas'}})) { |
while (my ($cell,$formula) = each(%{$self->{'formulas'}})) { |
if ($cell =~ /^template_(\d+)/) { |
if ($cell =~ /^template_(\w+)/) { |
my $col = $1; |
my $col = $1; |
$Str .= '<template col="'.$col.'">'.$formula.'</template>'."\n"; |
$Str .= '<template col="'.$col.'">'.$formula.'</template>'."\n"; |
} else { |
} else { |
Line 1570 sub outsheet_xml {
|
Line 1567 sub outsheet_xml {
|
} |
} |
} |
} |
$Str.="</spreadsheet>"; |
$Str.="</spreadsheet>"; |
# $r->print("<pre>\n\n\n".$Str."\n\n\n</pre>"); |
$r->print("<pre>\n\n\n".$Str."\n\n\n</pre>"); |
return $Str; |
return $Str; |
} |
} |
|
|
Line 1597 sub parse_sheet {
|
Line 1594 sub parse_sheet {
|
$formulas{$cell} = $formula; |
$formulas{$cell} = $formula; |
$sources{$cell} = $source if (defined($source)); |
$sources{$cell} = $source if (defined($source)); |
$parser->get_text('/field'); |
$parser->get_text('/field'); |
} |
} elsif ($token->[1] eq 'template') { |
if ($token->[1] eq 'template') { |
|
$formulas{'template_'.$token->[2]->{'col'}}= |
$formulas{'template_'.$token->[2]->{'col'}}= |
$parser->get_text('/template'); |
$parser->get_text('/template'); |
} |
} |