Bug 133853 - Number of columns in large sheets 16385 (XFE) instead of XFD (16384)
Summary: Number of columns in large sheets 16385 (XFE) instead of XFD (16384)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.0.0.beta1+
Hardware: All All
: medium normal
Assignee: Aron Budea
URL:
Whiteboard: target:7.1.0 target:7.0.2
Keywords:
Depends on:
Blocks: Calc-large-spreadsheets
  Show dependency treegraph
 
Reported: 2020-06-10 10:55 UTC by [REDACTED]
Modified: 2020-08-17 17:58 UTC (History)
3 users (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 [REDACTED] 2020-06-10 10:55:24 UTC
Description:
The number of columns in large sheets enabled spreadsheets is 16385 while Tools -> Options -> LibreOffice(Dev) Calc -> Defaults -> Option: [x] Enable very large spreadsheets (16m rows, 16384 columns) states that large sheets should have 16384 columns.

Steps to Reproduce:
1. Open a new cals spreadsheet with large sheets enabled
2. CTRL+Right arrow (jump to last column)
3. See header which is labeled XFE
4. Enter formula =COLUMN() and result is 16385

Actual Results:
The sheet has 16385 columns (XFE)

Expected Results:
The sheet should have 16384 columns (XFD)


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Not sure but this may be related to bug #tdf133033
Comment 1 [REDACTED] 2020-06-10 10:57:25 UTC
Forgot to mention my system data.

Version: 7.0.0.0.beta1, Build ID: 94f789cbb33335b4a511c319542c7bdc31ff3b3c
CPU threads: 4; OS: Linux 4.12; UI render: default; VCL: kf5
Locale: en-US (en_US.UTF-8); UI: en-US, Calc: threaded
Comment 2 Roman Kuznetsov 2020-06-10 15:04:03 UTC
confirm in

Version: 7.0.0.0.beta1+ (x64)
Build ID: c46a704943be830d603ba0421a329ccb58b8b209
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: default; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded

but i don't think it's a bug...
Comment 3 [REDACTED] 2020-06-10 15:32:22 UTC
At least it is an inconsistency of what is stated in the settings dialog and what you finally get. I addition the fact that the number of columns doesn't match a power of 2 boundary (2^14) seems suspicious (to me - sorry got no better wording).
Comment 4 Aron Budea 2020-08-15 11:03:49 UTC
Noel, is there a reason why the JUMBO constants aren't set to max - 1, like the old ones?

Ie.
const SCROW       MAXROWCOUNT    = 1048576;
const SCCOL       MAXCOLCOUNT    = 1024;
...
const SCROW       MAXROW         = MAXROWCOUNT - 1;
const SCCOL       MAXCOL         = MAXCOLCOUNT - 1;
...
const SCROW       MAXROW_JUMBO   = 16 * 1000 * 1000;
const SCCOL       MAXCOL_JUMBO   = 16384;
https://opengrok.libreoffice.org/xref/core/sc/inc/address.hxx?r=32ff26f7&mo=2549&fi=70#73
Comment 5 Noel Grandin 2020-08-15 13:03:26 UTC
Yes, that is a mistake, feel free to fix it
Comment 6 Commit Notification 2020-08-15 17:32:03 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8f53858381e0cd6a3391c4ce8a097cdafa9c8df0

tdf#133853 Large spreadsheets have 16385 columns instead of 16384

It will be available in 7.1.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 Aron Budea 2020-08-15 18:00:26 UTC
Thanks for the confirmation, Noel! Fix pushed, not sure what the policy with experimental features is, but backport to 7.0 is on gerrit, in worst case it can be abandoned.
Comment 8 Commit Notification 2020-08-17 11:01:04 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

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

tdf#133853 Large spreadsheets have 16385 columns instead of 16384

It will be available in 7.0.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 9 Roman Kuznetsov 2020-08-17 17:58:09 UTC
verified in

Version: 7.1.0.0.alpha0+ (x64)
Build ID: <buildversion>
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Vulkan; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

build from 18 August 2020