poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r983362 - /poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
Date Sun, 08 Aug 2010 08:04:28 GMT
Author: yegor
Date: Sun Aug  8 08:04:28 2010
New Revision: 983362

URL: http://svn.apache.org/viewvc?rev=983362&view=rev
Log:
optimized performance of HSSFCell#setHyperlink 

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java?rev=983362&r1=983361&r2=983362&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java Sun Aug  8 08:04:28 2010
@@ -1159,8 +1159,9 @@ public class HSSFCell implements Cell {
                 break;
         }
 
-        int eofLoc = _sheet.getSheet().findFirstRecordLocBySid( EOFRecord.sid );
-        _sheet.getSheet().getRecords().add( eofLoc, link.record );
+        List<RecordBase> records = _sheet.getSheet().getRecords();
+        int eofLoc = records.size() - 1;
+        records.add( eofLoc, link.record );
     }
     /**
      * Only valid for formula cells



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


Mime
View raw message