diff options
author | Winfried Donkers <winfrieddonkers@libreoffice.org> | 2014-11-11 17:33:48 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-04-29 23:39:09 +0000 |
commit | 010b2d2d9be846fb6b10848204e29e1bc00ef1ea (patch) | |
tree | 7ac115c5bd37be8b9e4cf295a84385d63f212d8e /sc/source/ui/src | |
parent | 3a6866c2953c17a55536fa434b9fceda670d0685 (diff) |
fdo#69552 [part 1] make calc functions CEILING comply with ODF1.2
Also, add support for CEILING.MATH and fix small
deficiencies with CEILING functions, as most are interwoven.
Change-Id: I0d9a46fb17e982ccf1e9d9e403b58926172c1a7a
Reviewed-on: https://gerrit.libreoffice.org/7088
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/ui/src')
-rw-r--r-- | sc/source/ui/src/scfuncs.src | 102 |
1 files changed, 87 insertions, 15 deletions
diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src index eed70bce13ff..abeba90be42a 100644 --- a/sc/source/ui/src/scfuncs.src +++ b/sc/source/ui/src/scfuncs.src @@ -4459,8 +4459,8 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS1 Text [ en-US ] = "The number to be rounded up." ; }; }; - // -=*# Resource for function CEILING #*=- - Resource SC_OPCODE_CEIL + // -=*# Resource for function CEILING.XCL #*=- + Resource SC_OPCODE_CEIL_MS { String 1 // Description { @@ -4470,8 +4470,8 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS1 { 0; ID_FUNCTION_GRP_MATH; - U2S( HID_FUNC_OBERGRENZE ); - 3; 0; 0; 1; + U2S( HID_FUNC_CEIL_MS ); + 2; 0; 0; 0; }; String 2 // Name of Parameter 1 @@ -4490,17 +4490,9 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS1 { Text [ en-US ] = "The number to whose multiple the value is rounded." ; }; - String 6 // Name of Parameter 3 - { - Text [ en-US ] = "Mode" ; - }; - String 7 // Description of Parameter 3 - { - Text [ en-US ] = "If given and not equal to zero then rounded up according to amount when a negative number and significance." ; - }; }; // -=*# Resource for function CEILING.PRECISE #*=- - Resource SC_OPCODE_CEIL_MS + Resource SC_OPCODE_CEIL_PRECISE { String 1 // Description { @@ -4510,7 +4502,7 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS1 { 0; ID_FUNCTION_GRP_MATH; - U2S( HID_FUNC_CEIL_MS ); + U2S( HID_FUNC_CEIL_PRECISE ); 2; 0; 1; 0; }; @@ -4563,7 +4555,87 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS1 Text [ en-US ] = "The number to whose multiple the value is rounded." ; }; }; - // -=*# Resource for function FLOOR #*=- + // -=*# Resource for function CEILING #*=- + Resource SC_OPCODE_CEIL + { + String 1 // Description + { + Text [ en-US ] = "Rounds a number up to the nearest multiple of significance." ; + }; + ExtraData = + { + 0; + ID_FUNCTION_GRP_MATH; + U2S( HID_FUNC_OBERGRENZE ); + 3; 0; 1; 1; + 0; + }; + String 2 // Name of Parameter 1 + { + Text [ en-US ] = "Number" ; + }; + String 3 // Description of Parameter 1 + { + Text [ en-US ] = "The number to be rounded up." ; + }; + String 4 // Name of Parameter 2 + { + Text [ en-US ] = "Significance" ; + }; + String 5 // Description of Parameter 2 + { + Text [ en-US ] = "If given the number to whose multiple the value is rounded, else -1 or 1 depending on sign of Number." ; + }; + String 6 // Name of Parameter 3 + { + Text [ en-US ] = "Mode" ; + }; + String 7 // Description of Parameter 3 + { + Text [ en-US ] = "If given and not equal to zero then rounded up according to amount when a negative number and significance." ; + }; + }; + // -=*# Resource for function CEILING.MATH #*=- + Resource SC_OPCODE_CEIL_MATH + { + String 1 // Description + { + Text [ en-US ] = "Rounds a number up to the nearest multiple of significance." ; + }; + ExtraData = + { + 0; + ID_FUNCTION_GRP_MATH; + U2S( HID_FUNC_CEIL_MATH ); + 3; 0; 1; 1; + 0; + }; + String 2 // Name of Parameter 1 + { + Text [ en-US ] = "Number" ; + }; + String 3 // Description of Parameter 1 + { + Text [ en-US ] = "The number to be rounded up." ; + }; + String 4 // Name of Parameter 2 + { + Text [ en-US ] = "Significance" ; + }; + String 5 // Description of Parameter 2 + { + Text [ en-US ] = "If given the number to whose multiple the value is rounded, else 1." ; + }; + String 6 // Name of Parameter 3 + { + Text [ en-US ] = "Mode" ; + }; + String 7 // Description of Parameter 3 + { + Text [ en-US ] = "For negative numbers; if given and not equal to zero then rounds away from zero, else rounds towards zero." ; + }; + }; + // -=*# Resource for function UNTERGRENZE #*=- Resource SC_OPCODE_FLOOR { String 1 // Description |