[Libreoffice-commits] core.git: formula/inc include/formula sc/inc sc/qa sc/source

2020-04-28 Thread Eike Rathke (via logerrit)
 formula/inc/core_resource.hrc|   12 ++
 include/formula/compiler.hxx |6 +++--
 include/formula/opcode.hxx   |4 +++
 sc/inc/helpids.h |2 +
 sc/inc/scfuncs.hrc   |   16 +
 sc/qa/extras/scfunctionlistobj.cxx   |2 -
 sc/qa/unit/ucalc.cxx |2 +
 sc/source/core/data/funcdesc.cxx |4 ++-
 sc/source/core/inc/interpre.hxx  |3 ++
 sc/source/core/tool/interpr1.cxx |   42 ++-
 sc/source/core/tool/interpr4.cxx |2 +
 sc/source/core/tool/parclass.cxx |1 
 sc/source/filter/excel/xlformula.cxx |4 ++-
 sc/source/filter/oox/formulabase.cxx |4 ++-
 14 files changed, 93 insertions(+), 11 deletions(-)

New commits:
commit 716655820d69a0d6aaa2714cb4f12bae1aa2b862
Author: Eike Rathke 
AuthorDate: Mon Apr 27 23:12:42 2020 +0200
Commit: Eike Rathke 
CommitDate: Tue Apr 28 11:26:38 2020 +0200

Resolves: tdf#127831 implement RAND.NV() and RANDBETWEEN.NV() non-volatile

Same as RAND() and RANDBETWEEN() but not recalculating on every
change, just the normal expression recalculation.

Change-Id: I8ba7099125e487a78bd3d91db8b666c2f36b22fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92994
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index 2ad8d3cf5a9e..cf1cca33373f 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -467,6 +467,8 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "ORG.LIBREOFFICE.ROUNDSIG" , SC_OPCODE_ROUNDSIG },
 { "ORG.LIBREOFFICE.REGEX" , SC_OPCODE_REGEX },
 { "ORG.LIBREOFFICE.FOURIER", SC_OPCODE_FOURIER },
+{ "ORG.LIBREOFFICE.RAND.NV" , SC_OPCODE_RANDOM_NV },
+{ "ORG.LIBREOFFICE.RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV },
 { nullptr,  -1 }
 };
 
@@ -911,6 +913,8 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "_xlfn.ORG.LIBREOFFICE.ROUNDSIG" , SC_OPCODE_ROUNDSIG },
 { "_xlfn.ORG.LIBREOFFICE.REGEX" , SC_OPCODE_REGEX },
 { "_xlfn.ORG.LIBREOFFICE.FOURIER", SC_OPCODE_FOURIER },
+{ "_xlfn.ORG.LIBREOFFICE.RAND.NV" , SC_OPCODE_RANDOM_NV },
+{ "_xlfn.ORG.LIBREOFFICE.RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV },
 { nullptr,  -1 }
 };
 
@@ -1360,6 +1364,8 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "ROUNDSIG" , SC_OPCODE_ROUNDSIG },
 { "REGEX" , SC_OPCODE_REGEX },
 { "FOURIER", SC_OPCODE_FOURIER },
+{ "RAND.NV" , SC_OPCODE_RANDOM_NV },
+{ "RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV },
 { nullptr, -1 }
 };
 
@@ -1808,6 +1814,8 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "ROUNDSIG" , SC_OPCODE_ROUNDSIG },
 { "REGEX" , SC_OPCODE_REGEX },
 { "FOURIER", SC_OPCODE_FOURIER },
+{ "RAND.NV" , SC_OPCODE_RANDOM_NV },
+{ "RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV },
 { nullptr, -1 }
 };
 
@@ -2255,6 +2263,8 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "ROUNDSIG" , SC_OPCODE_ROUNDSIG },
 { "REGEX" , SC_OPCODE_REGEX },
 { "FOURIER", SC_OPCODE_FOURIER },
+{ "RAND.NV" , SC_OPCODE_RANDOM_NV },
+{ "RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV },
 { nullptr, -1 }
 };
 
@@ -2699,6 +2709,8 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "SEARCHB") , SC_OPCODE_SEARCHB },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "REGEX") , SC_OPCODE_REGEX },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "FOURIER"), SC_OPCODE_FOURIER },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "RAND.NV"), SC_OPCODE_RANDOM_NV },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "RANDBETWEEN.NV"), 
SC_OPCODE_RANDBETWEEN_NV },
 
 { nullptr, -1 }
 };
diff --git a/include/formula/compiler.hxx b/include/formula/compiler.hxx
index c5e5cfdf0da2..baf3e23f6161 100644
--- a/include/formula/compiler.hxx
+++ b/include/formula/compiler.hxx
@@ -112,7 +112,8 @@
 #define SC_OPCODE_GET_ACT_TIME   80
 #define SC_OPCODE_NO_VALUE   81
 #define SC_OPCODE_CURRENT82
-#define SC_OPCODE_STOP_NO_PAR83
+#define SC_OPCODE_RANDOM_NV  83
+#define SC_OPCODE_STOP_NO_PAR84
 
 /*** Functions with one parameter ***/
 #define SC_OPCODE_START_1_PAR90
@@ -507,7 +508,8 @@
 #define SC_OPCODE_SEARCHB   496
 #define SC_OPCODE_REGEX 497
 #define SC_OPCODE_FOURIER   498
-#define SC_OPCODE_STOP_2_PAR499 /* last function with two or more 
parameters' OpCode + 1 */
+#define SC_OPCODE_RANDBETWEEN_NV499
+#define SC_OPCODE_STOP_2_PAR500 /* last function with two or more 
parameters' OpCode + 1 */
 
 #define SC_OPCODE_STOP_FUNCTION SC_OPCODE_STOP_2_PAR/* last 
function's OpCode + 1 */
 #define SC_OPCODE_LAST_OPCODE_ID(SC_OPCODE_STOP_FUNCTION - 1)   /* last 
OpCode */
diff --git a/include/formula/opcode.hxx 

[Libreoffice-commits] core.git: formula/inc include/formula sc/inc sc/qa sc/source

2018-10-25 Thread Libreoffice Gerrit user
 formula/inc/core_resource.hrc|6 +++
 include/formula/compiler.hxx |3 +
 include/formula/opcode.hxx   |2 +
 sc/inc/helpids.h |1 
 sc/inc/scfuncs.hrc   |   12 +++
 sc/qa/unit/ucalc.cxx |1 
 sc/source/core/data/funcdesc.cxx |3 +
 sc/source/core/inc/interpre.hxx  |1 
 sc/source/core/tool/interpr1.cxx |   55 +++
 sc/source/core/tool/interpr4.cxx |1 
 sc/source/filter/excel/xlformula.cxx |3 +
 sc/source/filter/oox/formulabase.cxx |3 +
 12 files changed, 87 insertions(+), 4 deletions(-)

New commits:
commit 8dec85a3b3f4cbd46b03f707458347a25cc22c15
Author: Eike Rathke 
AuthorDate: Wed Oct 24 19:42:35 2018 +0200
Commit: Eike Rathke 
CommitDate: Thu Oct 25 12:13:58 2018 +0200

Resolves: tdf#113977 implement REGEX() spreadsheet function

REGEX( Text ; Expression [ ; Replacement ] )

Using ICU regular expressions
http://userguide.icu-project.org/strings/regexp

Change-Id: I4cb9b8ba77cfb5b8faab93037aa0d947609383d7
Reviewed-on: https://gerrit.libreoffice.org/62332
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index 467a64bdf3f0..4cc928fd9a6a 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -465,6 +465,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "COM.MICROSOFT.ENCODEURL" , SC_OPCODE_ENCODEURL },
 { "ORG.LIBREOFFICE.RAWSUBTRACT" , SC_OPCODE_RAWSUBTRACT },
 { "ORG.LIBREOFFICE.ROUNDSIG" , SC_OPCODE_ROUNDSIG },
+{ "ORG.LIBREOFFICE.REGEX" , SC_OPCODE_REGEX },
 { nullptr,  -1 }
 };
 
@@ -907,6 +908,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "_xlfn.ENCODEURL" , SC_OPCODE_ENCODEURL },
 { "_xlfn.ORG.LIBREOFFICE.RAWSUBTRACT" , SC_OPCODE_RAWSUBTRACT },
 { "_xlfn.ORG.LIBREOFFICE.ROUNDSIG" , SC_OPCODE_ROUNDSIG },
+{ "_xlfn.ORG.LIBREOFFICE.REGEX" , SC_OPCODE_REGEX },
 { nullptr,  -1 }
 };
 
@@ -1354,6 +1356,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "ENCODEURL" , SC_OPCODE_ENCODEURL },
 { "RAWSUBTRACT" , SC_OPCODE_RAWSUBTRACT },
 { "ROUNDSIG" , SC_OPCODE_ROUNDSIG },
+{ "REGEX" , SC_OPCODE_REGEX },
 { nullptr, -1 }
 };
 
@@ -1800,6 +1803,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "ENCODEURL" , SC_OPCODE_ENCODEURL },
 { "RAWSUBTRACT" , SC_OPCODE_RAWSUBTRACT },
 { "ROUNDSIG" , SC_OPCODE_ROUNDSIG },
+{ "REGEX" , SC_OPCODE_REGEX },
 { nullptr, -1 }
 };
 
@@ -2245,6 +2249,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "ENCODEURL" , SC_OPCODE_ENCODEURL },
 { "RAWSUBTRACT" , SC_OPCODE_RAWSUBTRACT },
 { "ROUNDSIG" , SC_OPCODE_ROUNDSIG },
+{ "REGEX" , SC_OPCODE_REGEX },
 { nullptr, -1 }
 };
 
@@ -2674,6 +2679,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "ROUNDSIG") , SC_OPCODE_ROUNDSIG },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "FINDB") , SC_OPCODE_FINDB },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "SEARCHB") , SC_OPCODE_SEARCHB },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "REGEX") , SC_OPCODE_REGEX },
 
 { nullptr, -1 }
 };
diff --git a/include/formula/compiler.hxx b/include/formula/compiler.hxx
index 0d5b1cc8f632..09a507fc3d68 100644
--- a/include/formula/compiler.hxx
+++ b/include/formula/compiler.hxx
@@ -505,7 +505,8 @@
 #define SC_OPCODE_REPLACEB  494
 #define SC_OPCODE_FINDB 495
 #define SC_OPCODE_SEARCHB   496
-#define SC_OPCODE_STOP_2_PAR497 /* last function with two or more 
parameters' OpCode + 1 */
+#define SC_OPCODE_REGEX 497
+#define SC_OPCODE_STOP_2_PAR498 /* last function with two or more 
parameters' OpCode + 1 */
 
 #define SC_OPCODE_STOP_FUNCTION SC_OPCODE_STOP_2_PAR/* last 
function's OpCode + 1 */
 #define SC_OPCODE_LAST_OPCODE_ID(SC_OPCODE_STOP_FUNCTION - 1)   /* last 
OpCode */
diff --git a/include/formula/opcode.hxx b/include/formula/opcode.hxx
index 437403d919b2..d2c6548e286f 100644
--- a/include/formula/opcode.hxx
+++ b/include/formula/opcode.hxx
@@ -343,6 +343,7 @@ enum OpCode : sal_uInt16
 ocFindB = SC_OPCODE_FINDB,
 ocSearchB   = SC_OPCODE_SEARCHB,
 ocNumberValue   = SC_OPCODE_NUMBERVALUE,
+ocRegex = SC_OPCODE_REGEX,
 // Matrix functions
 ocMatValue  = SC_OPCODE_MAT_VALUE,
 ocMatDet= SC_OPCODE_MAT_DET,
@@ -808,6 +809,7 @@ inline std::string OpCodeEnumToString(OpCode eCode)
 case ocText: return "Text";
 case ocSubstitute: return "Substitute";
 case ocRept: return "Rept";
+case ocRegex: return "Regex";
 case ocConcat: return "Concat";
 case ocConcat_MS: return "Concat_MS";
 case ocTextJoin_MS: return 

[Libreoffice-commits] core.git: formula/inc include/formula sc/inc sc/qa sc/source

2017-09-07 Thread Winfried Donkers
 formula/inc/core_resource.hrc|6 
 include/formula/compiler.hxx |3 
 include/formula/opcode.hxx   |1 
 sc/inc/helpids.h |1 
 sc/inc/scfuncs.hrc   |   12 
 sc/qa/unit/data/functions/text/fods/searchb.fods | 1754 +++
 sc/qa/unit/ucalc.cxx |1 
 sc/source/core/data/funcdesc.cxx |3 
 sc/source/core/inc/interpre.hxx  |1 
 sc/source/core/tool/interpr1.cxx |   45 
 sc/source/core/tool/interpr4.cxx |1 
 sc/source/filter/excel/xlformula.cxx |1 
 sc/source/filter/oox/formulabase.cxx |2 
 13 files changed, 1828 insertions(+), 3 deletions(-)

New commits:
commit 41a85500a70533e1c9791c3a4f8b6c24f2143682
Author: Winfried Donkers 
Date:   Mon Sep 4 16:00:59 2017 +0200

tdf#107135 Add missing ODFF function SEARCHB.

Change-Id: Ic72693ad8f33fb94c171751f82680eabad1d3d6d
Reviewed-on: https://gerrit.libreoffice.org/41900
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index ab40e373a7bf..cefecb43b09a 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -294,6 +294,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "LEFTB" , SC_OPCODE_LEFTB },
 { "REPLACEB" , SC_OPCODE_REPLACEB },
 { "FINDB" , SC_OPCODE_FINDB },
+{ "SEARCHB" , SC_OPCODE_SEARCHB },
 { "MIDB" , SC_OPCODE_MIDB },
 { "TEXT" , SC_OPCODE_TEXT },
 { "SUBSTITUTE" , SC_OPCODE_SUBSTITUTE },
@@ -736,6 +737,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "LEFTB" , SC_OPCODE_LEFTB },
 { "REPLACEB" , SC_OPCODE_REPLACEB },
 { "FINDB" , SC_OPCODE_FINDB },
+{ "SEARCHB" , SC_OPCODE_SEARCHB },
 { "MIDB" , SC_OPCODE_MIDB },
 { "TEXT" , SC_OPCODE_TEXT },
 { "SUBSTITUTE" , SC_OPCODE_SUBSTITUTE },
@@ -1181,6 +1183,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "LEFTB" , SC_OPCODE_LEFTB },
 { "REPLACEB" , SC_OPCODE_REPLACEB },
 { "FINDB" , SC_OPCODE_FINDB },
+{ "SEARCHB" , SC_OPCODE_SEARCHB },
 { "MIDB" , SC_OPCODE_MIDB },
 { "TEXT" , SC_OPCODE_TEXT },
 { "SUBSTITUTE" , SC_OPCODE_SUBSTITUTE },
@@ -1627,6 +1630,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "LEFTB" , SC_OPCODE_LEFTB },
 { "REPLACEB" , SC_OPCODE_REPLACEB },
 { "FINDB" , SC_OPCODE_FINDB },
+{ "SEARCHB" , SC_OPCODE_SEARCHB },
 { "MIDB" , SC_OPCODE_MIDB },
 { "TEXT" , SC_OPCODE_TEXT },
 { "SUBSTITUTE" , SC_OPCODE_SUBSTITUTE },
@@ -2071,6 +2075,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "LEFTB" , SC_OPCODE_LEFTB },
 { "REPLACEB" , SC_OPCODE_REPLACEB },
 { "FINDB" , SC_OPCODE_FINDB },
+{ "SEARCHB" , SC_OPCODE_SEARCHB },
 { "MIDB" , SC_OPCODE_MIDB },
 { "TEXT" , SC_OPCODE_TEXT },
 { "SUBSTITUTE" , SC_OPCODE_SUBSTITUTE },
@@ -2668,6 +2673,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "RAWSUBTRACT") , SC_OPCODE_RAWSUBTRACT 
},
 { NC_("RID_STRLIST_FUNCTION_NAMES", "ROUNDSIG") , SC_OPCODE_ROUNDSIG },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "FINDB") , SC_OPCODE_FINDB },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "SEARCHB") , SC_OPCODE_SEARCHB },
 
 { nullptr, -1 }
 };
diff --git a/include/formula/compiler.hxx b/include/formula/compiler.hxx
index e4b646d48f16..a1ebabe04874 100644
--- a/include/formula/compiler.hxx
+++ b/include/formula/compiler.hxx
@@ -504,7 +504,8 @@
 #define SC_OPCODE_ROUNDSIG  493
 #define SC_OPCODE_REPLACEB  494
 #define SC_OPCODE_FINDB 495
-#define SC_OPCODE_STOP_2_PAR496 /* last function with two or more 
parameters' OpCode + 1 */
+#define SC_OPCODE_SEARCHB   496
+#define SC_OPCODE_STOP_2_PAR497 /* last function with two or more 
parameters' OpCode + 1 */
 
 #define SC_OPCODE_STOP_FUNCTION SC_OPCODE_STOP_2_PAR/* last 
function's OpCode + 1 */
 #define SC_OPCODE_LAST_OPCODE_ID(SC_OPCODE_STOP_FUNCTION - 1)   /* last 
OpCode */
diff --git a/include/formula/opcode.hxx b/include/formula/opcode.hxx
index dd0492db6caa..181de360864e 100644
--- a/include/formula/opcode.hxx
+++ b/include/formula/opcode.hxx
@@ -342,6 +342,7 @@ enum OpCode : sal_uInt16
 ocMidB  = SC_OPCODE_MIDB,
 ocReplaceB  = SC_OPCODE_REPLACEB,
 ocFindB = SC_OPCODE_FINDB,
+ocSearchB   = SC_OPCODE_SEARCHB,
 ocNumberValue   = SC_OPCODE_NUMBERVALUE,
 // Matrix functions
 ocMatValue  = SC_OPCODE_MAT_VALUE,
diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index 7b07c69d78fa..4f285dc45881 100644

[Libreoffice-commits] core.git: formula/inc include/formula sc/inc sc/qa sc/source

2017-07-25 Thread Winfried Donkers
 formula/inc/core_resource.hrc  |6 
 include/formula/compiler.hxx   |3 
 include/formula/opcode.hxx |1 
 sc/inc/helpids.h   |1 
 sc/inc/scfuncs.hrc |   12 
 sc/qa/unit/data/functions/text/fods/findb.fods | 1699 +
 sc/qa/unit/ucalc.cxx   |1 
 sc/source/core/data/funcdesc.cxx   |3 
 sc/source/core/inc/interpre.hxx|1 
 sc/source/core/tool/interpr1.cxx   |   50 
 sc/source/core/tool/interpr4.cxx   |1 
 sc/source/filter/excel/xlformula.cxx   |1 
 sc/source/filter/oox/formulabase.cxx   |2 
 13 files changed, 1773 insertions(+), 8 deletions(-)

New commits:
commit a5ec33c9e108a822f418884ab470a7788de3d0e7
Author: Winfried Donkers 
Date:   Thu Jul 20 15:18:18 2017 +0200

tdf#107135 Add missing ODFF function FINDB.

Change-Id: I96bbca8e6d91448fbb27fe95a57ce62a78d1b2c5
Reviewed-on: https://gerrit.libreoffice.org/40242
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index cd9db81c9994..ab40e373a7bf 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -293,6 +293,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "RIGHTB" , SC_OPCODE_RIGHTB },
 { "LEFTB" , SC_OPCODE_LEFTB },
 { "REPLACEB" , SC_OPCODE_REPLACEB },
+{ "FINDB" , SC_OPCODE_FINDB },
 { "MIDB" , SC_OPCODE_MIDB },
 { "TEXT" , SC_OPCODE_TEXT },
 { "SUBSTITUTE" , SC_OPCODE_SUBSTITUTE },
@@ -734,6 +735,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "RIGHTB" , SC_OPCODE_RIGHTB },
 { "LEFTB" , SC_OPCODE_LEFTB },
 { "REPLACEB" , SC_OPCODE_REPLACEB },
+{ "FINDB" , SC_OPCODE_FINDB },
 { "MIDB" , SC_OPCODE_MIDB },
 { "TEXT" , SC_OPCODE_TEXT },
 { "SUBSTITUTE" , SC_OPCODE_SUBSTITUTE },
@@ -1178,6 +1180,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "RIGHTB" , SC_OPCODE_RIGHTB },
 { "LEFTB" , SC_OPCODE_LEFTB },
 { "REPLACEB" , SC_OPCODE_REPLACEB },
+{ "FINDB" , SC_OPCODE_FINDB },
 { "MIDB" , SC_OPCODE_MIDB },
 { "TEXT" , SC_OPCODE_TEXT },
 { "SUBSTITUTE" , SC_OPCODE_SUBSTITUTE },
@@ -1623,6 +1626,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "RIGHTB" , SC_OPCODE_RIGHTB },
 { "LEFTB" , SC_OPCODE_LEFTB },
 { "REPLACEB" , SC_OPCODE_REPLACEB },
+{ "FINDB" , SC_OPCODE_FINDB },
 { "MIDB" , SC_OPCODE_MIDB },
 { "TEXT" , SC_OPCODE_TEXT },
 { "SUBSTITUTE" , SC_OPCODE_SUBSTITUTE },
@@ -2066,6 +2070,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "RIGHTB" , SC_OPCODE_RIGHTB },
 { "LEFTB" , SC_OPCODE_LEFTB },
 { "REPLACEB" , SC_OPCODE_REPLACEB },
+{ "FINDB" , SC_OPCODE_FINDB },
 { "MIDB" , SC_OPCODE_MIDB },
 { "TEXT" , SC_OPCODE_TEXT },
 { "SUBSTITUTE" , SC_OPCODE_SUBSTITUTE },
@@ -2662,6 +2667,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "ENCODEURL") , SC_OPCODE_ENCODEURL },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "RAWSUBTRACT") , SC_OPCODE_RAWSUBTRACT 
},
 { NC_("RID_STRLIST_FUNCTION_NAMES", "ROUNDSIG") , SC_OPCODE_ROUNDSIG },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "FINDB") , SC_OPCODE_FINDB },
 
 { nullptr, -1 }
 };
diff --git a/include/formula/compiler.hxx b/include/formula/compiler.hxx
index 4921dd303330..e4b646d48f16 100644
--- a/include/formula/compiler.hxx
+++ b/include/formula/compiler.hxx
@@ -503,7 +503,8 @@
 #define SC_OPCODE_MAXIFS_MS 492
 #define SC_OPCODE_ROUNDSIG  493
 #define SC_OPCODE_REPLACEB  494
-#define SC_OPCODE_STOP_2_PAR495 /* last function with two or more 
parameters' OpCode + 1 */
+#define SC_OPCODE_FINDB 495
+#define SC_OPCODE_STOP_2_PAR496 /* last function with two or more 
parameters' OpCode + 1 */
 
 #define SC_OPCODE_STOP_FUNCTION SC_OPCODE_STOP_2_PAR/* last 
function's OpCode + 1 */
 #define SC_OPCODE_LAST_OPCODE_ID(SC_OPCODE_STOP_FUNCTION - 1)   /* last 
OpCode */
diff --git a/include/formula/opcode.hxx b/include/formula/opcode.hxx
index 1258b5824694..dd0492db6caa 100644
--- a/include/formula/opcode.hxx
+++ b/include/formula/opcode.hxx
@@ -341,6 +341,7 @@ enum OpCode : sal_uInt16
 ocLeftB = SC_OPCODE_LEFTB,
 ocMidB  = SC_OPCODE_MIDB,
 ocReplaceB  = SC_OPCODE_REPLACEB,
+ocFindB = SC_OPCODE_FINDB,
 ocNumberValue   = SC_OPCODE_NUMBERVALUE,
 // Matrix functions
 ocMatValue  = SC_OPCODE_MAT_VALUE,
diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index