Patch from Josh from bug #44495 - Handle named cell ranges in formulas that have lower case parts

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@633126 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2008-03-03 15:26:38 +00:00
parent 0ecbec584e
commit 0102c66498
4 changed files with 4 additions and 2 deletions

View 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>

View 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>

View 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;
}
}

View 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;
}