Bug 100611 - DATALOSS: Document with chart can be saved as chart, and can't be opened again without manual fix
Summary: DATALOSS: Document with chart can be saved as chart, and can't be opened agai...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: high major
Assignee: Markus Mohrhard
URL:
Whiteboard: target:6.3.0 target:6.2.0.1
Keywords: bibisected, bisected, dataLoss, regression
Depends on:
Blocks: Chart
  Show dependency treegraph
 
Reported: 2016-06-26 01:47 UTC by Aron Budea
Modified: 2018-11-30 19:04 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
A chart that is not just a chart (14.37 KB, application/vnd.oasis.opendocument.chart)
2016-06-26 01:47 UTC, Aron Budea
Details
console logs (3.22 KB, text/plain)
2016-07-02 13:31 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2016-06-26 01:47:32 UTC
Created attachment 125906 [details]
A chart that is not just a chart

1. Start new document in Writer.
2. Click Chart on toolbar to insert a sample chart.
3. Verify you're in the chart editor, and while in there, save your document.

=> Save As dialog opens (note the type: ODF Chart), then document is saved as a chart with .odc extension (further saves keep this format/extension even when done from the document), and will be opened as an empty LibreOffice Chart next time.

The document can be fixed manually by adjusting media-type in manifest.xml from "application/vnd.oasis.opendocument.chart" to "application/vnd.oasis.opendocument.text" (there's still a document recovery dialog in Writer).


Sometimes this error message pops up when trying to save:
"Error saving document <file name>: Wrong parameter. The operation was started under an invalid parameter."
(<file name> = the name given in the Save As dialog)
Not sure what the exact steps are to get an error, I usually clicked around inside/outside the chart during testing.

Reproduced in 4.1.0.4, 5.1.4.2 and master build in Windows 7, and with 5.0.5.2 in Linux.
Not reproduced in 4.0.0.3. => regression

Bug 70977 is related, but this one didn't occur in 4.0, and the expected behavior could be different in Writer compared to Calc. (would saving a chart separately be a legitimate feature in Writer?)
Comment 1 Julien Nabet 2016-07-02 13:31:16 UTC
Created attachment 126035 [details]
console logs

On pc Debian x86-64 with master sources updated today, I could reproduce this.
I attached console logs.
Comment 2 Buovjaga 2016-07-02 18:32:57 UTC
I also repro (browser tab was left open, so mid-air collision :)). Let's pump up the severity.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha0+
Build ID: ef47ce2397d4ed453fe01d994d13a13f442ec3bb
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Built on July 2nd 2016
Comment 3 Aron Budea 2017-02-05 08:10:18 UTC Comment hidden (bibisection)
Comment 4 Aron Budea 2017-02-05 08:12:45 UTC
Bibisection points to a short range of commits by Markus, but there're only one or at most two candidates here, so I'm adding the bisected keyword. Adding Cc: to Markus Mohrhard.

Not sure what'd be the preferred behavior, I'd say saving from an open chart inside a document/spreadsheet should never save just a chart or a broken document, but having a way to export the chart to a file could be useful.

https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=ff98426745b76fef17e78d75f9b18b26ebc69a74..fbaad98be26889bd0e278093f95a14bdb13786b6

https://cgit.freedesktop.org/libreoffice/core/commit/?id=4517bb391afea870f856e030d8b1e5e8ee9364ac
author		Markus Mohrhard <markus.mohrhard@googlemail.com>	2013-03-14 22:20:48 (GMT)
committer	Markus Mohrhard <markus.mohrhard@googlemail.com>	2013-03-15 00:30:55 (GMT)

"first step for Insert->Chart From File"

https://cgit.freedesktop.org/libreoffice/core/commit/?id=fbaad98be26889bd0e278093f95a14bdb13786b6
author	Markus Mohrhard <markus.mohrhard@googlemail.com>	2013-03-15 00:35:45 (GMT)
committer	Markus Mohrhard <markus.mohrhard@googlemail.com>	2013-03-15 00:42:09 (GMT)

"forgot the file"
Comment 5 QA Administrators 2018-05-26 02:41:52 UTC Comment hidden (obsolete)
Comment 6 Commit Notification 2018-11-30 02:18:03 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/d543e8dfd3d8ae718e29304a155e1cf70d08325d%5E%21

tdf#93005, tdf#100611, remove the incomplete ODC export feature

It will be available in 6.3.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.
Comment 7 Commit Notification 2018-11-30 19:04:50 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/4632afbd9ecdf85f3980b41fa9d58b6099aa2d81%5E%21

tdf#93005, tdf#100611, remove the incomplete ODC export feature

It will be available in 6.2.0.1.

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.