You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by ac...@apache.org on 2003/05/02 16:30:03 UTC
cvs commit: jakarta-poi/src/java/org/apache/poi/hssf/record FontRecord.java
acoliver 2003/05/02 07:30:03
Modified: src/java/org/apache/poi/hssf/record FontRecord.java
Log:
Font names can sometimes be null.. We now accept this and can move on with
our serialization life.
Revision Changes Path
1.9 +3 -1 jakarta-poi/src/java/org/apache/poi/hssf/record/FontRecord.java
Index: FontRecord.java
===================================================================
RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/FontRecord.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- FontRecord.java 30 Apr 2003 04:38:47 -0000 1.8
+++ FontRecord.java 2 May 2003 14:30:03 -0000 1.9
@@ -578,7 +578,9 @@
data[ 17 + offset ] = (( byte ) 0);
data[ 18 + offset ] = getFontNameLength();
data[ 19 + offset ] = ( byte ) 1;
- StringUtil.putUncompressedUnicode(getFontName(), data, 20 + offset);
+ if (getFontName() != null) {
+ StringUtil.putUncompressedUnicode(getFontName(), data, 20 + offset);
+ }
return getRecordSize();
}