Bug 160896 - Cell Column & Row Base
Summary: Cell Column & Row Base
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-01 22:40 UTC by NOYB
Modified: 2024-05-02 20:57 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 NOYB 2024-05-01 22:40:00 UTC
Description:
Cell and range properties and methods should be one based (1) not zero based (0).

When counting things in that exist in the physical world the first item is 1, not 0.  Whether it be marbles or rows and columns.

For example
.getCellByPosition(1,1)	' Should return A1 (first row and column) not B2 (second row and column)
.getCellRangeByName("A1").CellAddress.Row	' Should return 1 (first row), not 0
.getCellRangeByName("A1").CellAddress.Column	' Should return 1 (first column), not 0


Steps to Reproduce:
1.Self evident in description
2.
3.

Actual Results:
Self evident in description

Expected Results:
Self evident in description


Reproducible: Always


User Profile Reset: No

Additional Info:
Cell and range properties and methods should be one based (1) not zero based (0).

When counting things in that exist in the physical world the first item is 1, not 0.  Whether it be marbles or rows and columns.

For example
.getCellByPosition(1,1)	' Should return A1 (first row and column) not B2 (second row and column)
.getCellRangeByName("A1").CellAddress.Row	' Should return 1 (first row), not 0
.getCellRangeByName("A1").CellAddress.Column	' Should return 1 (first column), not 0
Comment 1 Rafael Lima 2024-05-02 18:49:11 UTC
Unfortunately this cannot be changed. It would break all Calc macros in existence.

Also, in most programming languages arrays and matrices are indexed starting at zero.

My take: WF
Comment 2 NOYB 2024-05-02 20:57:34 UTC
A "Row_Column_Base" option would be similar to the already existing "Base" option that sets the default base {0|1} for arrays and would not break any existing macros.  The default behavior would remain 0 base.  Just like it does for the array base option.

There is a direct correlation to the spreadsheet rows and columns labeling in the physical real world here.  The spreadsheet rows and columns functions follow this direct correlation with using one (1) base.

Using zero (0) base in macros to reference spreadsheet rows and columns is inconsistent with the spreadsheet functions and creates confusion, error and extra effort in development and troubleshooting.

When there is a direct correlation to a physical world counted item, such as spreadsheet rows an columns, a one (1) base is appropriate and easier for humans to work with.  Computer applications are tools of humans and as such they should accommodate humans, rather than humans accommodating computer applications.

The argument that it has always been done that way or is done that way elsewhere is weak status quo prevention of change for the betterment.

Please implement a rows columns base option.  It won't hurt.

Thanks