mirror of https://github.com/apache/poi.git
avoid NPE when finding cell comments, Bugzilla 48846
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@947315 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2670820514
commit
e79cc21802
|
@ -34,6 +34,7 @@
|
|||
|
||||
<changes>
|
||||
<release version="3.7-SNAPSHOT" date="2010-??-??">
|
||||
<action dev="POI-DEVELOPERS" type="fix">48846 - Avoid NPE when finding cell comments</action>
|
||||
<action dev="POI-DEVELOPERS" type="fix">49325 - Ensure that CTPhoneticPr is included in poi-ooxml jar</action>
|
||||
<action dev="POI-DEVELOPERS" type="fix">49191 - Fixed tests failing in non-english locales</action>
|
||||
<action dev="POI-DEVELOPERS" type="add">48432 - Support for XSSF themes</action>
|
||||
|
|
|
@ -1079,12 +1079,16 @@ public class HSSFCell implements Cell {
|
|||
if (note.getRow() == row && note.getColumn() == column) {
|
||||
if(i < noteTxo.size()) {
|
||||
TextObjectRecord txo = noteTxo.get(note.getShapeId());
|
||||
comment = new HSSFComment(note, txo);
|
||||
comment.setRow(note.getRow());
|
||||
comment.setColumn((short) note.getColumn());
|
||||
comment.setAuthor(note.getAuthor());
|
||||
comment.setVisible(note.getFlags() == NoteRecord.NOTE_VISIBLE);
|
||||
comment.setString(txo.getStr());
|
||||
if(txo != null){
|
||||
comment = new HSSFComment(note, txo);
|
||||
comment.setRow(note.getRow());
|
||||
comment.setColumn(note.getColumn());
|
||||
comment.setAuthor(note.getAuthor());
|
||||
comment.setVisible(note.getFlags() == NoteRecord.NOTE_VISIBLE);
|
||||
comment.setString(txo.getStr());
|
||||
} else{
|
||||
log.log(POILogger.WARN, "Failed to match NoteRecord and TextObjectRecord, row: " + row + ", column: " + column);
|
||||
}
|
||||
} else {
|
||||
log.log(POILogger.WARN, "Failed to match NoteRecord and TextObjectRecord, row: " + row + ", column: " + column);
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue