Bug 139446 - using jOpenDocument-1.3.jar read ods created by LibreOffice 7.0.4.2 has error
Summary: using jOpenDocument-1.3.jar read ods created by LibreOffice 7.0.4.2 has error
Status: CLOSED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-06 10:53 UTC by wf
Modified: 2022-04-08 14:32 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
example.ods (11.22 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-03-28 19:26 UTC, leon
Details
example-valid-1.3.ods (11.17 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-03-30 20:08 UTC, leon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wf 2021-01-06 10:53:58 UTC
Description:
using jOpenDocument-1.3.jar read ods file created by LibreOffice 7.0.4.2 has  error.
using jOpenDocument-1.3.jar read ods file created by LibreOffice 7.0.4.2 is OK.



Steps to Reproduce:
1.using libreoffice 7.0.4.2 craete a ods file.
2.use java code flow read ods file
File file = new File(srcFile);
final Sheet sheet = SpreadSheet.createFromFile(file).getSheet(0);
int Column = sheet.getColumnCount();
int Row = sheet.getRowCount();
logger.error("3.3:"  + sheet.getCellAt(3, 3).getTextValue());//here Exception

3.will have Exception
java.lang.NullPointerException: Cannot invoke "org.jopendocument.dom.OOXML.getVersion()" because "<local3>" is null
	at org.jopendocument.dom.text.TextNode.getCharacterContent(Unknown Source) ~[jOpenDocument-1.3.jar:2.6.9]
	at org.jopendocument.dom.text.TextNode.getChildrenCharacterContent(Unknown Source) ~[jOpenDocument-1.3.jar:2.6.9]
	at org.jopendocument.dom.spreadsheet.Cell.getTextValue(Unknown Source) ~[jOpenDocument-1.3.jar:2.6.9]
	at org.jopendocument.dom.spreadsheet.Cell.getTextValue(Unknown Source) ~[jOpenDocument-1.3.jar:2.6.9]


Actual Results:
code return error

Expected Results:
java code jOpenDocument can read cell


Reproducible: Always


User Profile Reset: Yes



Additional Info:
[Information automatically included from LibreOffice]
Locale: zh-CN
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: yes
Comment 1 m_a_riosv 2021-01-06 18:23:53 UTC
Maybe should be fine test the file with a validator.

https://wiki.documentfoundation.org/ODF
Comment 2 leon 2022-03-26 00:48:54 UTC
Hi, I am maintaining a huge software project built with jOpenDocument and because of this error I can't support any of the newer versions of LibreOffice. Any chance this will get fixed or do I have to migrate to a new library all together?
Comment 3 Julien Nabet 2022-03-26 16:22:56 UTC
No feedback after more than 1 year, let's put this one to WFM.

wf: don't hesitate to reopen this tracker if you still reproduce the pb with LO 7.3.1 and in this case, please provide an example file. Indeed, it could also be a pb with jOpenDocument.
Comment 4 leon 2022-03-28 19:26:12 UTC
Created attachment 179171 [details]
example.ods

Here is an example file created with the newest stable version of calc that produces this issue.
Comment 5 wf 2022-03-30 06:25:38 UTC
I am sorry everyone for replyling so later.The Description I writer has error:
"using jOpenDocument-1.3.jar read ods file created by LibreOffice 7.0.4.2 is OK." 
change to "using jOpenDocument-1.3.jar read ods file created by LibreOffice 6.4.7.2 is OK."
To be honest,i am not a java developer.I want to submit this bug to jOpenDocument,but I don't know how to do it.
Maybe  jOpenDocument-1.3.jar only support specific version ods file. So I think we can select ods file version at save file dialog box.
Comment 6 Julien Nabet 2022-03-30 19:50:32 UTC
I don't understand, because you don't know how to submit a bugtracker for jOpenDocument you submitted a bug on LO?
Anyway, can't help here=>uncc myself.
Comment 7 leon 2022-03-30 19:55:06 UTC
I think the issues root cause is probably that jOpenDocument does not support OASIS ODF 1.3 extended - could that be the case?
Comment 8 leon 2022-03-30 20:08:17 UTC
Nevermind. I uploaded a new attachment which passes the 1.3 (not extended) validator but still produces the error with jOpenDocument.
Comment 9 leon 2022-03-30 20:08:40 UTC
Created attachment 179223 [details]
example-valid-1.3.ods
Comment 10 Eike Rathke 2022-04-08 14:32:44 UTC
Similar to bug 148193 this doesn't appear to be a LibreOffice problem but jOpenDocument.