summaryrefslogtreecommitdiff
path: root/sc/source/ui/src/scfuncs.src
diff options
context:
space:
mode:
authorWolfgang Pechlaner <libo@pechlaner.at>2011-09-04 14:40:25 +0200
committerEike Rathke <erack@erack.de>2011-09-07 12:27:27 +0200
commitc6b49f9098fb6c9816202e8d465c342788736af5 (patch)
treed1074becd133921d5dc77cf3afe9f1ac74516c67 /sc/source/ui/src/scfuncs.src
parent5b80048a1ef119db569f9e9a259e94e773201b1f (diff)
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 ;-)
Diffstat (limited to 'sc/source/ui/src/scfuncs.src')
-rw-r--r--sc/source/ui/src/scfuncs.src156
1 files changed, 156 insertions, 0 deletions
diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src
index 4f99f90b8437..8f8bb04e5be1 100644
--- a/sc/source/ui/src/scfuncs.src
+++ b/sc/source/ui/src/scfuncs.src
@@ -9037,6 +9037,162 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
Text [ en-US ] = "Defines the character used as the decimal point." ;
};
};
+
+ Resource SC_OPCODE_BITAND
+ {
+ String 1 // Description
+ {
+ Text [ en-US ] = "Bitwise \"AND\" of two integers.";
+ };
+ ExtraData =
+ {
+ 0;
+ ID_FUNCTION_GRP_MATH;
+ U2S( HID_FUNC_BITAND );
+ 2; 0; 0;
+ 0;
+ };
+ String 2 // Name of Parameter 1
+ {
+ Text [ en-US ] = "Number" ;
+ };
+ String 3 // Description of Parameter 1
+ {
+ Text [ en-US ] = "Positive integer less than 2^48." ;
+ };
+ String 4 // Name of Parameter 2
+ {
+ Text [ en-US ] = "Number" ;
+ };
+ String 5 // Description of Parameter 2
+ {
+ Text [ en-US ] = "Positive integer less than 2^48." ;
+ };
+ };
+ Resource SC_OPCODE_BITOR
+ {
+ String 1 // Description
+ {
+ Text [ en-US ] = "Bitwise \"OR\" of two integers.";
+ };
+ ExtraData =
+ {
+ 0;
+ ID_FUNCTION_GRP_MATH;
+ U2S( HID_FUNC_BITOR );
+ 2; 0; 0;
+ 0;
+ };
+ String 2 // Name of Parameter 1
+ {
+ Text [ en-US ] = "Number" ;
+ };
+ String 3 // Description of Parameter 1
+ {
+ Text [ en-US ] = "Positive integer less than 2^48." ;
+ };
+ String 4 // Name of Parameter 2
+ {
+ Text [ en-US ] = "Number" ;
+ };
+ String 5 // Description of Parameter 2
+ {
+ Text [ en-US ] = "Positive integer less than 2^48." ;
+ };
+ };
+ Resource SC_OPCODE_BITXOR
+ {
+ String 1 // Description
+ {
+ Text [ en-US ] = "Bitwise \"exclusive OR\" of two integers.";
+ };
+ ExtraData =
+ {
+ 0;
+ ID_FUNCTION_GRP_MATH;
+ U2S( HID_FUNC_BITXOR );
+ 2; 0; 0;
+ 0;
+ };
+ String 2 // Name of Parameter 1
+ {
+ Text [ en-US ] = "Number" ;
+ };
+ String 3 // Description of Parameter 1
+ {
+ Text [ en-US ] = "Positive integer less than 2^48." ;
+ };
+ String 4 // Name of Parameter 2
+ {
+ Text [ en-US ] = "Number" ;
+ };
+ String 5 // Description of Parameter 2
+ {
+ Text [ en-US ] = "Positive integer less than 2^48." ;
+ };
+ };
+ Resource SC_OPCODE_BITRSHIFT
+ {
+ String 1 // Description
+ {
+ Text [ en-US ] = "Bitwise right shift of an integer value.";
+ };
+ ExtraData =
+ {
+ 0;
+ ID_FUNCTION_GRP_MATH;
+ U2S( HID_FUNC_BITRSHIFT );
+ 2; 0; 0;
+ 0;
+ };
+ String 2 // Name of Parameter 1
+ {
+ Text [ en-US ] = "Number" ;
+ };
+ String 3 // Description of Parameter 1
+ {
+ Text [ en-US ] = "The value to be shifted. Positive integer less than 2^48." ;
+ };
+ String 4 // Name of Parameter 2
+ {
+ Text [ en-US ] = "Shift" ;
+ };
+ String 5 // Description of Parameter 2
+ {
+ Text [ en-US ] = "The integer number of bits the value is to be shifted." ;
+ };
+ };
+ Resource SC_OPCODE_BITLSHIFT
+ {
+ String 1 // Description
+ {
+ Text [ en-US ] = "Bitwise left shift of an integer value.";
+ };
+ ExtraData =
+ {
+ 0;
+ ID_FUNCTION_GRP_MATH;
+ U2S( HID_FUNC_BITLSHIFT );
+ 2; 0; 0;
+ 0;
+ };
+ String 2 // Name of Parameter 1
+ {
+ Text [ en-US ] = "Number" ;
+ };
+ String 3 // Description of Parameter 1
+ {
+ Text [ en-US ] = "The value to be shifted. Positive integer less than 2^48." ;
+ };
+ String 4 // Name of Parameter 2
+ {
+ Text [ en-US ] = "Shift" ;
+ };
+ String 5 // Description of Parameter 2
+ {
+ Text [ en-US ] = "The integer number of bits the value is to be shifted." ;
+ };
+ };
};
#if defined(U2S)