Created attachment 115948 [details]
Screenshot of Calc 5.1 vs Excel
Recent builds of Calc are adding erroneous Selection List dropdowns to some imported XLSX files.
Steps to reproduce:
1. Open attachment 81710 [details] in a recent build of Calc
2. Open attachment 81710 [details] in Excel or Calc 4.4
3. Compare Sheet: "London Olympic stats"
Not reproducible with:
Version 184.108.40.206 Build ID: 2e2573268451a50806fcd60ae2d9fe01dd0ce24
Reproducible with all version until master since:
Version 220.127.116.11 Build ID: 40ff705089295be5be0aae9b15123f687c05b0a
This seems to have begun at the below commit.
Not Cc'ing the author by his request.
Author: Markus Mohrhard <email@example.com>
Date: Sat Nov 2 17:04:34 2013 +0100
remember column style during XLSX import, fdo#70315
WE overwrote the column style that was set earlier with the default
Created attachment 118718 [details]
Same bug in another file
When reviewing the Results of the 2015 /r/Linux Distribution Survey, I came across the same bug in the "HateIndex" Sheet
Migrating Whiteboard tags to Keywords: (bibisected)
This is a strange bug. I don't know if a memory corruption issue or time-out issue, but if you load the bugs docs enough times, occasionally they will render properly. Maybe 1/20 times you'll get the correct results on load.
Created attachment 125644 [details]
Poof that this bug is Random
First attempt to open the file, it correctly imported. Next 5 successive attempts all resulted in incorrect imports.
Indeed one in every 3 to 5 times it loads fine for me
Build ID: 9f0827d5824f1418bd3e26bb3ac9458179898e9c
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default;
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-09-06_07:30:01
Locale: nl-NL (nl_NL.UTF-8); Calc: group
Adding Cc: to Markus Mohrhard
This happens if the formatting is set through some other way than the normal formatting. In the case of the bug document this happens through the table. That table has its own formatting that is applied before the formatting from the cells is applied.
Based on this observation my fix seems to be a bit naive and we need to store the column styles in a map. And instead of taking the first ScPatternAttr in a column we need to query that map for the default column format.
Also no idea why this should be a perf issue.
perf issue? Performance? I don't think so. It is sometimes non reproducible. Could it be a race condition/timing issue? Just now, first try of a recent build, I could not reproduce it again. 2nd try I could.
Did you look at both test documents? Are they caused by the same issue?
Thanks for looking into this!
(In reply to Luke from comment #12)
> perf issue? Performance? I don't think so. It is sometimes non reproducible.
> Could it be a race condition/timing issue? Just now, first try of a recent
> build, I could not reproduce it again. 2nd try I could.
> Did you look at both test documents? Are they caused by the same issue?
> Thanks for looking into this!
The screenshot that is used as proof is from an auto-filter whereas the problem is related to table styles.
*** Bug 107641 has been marked as a duplicate of this bug. ***
@markus.mohrhard As I don't see any activity since a year ago, I will assign this bug to me (I've started working on it).
I also can confirm that issue is related to styles: When I removed style application from the code, additional buttons weren't shown (original ones were present).
Szymon Kłos committed a patch related to this issue.
It has been pushed to "master":
tdf#91567 Apply pattern without AutoFilter only
It will be available in 6.0.0.
The patch should be included in the daily builds available at
http://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.
Verified FIXED in Version: 18.104.22.168.alpha0+ (x64)
Build ID: 88179e3de8865ea07d5017ca0723afd10ad44ba7
Tested attachment 81710 [details], attachment 118718 [details], and attachment 133078 [details]. All 3 were fixed by Szymon's patch.
Thank you Szymon Kłos!