]> source.dussan.org Git - poi.git/commitdiff
Patch from Josh from bug #44495 - Handle named cell ranges in formulas that have...
authorNick Burch <nick@apache.org>
Mon, 3 Mar 2008 15:26:38 +0000 (15:26 +0000)
committerNick Burch <nick@apache.org>
Mon, 3 Mar 2008 15:26:38 +0000 (15:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@633126 13f79535-47bb-0310-9956-ffa450edef68

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

index f043de44b6171a89be6ea4feab0b404f3a80187b..d85e3a3a71bb6631e6f2292845e4571ebff53188 100644 (file)
@@ -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>
index 66c348de6a11135961817724bdcb19917cfdde2e..4b836f6a9645cbe282b17442e6deb59b923c080c 100644 (file)
@@ -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>
index 1d78b1b239bcfac2223e8821335d207a4d771cb0..dc75a5c1701c76102e0619511f1f5f1a263c56a0 100644 (file)
@@ -327,7 +327,7 @@ public class FormulaParser {
                 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;
                     }
                 }
index d418afa7e756b5c3e3a1f30b37e1ebbe4f6ae3f6..01323c3a018c24b432e5fb554447be69507ec90a 100644 (file)
@@ -50,7 +50,7 @@ public class NamePtg
         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;
             }