| commit | 716f4ef1625cece6fe8326213df24c52d56c9432 | [log] |
|---|---|---|
| author | Winfried Donkers <winfrieddonkers@libreoffice.org> | Thu Jun 23 15:57:38 2016 +0200 |
| committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | Thu Jun 23 20:16:17 2016 +0000 |
| tree | 49c02c4a5d27c559bd3ee6258956ad5a017c1e20 | |
| parent | 0806fe8c08629e2b0bea527359b1b4bf41af686b [diff] |
tdf#100562 Add constraints for function DB Constraints in http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#DB were not all checked. Change-Id: Ife9ff7ce73d239efd0a67625990493db770f0c20 Reviewed-on: https://gerrit.libreoffice.org/26606 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 2eae22b..ac20f10 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx
@@ -1528,7 +1528,8 @@ void ScInterpreter::ScDB() double nRest = GetDouble(); double nValue = GetDouble(); if (nMonths < 1.0 || nMonths > 12.0 || nTimeLength > 1200.0 || nRest < 0.0 || nPeriod > (nTimeLength + 1.0) || nRest > nValue || nValue < 0.0) nPeriod > (nTimeLength + 1.0) || nRest > nValue || nValue <= 0.0 || nTimeLength <= 0 || nPeriod <= 0 ) { PushIllegalArgument(); return;