Bug 129624 - When recovering TAB-sep chart file, tabs are replaced by commas
Summary: When recovering TAB-sep chart file, tabs are replaced by commas
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: lowest enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Document-Recovery
  Show dependency treegraph
 
Reported: 2019-12-26 08:05 UTC by Frank Griswold
Modified: 2023-08-12 00:55 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Griswold 2019-12-26 08:05:33 UTC
I programmatically write new lines into a TAB-separated file. I the open the file using libreoffice calc. Sometimes when I try to close the file, it crashes, and offers to recover. If I accept that offer, very often (always??) the file is recovered as a COMMA-separated file. Some of my fields can occasionally contain commas, which is why I chose tabs.

How to reproduce: Build a tab-sep file with several columns of several rows of numeric data (the comma-containing fields aren't part of problem). Cause a crash.
Allow file recovery

To cause the crash, as I've seen it: 
  Choose insert chart
  choose X/Y scatter 
  cancel the insertion of the chart, maybe by simply closing the window
  About 5% to 10% of the time (WAG) the save will fail and LibreOffice will crash, while offering to recover my file.
  I have seen this with three columns: two columns holding data in the 10,000-100,000 range and one holding data around 210 to 280; and as few as a dozen rows.

What I expect: The file will be recovered in CSV format with the sep character I used when creating it.

How you might do that: Ask what sep character(s) should be used. Or use an rcfile of some kind to specify the default sep character. Or stash the sep character(s) somewhere that an be recovered.
Comment 1 Mike Kaganski 2019-12-26 08:42:09 UTC
Some background:

When opening a CSV, the filter settings used when opening the file are kept in memory, and used when writing back using simple "Save", thus keeping original tabs. Autorecovery save cannot use CSV for storage: it's unknown in advance if user would finally save as CSV (losing all formatting, e.g. column widths), or decide to save into a rich format like ODS; so LO should use the format capable to store all the data, i.e. ODS. But in autorecovery ODS, the SCV filter data is not stored; thus when opening the crashed file later, reading its contents from the ODS, does not restore the filter settings.

Possibly it would be worth to store arbitrary filter settings data in the autorecovery ODS in some custom XML (base64-encoded where necessary). That would not break compatibility, and would not require changing ODF standard.

Setting to NEW.
Comment 2 eisa01 2020-02-15 23:55:58 UTC
As per Mike's comment, this would be OS agnostic
Comment 3 QA Administrators 2022-02-15 04:11:45 UTC Comment hidden (spam)