Bug 106236 - PDURATION function Constraints: rate > 0
Summary: PDURATION function Constraints: rate > 0
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Winfried Donkers
URL:
Whiteboard: target:5.4.0
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-28 15:33 UTC by raal
Modified: 2017-03-09 17:23 UTC (History)
2 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 raal 2017-02-28 15:33:41 UTC
Description:
>
> =PDURATION(-0.025,2000,2200) return result, but should return error,
> because in ODFF spcification is Constraints: rate > 0. Second row in the
> test has different result then excel online.
>

Another catch: the code doesn't check for the constraints at all.
If you create a bug, I will start fixing it.

The different result in Excel Online I confirm. 

Actual Results:  
.

Expected Results:
.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:51.0) Gecko/20100101 Firefox/51.0
Comment 1 raal 2017-02-28 15:35:25 UTC
Winfried confirmed
Comment 2 Commit Notification 2017-03-06 15:53:17 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ccd030e61fa43c472b85b184882e87f4fab2faf2

tdf#106236 Check for all constraints with Calc function PDURATION.

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 raal 2017-03-09 17:23:41 UTC
verified in  Version: 5.4.0.0.alpha0+
Build ID: a5a6694128728c48c1a8482450a21ad49025c40c
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-03-07_02:52:26