Bug 162822 - FILEOPEN regression: calc open csv forgets dialog settings
Summary: FILEOPEN regression: calc open csv forgets dialog settings
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.2 target:24.8.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: CSV-Dialog
  Show dependency treegraph
 
Reported: 2024-09-06 11:58 UTC by Freddy
Modified: 2024-10-31 08:06 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
CSV file to test import in Calc (252 bytes, text/plain)
2024-09-06 12:01 UTC, Freddy
Details
CSV file to test import in Calc (63 bytes, text/plain)
2024-09-06 12:02 UTC, Freddy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Freddy 2024-09-06 11:58:42 UTC
Description:
Selected options in the dialog box for opening a CSV file are forgotten regardless of starting Calc anew or opening CSV files in the same open Calc session.

Settings regarding CSV import in ~/.config/libreoffice/4/user/registrymodifications.xcu are ignored and not updated.

In Libreoffice 24.2.5 the settings were remembered.

Steps to Reproduce:
1. Menu/File/Open , choose CSV file test.csv
2. Select Separator Options "Separated by" and "Semicolon" , deselect "Tab" and "Comma"
3. Select Other Options "Detect special numbers"
4. Click OK to open file 
5. Menu/File/Open , choose CSV file othertest.csv


Actual Results:
All options are reset to default : selected are Separator Options "Separated by" and "Tab" and "Comma" and "Semicolon" , and no Other Options are selected.


Expected Results:
Settings in the dialog box for opening a CSV file should be remembered.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 24.8.0.3 (X86_64) / LibreOffice Community
Build ID: 480(Build:3)
CPU threads: 12; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+xcb)
Locale: en-DK (en_DK.UTF-8); UI: en-US
24.8.0-1
Calc: threaded

<item oor:path="/org.openoffice.Office.Calc/Dialogs/CSVImport"><prop oor:name="CharSet" oor:op="fuse"><value>60</value></prop></item>
<item oor:path="/org.openoffice.Office.Calc/Dialogs/CSVImport"><prop oor:name="DetectScientificNumbers" oor:op="fuse"><value>true</value></prop></item>
<item oor:path="/org.openoffice.Office.Calc/Dialogs/CSVImport"><prop oor:name="DetectSpecialNumbers" oor:op="fuse"><value>true</value></prop></item>
<item oor:path="/org.openoffice.Office.Calc/Dialogs/CSVImport"><prop oor:name="EvaluateFormulas" oor:op="fuse"><value>false</value></prop></item>
<item oor:path="/org.openoffice.Office.Calc/Dialogs/CSVImport"><prop oor:name="FixedWidth" oor:op="fuse"><value>false</value></prop></item>
<item oor:path="/org.openoffice.Office.Calc/Dialogs/CSVImport"><prop oor:name="FixedWidthList" oor:op="fuse"><value></value></prop></item>
<item oor:path="/org.openoffice.Office.Calc/Dialogs/CSVImport"><prop oor:name="FromRow" oor:op="fuse"><value>1</value></prop></item>
<item oor:path="/org.openoffice.Office.Calc/Dialogs/CSVImport"><prop oor:name="Language" oor:op="fuse"><value>0</value></prop></item>
<item oor:path="/org.openoffice.Office.Calc/Dialogs/CSVImport"><prop oor:name="MergeDelimiters" oor:op="fuse"><value>false</value></prop></item>
<item oor:path="/org.openoffice.Office.Calc/Dialogs/CSVImport"><prop oor:name="QuotedFieldAsText" oor:op="fuse"><value>false</value></prop></item>
<item oor:path="/org.openoffice.Office.Calc/Dialogs/CSVImport"><prop oor:name="RemoveSpace" oor:op="fuse"><value>false</value></prop></item>
<item oor:path="/org.openoffice.Office.Calc/Dialogs/CSVImport"><prop oor:name="Separators" oor:op="fuse"><value>;</value></prop></item>
<item oor:path="/org.openoffice.Office.Calc/Dialogs/CSVImport"><prop oor:name="TextSeparators" oor:op="fuse"><value>"</value></prop></item>
Comment 1 Freddy 2024-09-06 12:01:07 UTC
Created attachment 196281 [details]
CSV file to test import in Calc
Comment 2 Freddy 2024-09-06 12:02:37 UTC
Created attachment 196282 [details]
CSV file to test import in Calc
Comment 3 Xisco Faulí 2024-09-06 12:35:02 UTC
Regression introduced by:

commit 2feda8ba21acdcf33a9b4ba94742f574c17839bd	[log]
author	Gabriel Masei <gabriel.masei@1and1.ro>	Sun Mar 17 10:13:25 2024 +0200
committer	Mike Kaganski <mike.kaganski@collabora.com>	Sat Apr 06 19:39:22 2024 +0200
tree 3060f16f398131e08545fe15d909ea3753a800d6
parent 2564374efebb5218fbc3c81540fe95557f6119ac [diff]

tdf#152336 Detect charset and separators for csv files

Bisected with: bibisect-linux64-24.8
Comment 4 Gabriel Masei 2024-09-06 14:46:56 UTC
There is a fix that was already provided for some time here: https://gerrit.libreoffice.org/c/core/+/165905

Just needs a code review.

Thanks!
Comment 5 Xisco Faulí 2024-09-06 14:50:51 UTC
(In reply to Gabriel Masei from comment #4)
> There is a fix that was already provided for some time here:
> https://gerrit.libreoffice.org/c/core/+/165905
> 
> Just needs a code review.
> 
> Thanks!

Hi Gabriel,
At this point I was thinking, while the patch hasn't landed in master yet, should we revert 2feda8ba21acdcf33a9b4ba94742f574c17839bd	libreoffice-24-8 ?
Comment 6 Gabriel Masei 2024-09-06 15:23:38 UTC
If the only issue is the one reported here then I think I can provide a quick fix that will disable the "guessing" feature for import dialog, but will keep it for conversions through command line (which is more important for my use case). I mention that in this latter case it is triggered only at request. So I think that it should be safe.

Otherwise feel free to revert it. Although I think it's a nice feature and going with the fix that I already provided would be a better approach.

Thanks!
Comment 7 Xisco Faulí 2024-09-06 17:41:36 UTC
(In reply to Gabriel Masei from comment #6)
> If the only issue is the one reported here then I think I can provide a
> quick fix that will disable the "guessing" feature for import dialog, but
> will keep it for conversions through command line (which is more important
> for my use case). I mention that in this latter case it is triggered only at
> request. So I think that it should be safe.
> 
> Otherwise feel free to revert it. Although I think it's a nice feature and
> going with the fix that I already provided would be a better approach.
> 
> Thanks!

Hi Gabriel,
it seems it's no the only issue reported so far. In the original report it was already mentioned in https://bugs.documentfoundation.org/show_bug.cgi?id=152336#c18... and bug 160582 is also reported. This is going to affect all .csv files so I expect more reports to come. The reason why I suggested to revert it in libreoffice-24-8 branch ( only in this branch and not in master ) is because it's the safest move at the moment, fixing the issue for end users in that branch, and giving us more time to merge and test https://gerrit.libreoffice.org/c/core/+/165905 in master ( the patch has been in gerrit for a while so I would prefer not to backport it to libreoffice-24-8 without some previous testing )
The new feature is not even mentioned in https://wiki.documentfoundation.org/ReleaseNotes/24.8 so I don't think many users are aware of it.
Comment 8 Gabriel Masei 2024-09-07 07:49:03 UTC
Hi Xisco,

The two issues that you mention in fact are the same as the current one. I understood from the beginning your intention with reverting just for libreoffice-24-8 branch. In principle I have no problem with doing that. It's just that the problem will persist for any new branch that will come out of master. That's why I proposed providing a quick fix that will fix the issue and will last until we'll merge the main fix. I explained already in my previous comment in what consists this quick fix.

I propose the following solution: do the revert for libreoffice-24-8 branch. In  parallel, I will also provide the quick fix in master for future branches. And this should completely remove the issue while the main fix is in review.

Thanks!
Comment 9 Gabriel Masei 2024-09-07 08:36:47 UTC
Hi Xisco,

Provided the promised quick fix: https://gerrit.libreoffice.org/c/core/+/172987 . Feel free to review, test and merge it.

Thanks!
Comment 10 Xisco Faulí 2024-09-07 12:09:24 UTC
(In reply to Gabriel Masei from comment #8)
> Hi Xisco,
> 
> The two issues that you mention in fact are the same as the current one. I
> understood from the beginning your intention with reverting just for
> libreoffice-24-8 branch. In principle I have no problem with doing that.
> It's just that the problem will persist for any new branch that will come
> out of master. That's why I proposed providing a quick fix that will fix the
> issue and will last until we'll merge the main fix. I explained already in
> my previous comment in what consists this quick fix.
> 
> I propose the following solution: do the revert for libreoffice-24-8 branch.
> In  parallel, I will also provide the quick fix in master for future
> branches. And this should completely remove the issue while the main fix is
> in review.
> 
> Thanks!

Hi, It looks like a good plan to me. In fact, I would prefer if https://gerrit.libreoffice.org/c/core/+/165905 is pushed to master instead of https://gerrit.libreoffice.org/c/core/+/172987. Anyway, I'll review them next week. For now, I'm just going to revert it in libreoffice-24-8
Comment 11 Commit Notification 2024-09-07 16:28:05 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/68da28d3c68a6c5800bb2163b4514e7fce83c71b

tdf#162822: Revert "tdf#152336 Detect charset... (24.8 only)

It will be available in 24.8.2.

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 12 Commit Notification 2024-09-09 10:01:33 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-24-8-1":

https://git.libreoffice.org/core/commit/724253c916db0517733181529e3f652aaf8f6890

tdf#162822: Revert "tdf#152336 Detect charset... (24.8 only)

It will be available in 24.8.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.
Comment 13 Freddy 2024-09-21 09:17:35 UTC
This bug is fixed in LibreOffice-24.8.full-x86_64.AppImage (time stamp 2024-09-12 14:59) downloaded from appimages.libreitalia.org/portable/

I copied ~/.config/libreoffice/4 to ~/.config/libreoffice/24.8 and started the AppImage, and when I opened the first csv-file the dialog box already had the options that are configured in registrymodifications.xcu: Separated by Semicolon and "Detect special numbers" and "Detect scientific notation".

I changed the options to Separated by Comma and deselected "Detect special numbers", closed LibreOffice, started again, and the settings were as selected when I closed.

Version: 24.8.1.2 (X86_64) / LibreOffice Community
Build ID: 87fa9aec1a63e70835390b81c40bb8993f1d4ff6
CPU threads: 12; OS: Linux 6.10; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-DK (en_DK.UTF-8); UI: en-US
Calc: threaded

Thank you.
Comment 14 Gabor Kelemen (allotropia) 2024-10-31 08:06:36 UTC
Verified in 

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b0195d40f3abc343b88f767f4fe109a9c1d44347
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded

the Text Import dialog now retains its settings, after the fix of bug 160582