diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-06-20 14:44:11 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-06-20 14:44:11 +0200 |
commit | f92fb1cc0a4fb3e2024665a4274c543f64946538 (patch) | |
tree | 9f405eb74347700db06abfd8413e6c8ed1b77576 /sc | |
parent | 309bc35559cb823415139044272b10feccdb6ae7 (diff) |
Check that EASTERSUNDAY with negative value causes error
...even though that's not obvious from the implementation of
ScInterpreter::ScEasterSunday (sc/source/core/tool/interpr2.cxx), which calls
SvNumberFormatter::ExpandTwoDigitYear on that value, which also only checks that
the value is < 100, but not whether it is non-negative. However,
ExpandTwoDigitYear takes its argument as sal_uInt16, so any negative value is
guaranteed to be converted into a large sal_uInt16 value that is not < 100.
Change-Id: I6f10672e510918f6e9010061541829fcd98e6dd0
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/functions/fods/eastersunday.fods | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sc/qa/unit/data/functions/fods/eastersunday.fods b/sc/qa/unit/data/functions/fods/eastersunday.fods index 5f21573c46fe..0ff92a62ce51 100644 --- a/sc/qa/unit/data/functions/fods/eastersunday.fods +++ b/sc/qa/unit/data/functions/fods/eastersunday.fods @@ -868,6 +868,20 @@ <table:table-cell table:number-columns-repeated="9"/> </table:table-row> <table:table-row table:style-name="ro2"> + <table:table-cell table:style-name="ce12" table:formula="of:=ORG.OPENOFFICE.EASTERSUNDAY(-1)" office:value-type="string" office:string-value="" calcext:value-type="error"> + <text:p>Err:502</text:p> + </table:table-cell> + <table:table-cell office:value-type="string" calcext:value-type="string"> + <text:p>#VALUE</text:p> + </table:table-cell> + <table:table-cell table:style-name="ce16" table:formula="of:=ISERROR([.A12])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> + <text:p>TRUE</text:p> + </table:table-cell> + <table:table-cell table:style-name="ce18" table:formula="of:=FORMULA([.A12])" office:value-type="string" office:string-value="=EASTERSUNDAY(-1)" calcext:value-type="string"> + <text:p>=EASTERSUNDAY(-1)</text:p> + </table:table-cell> + </table:table-row> + <table:table-row table:style-name="ro2"> <table:table-cell table:number-columns-repeated="2"/> <table:table-cell table:style-name="ce17"/> <table:table-cell table:number-columns-repeated="11"/> @@ -991,4 +1005,4 @@ </table:named-expressions> </office:spreadsheet> </office:body> -</office:document>
\ No newline at end of file +</office:document> |