poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Krause" <pkra...@soundbite.com>
Subject RE: cvs commit: jakarta-poi/src/testcases/org/apache/poi/hssf/usermodel TestBugs.java
Date Fri, 25 Jul 2003 19:13:13 GMT
A NamePtg can name other entities besides named ranges, so this change is misleading.
I believe that the right way to do this is to pass in a Workbook and look up the NameRecord.

    public String toFormulaString(Workbook book)
    {
        NameRecord rec = book.getNameRecord(field_1_name_index - 1);
        return rec.getNameText();
    }

PFK

-----Original Message-----
From: avik@apache.org [mailto:avik@apache.org]
Sent: Friday, July 25, 2003 2:22 PM
To: jakarta-poi-cvs@apache.org
Subject: cvs commit: jakarta-poi/src/testcases/org/apache/poi/hssf/usermodel TestBugs.java

 
  1.6.2.2   +14 -12    jakarta-poi/src/java/org/apache/poi/hssf/record/formula/NamePtg.java
 
  Index: NamePtg.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/formula/NamePtg.java,v
  retrieving revision 1.6.2.1
  retrieving revision 1.6.2.2
  diff -u -r1.6.2.1 -r1.6.2.2
  --- NamePtg.java      1 Jul 2003 14:47:34 -0000       1.6.2.1
  +++ NamePtg.java      25 Jul 2003 18:22:19 -0000      1.6.2.2
  @@ -111,17 +115,15 @@
  
       public String toFormulaString(SheetReferences refs)
       {
  -        return "NO IDEA - NAME";
  +        return "NAMED RANGE";
       }


Mime
View raw message