Created attachment 171401 [details] The ODT file to reproduce The attached document was generated our own Java code powered by jOpenDocument[1] ODF operation library. It has an embedded chart that has "Net - Point and Lines" type, but since LibO 7.1, the type information is gone when loading. With 7.0 or earlier, it can be opened without issue. Step 1. Load an attached ODF (1.2 extended) Step 2. See the chart area Expected: can see the "Net - Point and Lines" type chart. Actual: there is a blank chart, but changing the chart type to "Net - Point and Lines," it seems well. NOTE: ODFValidator claims 'element "draw:image" is missing "type" attribute,' so I think it might be a problem with jOpenDocument. But LibO versions prior to 7.0 were able to read it fine. So if possible, please make it readable in 7.1 and later. [1] http://www.jopendocument.org/ we know it's so old library (the latest release was in 2014) but our several tools still depend on it deeply and could not switch others at this time.
Created attachment 171402 [details] console logs On pc Debian x86-64 with master sources updated today, I could reproduce this. I attached console logs, the most interesting seems to be these ones: warn:xmloff.chart:40869:40869:xmloff/source/chart/SchXMLChartContext.cxx:399: need a charttype to create a diagram warn:legacy.osl:40869:40869:sw/source/core/unocore/unochart.cxx:978: XLabeledDataSequence in data source contains 0 entries warn:legacy.osl:40869:40869:sw/source/core/unocore/unochart.cxx:978: XLabeledDataSequence in data source contains 0 entries
Bibisected to: https://cgit.freedesktop.org/libreoffice/core/commit/?id=574eec9036c5f185b3572ba1e0ca9d111eb361dc author Mike Kaganski <mike.kaganski@collabora.com> 2020-09-12 17:22:23 +0300 committer Mike Kaganski <mike.kaganski@collabora.com> 2020-09-15 06:09:04 +0200 tdf#77007: chart must honor its parent's IsEnableSetModified Adding CC to: Mike Kaganski
Created attachment 171433 [details] The example file resaved in LO 7.0 It might be argued that the external generator is buggy. Saving the example file in LO 7.0 makes it open just fine in 7.1.
I confirm I see "RaderChart" with "alpha", "bravo", "charlie" when commenting block: // tdf#77007: honor parent's IsEnableSetModified // Check it before LifeTimeGuard, to avoid deadlocking solar mutex and this guard if (auto pParentShell = SfxObjectShell::GetShellFromComponent(getParent()); pParentShell && !pParentShell->IsEnableSetModified()) return;
I noticed that even when reverting part of a patch and having the chart, I still see these logs: warn:xmloff:92890:92890:xmloff/source/chart/SchXMLChartContext.cxx:388: unknown attribute http://www.w3.org/1999/xlink xlink:type value=simple warn:xmloff.chart:92890:92890:xmloff/source/chart/SchXMLChartContext.cxx:399: need a charttype to create a diagram warn:legacy.osl:92890:92890:sw/source/core/unocore/unochart.cxx:978: XLabeledDataSequence in data source contains 0 entries warn:legacy.osl:92890:92890:sw/source/core/unocore/unochart.cxx:978: XLabeledDataSequence in data source contains 0 entries
bug #141914 was bibisected to the same source commit, but this problem still persists even after the recent fix to that in todays nightly: Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community Build ID: eeb2854e085fdd9f7a38d6e952a8aedf43e90323 CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: CL
(In reply to NISZ LibreOffice Team from comment #6) > bug #141914 was bibisected to the same source commit, but this problem still > persists even after the recent fix to that in todays nightly: > ... I also gave a try, I confirm too. But at the same time, it's not as if Mike had indicated the patch would also fix this one so it could be expected.
This is not a problem of an invalid format (the issue reported by ODF validator is unrelated). This is about the placement of the object's document stream. The generator puts chart's <office:document> as a child of <draw:object> right inside content.xml (absolutely valid case). When re-saved from v.7.0, the chart is placed into its own *.xml under Object N subdirectory inside the ODF package. This changes the moment when the chart's XML is read to after the full document model creation, and at that case, the document already allows setting modified flag. This problem may also be reproduced with any chart in a text document, even generated by 7.1, if you save it as FODT - which uses the same <office:document> directly in <draw:object> approach. It seems that current import code abuses some side effect of setting the object modified, where that side effect makes additional changes somewhere in the chart's model; while that change in the model should be made explicitly at some point of reading the XML. I don't know which property is that.
attachment 118190 [details] from bug 93676 is a good example for the fodt with disappearing chart after: https://cgit.freedesktop.org/libreoffice/core/commit/?id=574eec9036c5f185b3572ba1e0ca9d111eb361dc tdf#77007: chart must honor its parent's IsEnableSetModified
*** Bug 146982 has been marked as a duplicate of this bug. ***
https://gerrit.libreoffice.org/c/core/+/158051
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/f26bf09a0e93449ea85269a09a8a073a20903349 tdf#141892: Set chart view to dirty state after loading It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
On pc Debian x86-64 with master sources updated today, I don't know if it's completely ok but I got a chart! :-) On console, I noticed these kinds of logs: warn:xmloff:9474:9474:xmloff/source/text/XMLTextListAutoStylePool.cxx:163: getStyleFamilies() from XModel failed for export! warn:xmloff.chart:9474:9474:xmloff/source/chart/SchXMLExport.cxx:3978: No DataProvider warn:chart2.tools:9474:9474:chart2/source/tools/WrappedPropertySet.cxx:137: found no inner property set to map to warn:legacy.osl:9474:9474:xmloff/source/style/xmlexppr.cxx:856: special item not handled in xml export warn:xmloff:9474:9474:xmloff/source/chart/SchXMLChartContext.cxx:392: unknown attribute http://www.w3.org/1999/xlink xlink:type value=simple warn:legacy.osl:9474:9474:sw/source/core/unocore/unochart.cxx:972: XLabeledDataSequence in data source contains 0 entries but perhaps unrelated.
I also confirmed that the issue was fixed with: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 2247b00230e479e63ab996d4e1694b1d74aeba81 CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win Locale: ja-JP (ja_JP); UI: ja-JP Calc: CL threaded
(In reply to Naruhiko Ogasawara from comment #14) > I also confirmed that the issue was fixed with: Thank you for the feedback. Let's put this one to VERIFIED then.