You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2008/03/03 16:26:40 UTC

svn commit: r633126 - in /poi/trunk/src: documentation/content/xdocs/changes.xml documentation/content/xdocs/status.xml java/org/apache/poi/hssf/model/FormulaParser.java java/org/apache/poi/hssf/record/formula/NamePtg.java

Author: nick
Date: Mon Mar  3 07:26:38 2008
New Revision: 633126

URL: http://svn.apache.org/viewvc?rev=633126&view=rev
Log:
Patch from Josh from bug #44495 - Handle named cell ranges in formulas that have lower case parts

Modified:
    poi/trunk/src/documentation/content/xdocs/changes.xml
    poi/trunk/src/documentation/content/xdocs/status.xml
    poi/trunk/src/java/org/apache/poi/hssf/model/FormulaParser.java
    poi/trunk/src/java/org/apache/poi/hssf/record/formula/NamePtg.java

Modified: poi/trunk/src/documentation/content/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/changes.xml?rev=633126&r1=633125&r2=633126&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/changes.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/changes.xml Mon Mar  3 07:26:38 2008
@@ -36,6 +36,7 @@
 
 		<!-- Don't forget to update status.xml too! -->
         <release version="3.1-beta1" date="2008-??-??">
+           <action dev="POI-DEVELOPERS" type="fix">44495 - Handle named cell ranges in formulas that have lower case parts</action>
            <action dev="POI-DEVELOPERS" type="fix">44491 - Don't have the new-style "HPSF properties are always available" affect the old-style use of HPSF alongside HSSF</action>
            <action dev="POI-DEVELOPERS" type="fix">44471 - Crystal Reports generates files with short StyleRecords, which isn't allowed in the spec. Work around this</action>
            <action dev="POI-DEVELOPERS" type="add">44450 - Support for Lookup, HLookup and VLookup functions</action>

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=633126&r1=633125&r2=633126&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Mon Mar  3 07:26:38 2008
@@ -33,6 +33,7 @@
 	<!-- Don't forget to update changes.xml too! -->
     <changes>
         <release version="3.1-beta1" date="2008-??-??">
+           <action dev="POI-DEVELOPERS" type="fix">44495 - Handle named cell ranges in formulas that have lower case parts</action>
            <action dev="POI-DEVELOPERS" type="fix">44491 - Don't have the new-style "HPSF properties are always available" affect the old-style use of HPSF alongside HSSF</action>
            <action dev="POI-DEVELOPERS" type="fix">44471 - Crystal Reports generates files with short StyleRecords, which isn't allowed in the spec. Work around this</action>
            <action dev="POI-DEVELOPERS" type="add">44450 - Support for Lookup, HLookup and VLookup functions</action>

Modified: poi/trunk/src/java/org/apache/poi/hssf/model/FormulaParser.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/model/FormulaParser.java?rev=633126&r1=633125&r2=633126&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/model/FormulaParser.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/model/FormulaParser.java Mon Mar  3 07:26:38 2008
@@ -327,7 +327,7 @@
                 for(int i = 0; i < book.getNumNames(); i++) {
                 	// Our formula will by now contain an upper-cased
                 	//  version of any named range names
-                    if(book.getNameRecord(i).getNameText().toUpperCase().equals(name)) {
+                    if(book.getNameRecord(i).getNameText().equalsIgnoreCase(name)) {
                         nameRecordExists = true;
                     }
                 }

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/formula/NamePtg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/NamePtg.java?rev=633126&r1=633125&r2=633126&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/formula/NamePtg.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/formula/NamePtg.java Mon Mar  3 07:26:38 2008
@@ -50,7 +50,7 @@
         NameRecord rec;
         for (short i = 1; i < n; i++) {
             rec = book.getNameRecord(i - 1);
-            if (name.equals(rec.getNameText())) {
+            if (name.equalsIgnoreCase(rec.getNameText())) {
                 field_1_label_index = i;
                 return;
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org