Bug 159148 - Entering more than 65535 hours reset the count
Summary: Entering more than 65535 hours reset the count
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:24.8.0 target:24.2.0 target:7.6.5
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-12 12:10 UTC by Stephane Quenson
Modified: 2024-01-16 17:44 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Hours are limited to 65,536 (12.92 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-01-12 12:10 UTC, Stephane Quenson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane Quenson 2024-01-12 12:10:34 UTC
Created attachment 191889 [details]
Hours are limited to 65,536

Entering more than 65,535 hours in a cell returns the value modulo 65,536.

Steps to reproduce:
1. In cell A1, enter 65000:00, then enter. Cell A1 shows 65000:00 (format [HH]:MM)
2. In cell A2, enter 66000:00, then enter. Cell A2 shows 464:00. This is wrong, the cell is now equal to 66000 mod 65536. Note that 65536 is equal to 2^16, so there must be a wrong type of variable somewhere.
3. In cell A3, enter 65000:00, then enter.
4. In cell A4, enter =A1+A3. Cell A4 shows the correct calculation, 130000:00.
Comment 1 Werner Tietz 2024-01-12 13:11:36 UTC
Can confirm both with

Version: 7.6.4.1 (AARCH64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 4; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: en-US
Flatpak
Calc: threaded

Version: 7.4.7.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 4; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Debian package version: 4:7.4.7-1+deb12u1
Calc: threaded
Comment 2 Commit Notification 2024-01-12 17:11:29 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/988db36e0992829b01a1341e92d6d2df715a7be5

Resolves: tdf#159148 Accept int32 hours:minutes:seconds input

It will be available in 24.8.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 4 Commit Notification 2024-01-15 09:48:40 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/9d5b078120f1151e9afaf30ca8e088a871c5d443

Resolves: tdf#159148 Accept int32 hours:minutes:seconds input

It will be available in 24.2.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 5 Commit Notification 2024-01-15 09:49:43 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

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

Resolves: tdf#159148 Accept int32 hours:minutes:seconds input

It will be available in 7.6.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 6 Commit Notification 2024-01-15 20:41:32 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159148: sc_ucalc: Add unittest

It will be available in 24.8.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 Commit Notification 2024-01-16 16:56:45 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-24-2-0":

https://git.libreoffice.org/core/commit/73dd4d13f503d09d6d20a349a5bf9052680f592a

Resolves: tdf#159148 Accept int32 hours:minutes:seconds input

It will be available in 24.2.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.