summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorWinfried Donkers <osc@dci-electronics.nl>2012-06-09 12:43:30 +0200
committerEike Rathke <erack@redhat.com>2012-06-12 22:30:00 +0200
commit033cce3e0fbb72a9400836923be96c5036aaacb0 (patch)
tree9436b0e5e28152fc0dce036e89fa0722babebe46 /formula
parenta741932eb4e83148a341cfd5c6a30ff1878e3149 (diff)
fdo#50822 add function XOR to calc as in ODFF1.2
Change-Id: I994119c0520658775d07f776237d31a03f53ab52
Diffstat (limited to 'formula')
-rw-r--r--formula/inc/formula/compiler.hrc5
-rw-r--r--formula/inc/formula/opcode.hxx1
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx1
-rw-r--r--formula/source/core/resource/core_resource.src5
4 files changed, 10 insertions, 2 deletions
diff --git a/formula/inc/formula/compiler.hrc b/formula/inc/formula/compiler.hrc
index a2d4bb52f10f..4babe0ed4fe5 100644
--- a/formula/inc/formula/compiler.hrc
+++ b/formula/inc/formula/compiler.hrc
@@ -400,8 +400,9 @@
#define SC_OPCODE_BITRSHIFT 398
#define SC_OPCODE_BITLSHIFT 399
#define SC_OPCODE_GET_DATEDIF 400
-#define SC_OPCODE_STOP_2_PAR 401
-#define SC_OPCODE_LAST_OPCODE_ID 401 /* last OpCode */
+#define SC_OPCODE_XOR 401
+#define SC_OPCODE_STOP_2_PAR 402
+#define SC_OPCODE_LAST_OPCODE_ID 402 /* last OpCode */
/*** Internal ***/
#define SC_OPCODE_INTERNAL_BEGIN 9999
diff --git a/formula/inc/formula/opcode.hxx b/formula/inc/formula/opcode.hxx
index a1543ddcb427..16b12ece14a2 100644
--- a/formula/inc/formula/opcode.hxx
+++ b/formula/inc/formula/opcode.hxx
@@ -89,6 +89,7 @@ enum OpCodeEnum
ocGreaterEqual = SC_OPCODE_GREATER_EQUAL,
ocAnd = SC_OPCODE_AND,
ocOr = SC_OPCODE_OR,
+ ocXor = SC_OPCODE_XOR,
ocIntersect = SC_OPCODE_INTERSECT,
ocUnion = SC_OPCODE_UNION,
ocRange = SC_OPCODE_RANGE,
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 9e82422d1025..042e49b9f7e6 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -76,6 +76,7 @@ short lcl_GetRetFormat( OpCode eOpCode )
case ocGreaterEqual:
case ocAnd:
case ocOr:
+ case ocXor:
case ocNot:
case ocTrue:
case ocFalse:
diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src
index 12592316e384..b4ea3457a44f 100644
--- a/formula/source/core/resource/core_resource.src
+++ b/formula/source/core/resource/core_resource.src
@@ -56,6 +56,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF
String SC_OPCODE_GREATER_EQUAL { Text = ">=" ; };
String SC_OPCODE_AND { Text = "AND" ; };
String SC_OPCODE_OR { Text = "OR" ; };
+ String SC_OPCODE_XOR { Text = "XOR" ; };
String SC_OPCODE_INTERSECT { Text = "!" ; };
String SC_OPCODE_UNION { Text = "~" ; };
String SC_OPCODE_RANGE { Text = ":" ; };
@@ -731,6 +732,10 @@ Resource RID_STRLIST_FUNCTION_NAMES
{
Text [ en-US ] = "OR" ;
};
+ String SC_OPCODE_XOR
+ {
+ Text [ en-US ] = "XOR" ;
+ };
String SC_OPCODE_INTERSECT { Text = "!" ; };
String SC_OPCODE_UNION { Text = "~" ; };
String SC_OPCODE_RANGE { Text = ":" ; };