Created attachment 163325 [details]
attachment #163298 [details] saved to odt with current master
Saving a DOCX file with a chart as ODT causes the chart to not being editable after reloading the ODT file.
Steps to reproduce:
1. Open any DOCX with a chart in it, such as attachment #163298 [details]
2. Save it as ODT and reopen it
3. Right click on the chart
Contextual menu does not have Edit item, nor does double clicking open it for editing.
Chart should be editable.
Version: 18.104.22.168.alpha0+ (x64)
Build ID: 5d546de67b44dec23ecfa5a6378e2968912f8253
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Also happens in
Build az.: 64a0f66915f38c6217de274f0aa8e15618924765
CPU szálak: 4; OS: Windows 6.3; Felületmegjelenítés: alapértelmezett;
Területi beállítások: hu-HU (hu_HU); Calc: CL
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: hu-HU (hu_HU)
Build az.: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
Before this the chart was not even imported.
Created attachment 163326 [details]
Screenshot of the problem in Writer
The reason is, that the xlink:href attribute in the draw:object element points to a not existing object. It is xlink:href="./Object 2", whereas the folder in the package is "Object 1", for example.
After a document is opened, I see already StreamName="Object 2" in the Basic IDE.
The name is generated in EmbeddedObjectContainer::CreateUniqueObjectName() in /comphelper/source/container/embeddedobjectcontainer.cxx
If I set a breakpoint there, I see, that it is called more than once.
Perhaps there happen some confusion because the docx-file has not only "charts" but also "embeddings"? The latter contains the Microsoft_Excel_Worksheet.xlsx file, which holds the data for the chart.
I have not investigated, why the export does not use "StreamName", when writing the folder for the chart.
Created attachment 163896 [details]
formula followed by chart
And worse, if the document has first a formula and then a chart, the chart is not written at all. Try it with attached document.
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":
tdf#134987 convert DOCX to ODT: fix lost charts
It will be available in 7.1.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:
Affected users are encouraged to test the fix and report feedback.
*** Bug 95323 has been marked as a duplicate of this bug. ***
attachment #163298 [details] is LO created and cannot be open in MSO (bug 134801) so not sure about this bug, what's the real issue, is it saving in LO.
But looks good in today's master, I set Verified.
If I can suggest, please see bug 134801 so that we can have the whole circe, save to DOCX-ODT-DOCX and verify in MSO.
*** Bug 126476 has been marked as a duplicate of this bug. ***
Version: 22.214.171.124.alpha1+ (x64)
Build ID: a689cf1672e89cb78fbcfa14c505850927e71f58
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Thanks for fixing!
*** Bug 135903 has been marked as a duplicate of this bug. ***