-
Bug
-
Resolution: Fixed
-
Normal
-
5.6.0
-
None
-
Security Level: Jimmy
-
None
Steps to Reproduce
1. import the attached file (created by Office 365 Excel)
Current Result
java.lang.NullPointerException: Cannot invoke "io.keikai.model.SRichText.getSegments()" because "rstr" is null at io.keikai.model.util.RichTextHelper.getCellRichTextHtml(RichTextHelper.java:208) at io.keikai.ui.SpreadsheetCtrlImpl.getCellAttr(SpreadsheetCtrlImpl.java:613) at io.keikai.ui.SpreadsheetCtrlImpl.getRangeAttrs(SpreadsheetCtrlImpl.java:382) at io.keikai.ui.au.in.FetchActiveRangeCommand.process(FetchActiveRangeCommand.java:62) at io.keikai.ui.Spreadsheet.service(Spreadsheet.java:3339) at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:792) at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1318) at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:611) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:487) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:495) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1386)
Expected Result
no error, show the comment
Debug Information
1. Insertin a comment in Office 365> Excel, it produces a threaded comment. Older version excel cannot see the original threaded comment, so it produce a traditional comment like below, and it is not a rich text:
<comment ref="F150" authorId="1" shapeId="0" xr:uid="{F50AC39E-1283-1945-8B75-4263A2FF18D4}"> <text> <t>[Threaded comment] Your version of Excel allows you to read this threaded comment; however, any edits to it will get removed if the file is opened in a newer version of Excel. Learn more: https://go.microsoft.com/fwlink/?linkid=870924 Comment: Do not delete text</t> </text> </comment>
2. XlsxImporter.importCell() imports both rich text and plain text, keikai should be able to render both.