mirror of https://github.com/apache/poi.git
allow XSSF RTS
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902674 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7ab3352712
commit
8fbe3966dd
|
@ -495,20 +495,29 @@ public class HSSFCell extends CellBase {
|
||||||
// so handle things as a normal rich text cell
|
// so handle things as a normal rich text cell
|
||||||
|
|
||||||
if (_cellType != CellType.STRING) {
|
if (_cellType != CellType.STRING) {
|
||||||
int row=_record.getRow();
|
int row = _record.getRow();
|
||||||
short col=_record.getColumn();
|
short col = _record.getColumn();
|
||||||
short styleIndex=_record.getXFIndex();
|
short styleIndex = _record.getXFIndex();
|
||||||
setCellType(CellType.STRING, false, row, col, styleIndex);
|
setCellType(CellType.STRING, false, row, col, styleIndex);
|
||||||
}
|
}
|
||||||
int index;
|
|
||||||
|
|
||||||
HSSFRichTextString hvalue = (HSSFRichTextString) value;
|
if (value instanceof HSSFRichTextString) {
|
||||||
UnicodeString str = hvalue.getUnicodeString();
|
HSSFRichTextString hvalue = (HSSFRichTextString) value;
|
||||||
index = _book.getWorkbook().addSSTString(str);
|
UnicodeString str = hvalue.getUnicodeString();
|
||||||
(( LabelSSTRecord ) _record).setSSTIndex(index);
|
int index = _book.getWorkbook().addSSTString(str);
|
||||||
_stringValue = hvalue;
|
(( LabelSSTRecord ) _record).setSSTIndex(index);
|
||||||
_stringValue.setWorkbookReferences(_book.getWorkbook(), (( LabelSSTRecord ) _record));
|
_stringValue = hvalue;
|
||||||
_stringValue.setUnicodeString(_book.getWorkbook().getSSTString(index));
|
_stringValue.setWorkbookReferences(_book.getWorkbook(), (( LabelSSTRecord ) _record));
|
||||||
|
_stringValue.setUnicodeString(_book.getWorkbook().getSSTString(index));
|
||||||
|
} else {
|
||||||
|
HSSFRichTextString hvalue = new HSSFRichTextString(value.getString());
|
||||||
|
UnicodeString str = hvalue.getUnicodeString();
|
||||||
|
int index = _book.getWorkbook().addSSTString(str);
|
||||||
|
(( LabelSSTRecord ) _record).setSSTIndex(index);
|
||||||
|
_stringValue = hvalue;
|
||||||
|
_stringValue.setWorkbookReferences(_book.getWorkbook(), (( LabelSSTRecord ) _record));
|
||||||
|
_stringValue.setUnicodeString(_book.getWorkbook().getSSTString(index));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue