Skip to content

Commit 2ad8c86

Browse files
committed
Fix test errors
1 parent 179dbcc commit 2ad8c86

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

resources/floatfontsize.ods

7.83 KB
Binary file not shown.

src/com/github/miachm/sods/OdsReader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ private void readCellText(XmlReaderInstance cellReader, Range range) {
549549
}
550550

551551
// Empty cells are supposed to be represented by null, so return that if we got no content.
552-
if (s.length() > 0 && range.getValue() == null) {
552+
if (s.length() > 0 && (range.getValue() == null || range.getValue() instanceof String)) {
553553
range.setValue(s.toString());
554554
}
555555
}

src/com/github/miachm/sods/OfficeValueType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public Object read(XmlReaderInstance reader) {
170170
public void write(Object value, XMLStreamWriter writer) throws XMLStreamException {
171171
if (value instanceof String) {
172172
writer.writeAttribute("office:value-type", this.getId());
173-
writer.writeAttribute("office:string-value", (String)value);
173+
writer.writeAttribute("office:string-value", value.toString());
174174
}
175175
}
176176
},

0 commit comments

Comments
 (0)