From c6b49f9098fb6c9816202e8d465c342788736af5 Mon Sep 17 00:00:00 2001 From: Wolfgang Pechlaner Date: Sun, 4 Sep 2011 14:40:25 +0200 Subject: BITxxx functions according to ODF 1.2 OpenFormula Implements BITAND, BITOR, BITXOR, BITLSHIFT and BITRSHIFT as specified by OASIS OpenDocument Format 1.2 OpenFormula / ODFF. Changes made by the committer: * Original submission added the new functions to the Logical group, that group has only functions though that return a logical value 1/0/true/false. ODFF groups them under "Bit operation functions" that currently is not available in Calc. Added the functions to the Mathematical group instead. * Changed descriptions of functions in the Function Wizard. * One sal_uInt64 constant instead of several identical literal 281474976710655 values. * Replaced 'or' operators with || * Don't push two return values, if PushIllegalArgument() was used don't use PushDouble() thereafter. * Treat double values with ::rtl::math::approxFloor() to obtain integer values. * For BITLSHIFT and BITRSHIFT implemented a different algorithm following the ODFF specification that allows larger shift values. * Use our block braces style, respectively don't use block braces for one-line if-statements. * Fixed indentation levels. * Adapted RTL_LOGFILE_CONTEXT_AUTHOR to say "pechlaner". Credit to whom credit is due ;-) --- sc/inc/helpids.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sc/inc/helpids.h') diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h index c80dd1bda5a0..5546cf838789 100644 --- a/sc/inc/helpids.h +++ b/sc/inc/helpids.h @@ -692,3 +692,8 @@ #define HID_FUNC_UNICODE "SC_HID_FUNC_UNICODE" #define HID_FUNC_UNICHAR "SC_HID_FUNC_UNICHAR" #define HID_FUNC_NUMBERVALUE "SC_HID_FUNC_NUMBERVALUE" +#define HID_FUNC_BITAND "SC_HID_FUNC_BITAND" +#define HID_FUNC_BITOR "SC_HID_FUNC_BITOR" +#define HID_FUNC_BITXOR "SC_HID_FUNC_BITXOR" +#define HID_FUNC_BITLSHIFT "SC_HID_FUNC_BITLSHIFT" +#define HID_FUNC_BITRSHIFT "SC_HID_FUNC_BITRSHIFT" -- cgit