[LON-CAPA-cvs] cvs: loncom(version_1_3_X) /interface/spreadsheet Spreadsheet.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 21 Apr 2005 17:30:25 -0000


albertel		Thu Apr 21 13:30:25 2005 EDT

  Modified files:              (Branch: version_1_3_X)
    /loncom/interface/spreadsheet	Spreadsheet.pm 
  Log:
  - backport 1.42
  
  
Index: loncom/interface/spreadsheet/Spreadsheet.pm
diff -u loncom/interface/spreadsheet/Spreadsheet.pm:1.37 loncom/interface/spreadsheet/Spreadsheet.pm:1.37.2.1
--- loncom/interface/spreadsheet/Spreadsheet.pm:1.37	Wed Mar 31 00:24:00 2004
+++ loncom/interface/spreadsheet/Spreadsheet.pm	Thu Apr 21 13:30:24 2005
@@ -1,5 +1,5 @@
 #
-# $Id: Spreadsheet.pm,v 1.37 2004/03/31 05:24:00 albertel Exp $
+# $Id: Spreadsheet.pm,v 1.37.2.1 2005/04/21 17:30:24 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -911,7 +911,8 @@
             $t{$cell}=~s/(^|[^\"\'])([A-Za-z]\d+)/$1\$sheet_values\{\'$2\'\}/g;
             $t{$cell}=~s/(^|[^\"\'])\[([^\]]+)\]/$1.$self->expandnamed($2)/ge;
         } elsif  ( $col  =~ /^[A-Z]$/  ) {
-            if ($formula !~ /^\!/ && exists($self->{'constants'}->{$cell})) {
+            if ($formula !~ /^\!/ && exists($self->{'constants'}->{$cell})
+		&& $self->{'constants'}->{$cell} ne '') {
                 my $data = $self->{'constants'}->{$cell};
                 $t{$cell} = $data;
             }