Bug 160084 - Simplify comparison with zero when using basegfx::fTools::* implementation
Summary: Simplify comparison with zero when using basegfx::fTools::* implementation
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0 target:25.2.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2024-03-07 09:00 UTC by Xisco Faulí
Modified: 2024-11-19 17:20 UTC (History)
6 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 Xisco Faulí 2024-03-07 09:00:23 UTC
the implementation of

- basegfx::fTools::moreOrEqual
- basegfx::fTools::lessOrEqual
- basegfx::fTools::more
- basegfx::fTools::less

calls rtl_math_approxEqual eventually, which special-cases zero.

Sample: https://gerrit.libreoffice.org/c/core/+/164492
Comment 1 Xisco Faulí 2024-03-07 10:13:46 UTC
(In reply to Xisco Faulí from comment #0)
> the implementation of
> 
> - basegfx::fTools::moreOrEqual
> - basegfx::fTools::lessOrEqual

These two have been addressed in https://gerrit.libreoffice.org/c/core/+/164526
Comment 2 Stéphane Guillou (stragu) 2024-03-22 04:30:38 UTC
Confirmed by Mike on gerrit -> New.
Comment 3 Commit Notification 2024-03-26 16:27:46 UTC
Bogdan Buzea committed a patch related to this issue.
It has been pushed to "master":

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

tdf#160084 Simplify comparison for basegfx::fTools

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-03-27 13:28:07 UTC
Bogdan Buzea committed a patch related to this issue.
It has been pushed to "master":

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

tdf#160084 Simplify comparison for basegfx::fTools

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 5 Commit Notification 2024-04-05 11:16:03 UTC
Aaron Bourdeaux committed a patch related to this issue.
It has been pushed to "master":

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

tdf#160084 Simplify comparison for basegfx::fTools

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 6 Commit Notification 2024-04-18 13:20:37 UTC
RMZeroFour committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/68c04836ab5af32c06650c0f1f7fe39e3a0753bb

tdf#160084 Simplify comparing with zero when using fTools

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 Xisco Faulí 2024-08-19 19:33:32 UTC
Mike kaganski recently submitted a new commit for this easyhack:

commit 8bd57009d38f7551a77566a0e782a7b371aece23
Author: Mike Kaganski <mike.kaganski@collabora.com>
Date:   Fri Aug 2 11:33:14 2024 +0500

    Fix wrong / misleading uses of fTools::(more|less|equal) with literal 0
Comment 8 Commit Notification 2024-09-03 14:12:34 UTC
Bogdan Buzea committed a patch related to this issue.
It has been pushed to "master":

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

tdf#160084 Simplify comparison for basegfx::fTools

It will be available in 25.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.
Comment 9 Commit Notification 2024-09-16 04:59:56 UTC
Sohrab Kazak committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7109e1ea64a12e74d5e9a1b00cfbd447d61e8e61

tdf#160084 Simplify comparison for basegfx::fTools

It will be available in 25.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.
Comment 10 Commit Notification 2024-11-19 17:20:25 UTC
Bogdan Buzea committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/74d46954cd4a1e2377573683c3a2f7f7033ffb5b

tdf#160084 Simplify comparison for basegfx::fTools

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