Bug 128895 - Hidden Columns but keep reappearing! Unlike Rows which will stay hidden (steps: comment 19)
Summary: Hidden Columns but keep reappearing! Unlike Rows which will stay hidden (step...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha1+
Hardware: All All
: high major
Assignee: Justin L
URL:
Whiteboard: target:7.4.0 target:7.3.0.0.beta2 tar...
Keywords: bibisected, bisected, regression
: 136618 142029 142769 144316 (view as bug list)
Depends on:
Blocks: Regressions-1024plus-Columns
  Show dependency treegraph
 
Reported: 2019-11-19 13:41 UTC by Mark Mclean
Modified: 2022-03-08 13:32 UTC (History)
14 users (show)

See Also:
Crash report or crash signature:


Attachments
All sheets locked, no password needed to unlock. (1.42 MB, application/vnd.oasis.opendocument.spreadsheet)
2019-11-22 22:16 UTC, Mark Mclean
Details
hiddenEmptyColumns.ods: all 1017 columns after G are hidden. (7.04 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-12-08 10:27 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Mclean 2019-11-19 13:41:14 UTC
Rows always stay hidden, but columns do not! I'm just trying to keep the sheets user friendly, and for looks sake, so it's not a must, but odd it does such, how do I keep them hidden? Calc.ods Version 6.3.2.2, on windows 10
Comment 1 Mark Mclean 2019-11-19 13:42:49 UTC
I have ask this on Ask L. O. at 
https://ask.libreoffice.org/en/question/217483/hidden-columns-keep-reappearing-after-i-hide-them/
Comment 2 m_a_riosv 2019-11-22 21:47:55 UTC Comment hidden (obsolete)
Comment 3 Mark Mclean 2019-11-22 22:16:11 UTC
Created attachment 156052 [details]
All sheets locked, no password needed to unlock.
Comment 4 m_a_riosv 2019-11-22 22:26:05 UTC
What columns were hidden that are visible on opening?
Comment 5 Mark Mclean 2019-11-22 23:08:08 UTC
I hide columns that I do not use, Like column w to amj! I tried to leave a file, but didn't understand it to well, hope its there, if not here is how I share it. http://bit.ly/faithalone
Comment 6 QA Administrators 2019-11-23 03:44:32 UTC Comment hidden (obsolete)
Comment 7 m_a_riosv 2019-11-24 13:23:06 UTC
Opening the sample file saved and reopening.

Reproducible with:
Version: 6.3.3.2 (x64)Build ID: a64200df03143b798afd1ec74a12ab50359878ed
Version: 6.4.0.0.beta1 (x64)Build ID: 4d7e5b0c40ed843384704eca3ce21981d4e98920
Version: 6.5.0.0.alpha0+ (x64)ID: d312d02cf43928361be34207a0cdd2d95b3ec5fd

But not with:
Version: 6.1.6.3 (x64)Build ID: 5896ab1714085361c45cf540f76f60673dd96a72
Version: 6.2.8.1 (x64)Build ID: 815fe723fb0e60e4a39ff860f907cc63980a0232
Comment 8 Mark Mclean 2019-11-25 10:16:27 UTC Comment hidden (obsolete)
Comment 9 m_a_riosv 2019-11-25 10:39:52 UTC Comment hidden (obsolete)
Comment 10 Mark Mclean 2019-11-25 11:02:27 UTC Comment hidden (obsolete)
Comment 11 raal 2019-11-25 22:53:37 UTC Comment hidden (obsolete)
Comment 12 Xisco Faulí 2019-11-26 12:21:15 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=7282014e362a1529a36c88eb308df8ed359c2cfa

author	Noel Grandin <noel.grandin@collabora.co.uk>	2019-02-01 15:15:16 +0100
committer	Mike Kaganski <mike.kaganski@collabora.com>	2019-04-05 13:43:52 +0200
commit 7282014e362a1529a36c88eb308df8ed359c2cfa (patch)
tree 2776ad9601f494330076ac58c08554e719c6ab3a
parent df30a4515b1303b0891baa53754fa9b3e47e0c02 (diff)
tdf#50916 Makes numbers of columns dynamic.

Bisected with: bibisect-linux64-6.3

Adding Cc: to Noel Grandin
Comment 13 karolbienkowski 2020-03-04 09:24:06 UTC
Still happening in LO 6.4.1 under Linux
Comment 14 Jedison 2020-09-09 17:48:55 UTC
Estou com a versão 7.0 instalada e esse problema continua ocorrendo. As colunas ocultas à direita da planilha voltam a aparecer cada vez que se abre uma nova versão dela, mesmo que se volte a ocultar as colunas e gravar. Não são todas as colunas que reaparecem, e ainda não consegui identificar um padrão para o problema.
Comment 15 m_a_riosv 2020-09-09 22:46:04 UTC Comment hidden (obsolete)
Comment 16 m_a_riosv 2021-06-10 16:14:38 UTC
*** Bug 142769 has been marked as a duplicate of this bug. ***
Comment 17 Timur 2021-06-11 09:04:37 UTC
*** Bug 142029 has been marked as a duplicate of this bug. ***
Comment 18 Timur 2021-06-11 10:13:51 UTC
This bug was reported for 6.3-6.4, sample attachment 156052 [details] and column W to AMJ.
Bug 142029 was reported for 6.4, sample attachment 171636 [details], column J to column AMJ.
Bug 142769 was reported for 7.1, sample steps, D to last column.

We had "no repro for 7.1" but also it was once for 6.4, meaning that something is missing, I guess exact or large number of hidden columns.
I don't know how to select to AMJ, I hope it's not by scrolling.
Comment 19 Timur 2021-06-11 10:24:57 UTC
Steps in bug 142769 are good, and with that and Bug 142029 I reproduced with 7.2+:
1) I create a calc ods spreadsheet file
2) select columns from D to last column with: Ctrl-Shift+right arrow and hide
3) save the file and close
4) reopen the file and type something in some cell
5) save the file again and close
6) reopen the file and see that columns BM through AMJ are visible again.
Comment 20 m_a_riosv 2021-06-11 14:22:20 UTC Comment hidden (obsolete)
Comment 21 Timur 2021-06-11 16:54:20 UTC Comment hidden (obsolete)
Comment 22 mrkalvin 2021-06-12 00:24:02 UTC
See the example video of the bug happening. The 'C' column should be the last visible column. But after reopening the edited file, the columns from BM onwards became visible. These columns were expected to be hidden.

https://sendvid.com/kf3tqdzn

or

https://www.mediafire.com/file/al5ijvcmaern6jr/bug.mp4/file

------
Version: 7.1.4.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Ubuntu package version: 1:7.1.4~rc2-0ubuntu0.20.04.1~lo1
Linux Mint Cinnamon x64 20.1 X11
Comment 23 Buovjaga 2021-07-05 14:58:18 UTC
*** Bug 136618 has been marked as a duplicate of this bug. ***
Comment 24 Timur 2021-09-06 08:41:54 UTC
*** Bug 144316 has been marked as a duplicate of this bug. ***
Comment 25 Timur 2021-09-06 13:40:24 UTC
If experimental Large spreadsheet is enabled, bug seen already after step 3 from Comment 19. If not, it takes another save and reopen, as explained.
Comment 26 DK 2021-11-14 19:33:16 UTC
I'm using 7.2.2.2 x86 portable version on Windows 10. I have a spreadsheet with 360 rows, columns A-P in use, Q-AMJ are hidden, or are supposed to be but they don't stay that way. This is what I'm seeing happen:

Hide columns -> save -> exit Calc -> open ods -> columns still hidden.

Open ods -> columns still hidden, but Calc forgot my last view (should be @ row 316 but view was at row 1) -> exit Calc. Repeated 5 times for consistency.

Open ods -> change data in a cell -> exit Calc with X icon and save changes with dialog that pops up about unsaved changes -> open ods -> columns not hidden anymore.

Seems like some condition in the load or save function is ignoring the hidden flag for the columns.

Please let me know if I can help further.
Comment 27 Justin L 2021-12-08 09:12:46 UTC
Prior to comment 12's commit, LO was exporting something like 
table:number-columns-repeated="1017"  // (1024- number of columns showing)

but afterwards it was exporting
table:number-columns-repeated="57"    // (64 - number of columns showing)
Comment 28 Justin L 2021-12-08 10:27:56 UTC
Created attachment 176792 [details]
hiddenEmptyColumns.ods: all 1017 columns after G are hidden.

Round-tripping this minimalistic example changes it to repeat for only 64 columns. So I'm guessing that because there is no content in any of these columns, the spreadsheet remains at its INITIALCOLCOUNT of 64.

That suggests that import just needs to increase the column allocation to account for the hidden columns.
Comment 29 Justin L 2021-12-08 17:59:08 UTC
Proposed fix at http://gerrit.libreoffice.org/c/core/+/126540.

Note that we won't be able to FIX already broken documents, but this will prevent it from happening in the future.

[I suppose that since we know the first 64 columns are hidden, we don't actually need to display more, so perhaps some work could still be done to FIX the already broken documents. However, I expect that will be a LOT more complex and regression-prone.]
Comment 30 Commit Notification 2021-12-11 06:21:38 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/297ab561c6754f89326a1e8ce1751233669578d7

tdf#128895 sc xmlimport: create enough dynamic cols if props

It will be available in 7.4.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 31 Commit Notification 2021-12-11 15:57:11 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/ea229b09c3de7edb8fcb01a727b656f4d35821d4

tdf#128895 sc xmlimport: create enough dynamic cols if props

It will be available in 7.3.0.0.beta2.

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 32 Commit Notification 2021-12-13 15:02:11 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/5e76c14d20799a2cbecdccc2e8b71961a0696f15

tdf#128895 sc xmlimport: create enough dynamic cols if props

It will be available in 7.2.5.

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 33 Mark Mclean 2021-12-13 16:06:08 UTC
I updated 7.2.4.1 windows 10. Same computer I used when I first mentioned the bug! THANKS! A lot, it works. I sort a forgot how, why, it would reopen columns but I closed file and reopened it and no extra columns. Great work! Again Thanks