summaryrefslogtreecommitdiff
path: root/sc/inc/scfuncs.hrc
AgeCommit message (Collapse)AuthorFilesLines
44 hourstdf#150866: Add support for TEXTSPLIT functionXisco Fauli1-0/+18
Change-Id: I918b46c29791f865e841eb967b2799f7986538bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185027 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-03-05make consistent parameter names and descriptions of Calc functionsStanislav Horacek1-8/+8
that have been added recently Change-Id: I29e2878ef268126dd97ed31381ecaa328a9001c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182499 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2025-02-12tdf#165119 Also fix # of param for VSTACK, HSTACKOlivier Hallot1-4/+4
+ based on https://gerrit.libreoffice.org/c/core/+/181439 Change-Id: I86c7e534bda881d84b47e81c9f36fd1cafbf59d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181506 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-02-11tdf#165119: fix number of parameters in CHOOSECOLS/CHOOSEROWSXisco Fauli1-8/+4
Change-Id: I39fee81e0fc8aaa33265a3539bd4e6dff5d9d2e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181439 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-02-10Improve description of new Calc array function argumentsOlivier Hallot1-8/+8
Change-Id: Idc93a820563601e763595cd5d3f34fd6889669e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181276 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-02-04tdf#150867: Add support for VSTACK functionXisco Fauli1-0/+10
Change-Id: I76e3267f45a0d035f6a79af934b9ce2c606b4b89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181120 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2025-02-04tdf#150868: Add support for HSTACK functionXisco Fauli1-0/+10
Change-Id: I105ffabc8dd1fa58bf3acec4a81c3217061d3a26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181100 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2025-02-01tdf#151000: Add support for CHOOSECOLS functionXisco Fauli1-0/+12
Change-Id: Id183f79a148080adebe652f63e29716910c638b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180992 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-01-30tdf#150999: Add support for CHOOSEROWS functionXisco Fauli1-0/+12
Change-Id: If7de1b243a6040424a5712ba28017176b7e36101 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180955 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-01-24tdf#151001: Add support for EXPAND functionXisco Fauli1-0/+14
Change-Id: I4eabd526d656c13da7792d3c195f036ce78bd0d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180706 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-01-24tdf#150998: Add support for DROP functionXisco Fauli1-0/+12
Change-Id: Id84cbf25e655410c3fac655cd88f1d74dc98defd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180673 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-01-23tdf#150997: Add support for TAKE functionXisco Fauli1-0/+12
Change-Id: I2e7d223707941d31db0330282f783e845497130b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180622 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-01-22tdf#150880: Add support for WRAPROWS functionXisco Fauli1-1/+13
Change-Id: I44341835403c068a61cfb79185aeabe6daf32f70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180598 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-01-22tdf#150881: Add support for WRAPCOLS functionXisco Fauli1-0/+12
Change-Id: Ie152a83dcb7bf16f7a92ab55fd801270658a2e9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180365 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-01-16tdf#150878: Add support for TOROW functionXisco Fauli1-0/+12
Change-Id: Ic1acb5c2fd08ecab7c3ee059888cf44aa45ee287 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180308 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-01-15tdf#150879: Add support for TOCOL functionXisco Fauli1-0/+12
Change-Id: I0c8bfdd8f9b806a1260cceace1ced4be2b046abb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180245 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de> Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-06-21Related: tdf#127293 Add new Match_mode option for XLOOKUP andBalazs Varga1-2/+2
XMATCH functions. Introduce a value "3" for parameter Match_mode for Regular Expression mode in XMATCH and XLOOKUP, to seperate the original Match_mode value "2", which was used for both, Wildcard and Regular Expression mode as well. Note: "The ODF TC will follow that in the specification of these functions and at the same time specify, that the host dependent properties HOST-USE-REGULAR-EXPRESSIONS and HOST-USE-WILDCARDS (file format table:use-regular-expressions and table:use-wildcards) will be ignored by these functions." https://issues.oasis-open.org/browse/OFFICE-4154 Also Microsoft Office will introduce this new value for Match_mode in XLOOKUP and XMATCH: https://insider.microsoft365.com/en-us/blog/new-regular-expression-regex-functions-in-excel Follow-up commit: 0ca20dca3349daa303b89251443f550491968a39 (Related: tdf#127293 Add unit test for xlookup regex search mode) Change-Id: Ibcbfa4cf227ab9a9d317d94c1bab8254b1f91822 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169275 Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de> Tested-by: Jenkins
2024-06-06tdf#137543 - Add new LET function to CalcBalazs Varga1-0/+12
Add new LET function to Calc which assigns names to calculation results. TODO: oasis proposal Change-Id: Ia0d56a30751a44a72e364a28b64fd8f617e997dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168349 Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-06-04Resolves tdf#161395 - Rename Whole Number to IntegerHeiko Tietze1-1/+1
Change-Id: Id4cce115823781e5f2a4870d38d1f456cdf417a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168395 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-06-04Related: tdf#128425 tdf#127293 - Extend function wizard descriptionBalazs Varga1-4/+4
about match_mode and search_mode options. Also do not allow wildcard match mode with binary search mode as it was decided at the odf meetings. Change-Id: Iadc1b6735ae62bb07675a664d9954ebc27519691 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168366 Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de> Tested-by: Jenkins
2024-05-17tdf#160835 Fix the use of "population" in Calc functionsRafael Lima1-3/+3
Change-Id: If72058a34534dc477d07e9683c0d38d7169eecf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167688 Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2024-05-17Review of UNIQUE function arguments textOlivier Hallot1-2/+2
Feel free to consider this as suggestion. Change-Id: Ia3addb8ee7157ab0e5c5a10230adabc5963f94d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167756 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-05-15tdf#126573 Add Excel2021 array function UNIQUE to CalcBalazs Varga1-0/+12
Add new function called UNIQUE to the function list. (TODO: dynamic array in separate patch, oasis proposal) Change-Id: Ie138aee545995d4af1e66be5a4cf4e99e6e2f581 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167484 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-05-15Review RANDARRAY arguments explanationOlivier Hallot1-6/+6
- As discussed in IRC, remove potential ambiguities in Min and Max - changed "Whole number" to "Integer" to distance terms used in other suites - Rephrased main RANDARRAY definition Change-Id: I5e557f1e11ce321652df04a300f2cc4103fe1161 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167645 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2024-05-08tdf#126573 Add Excel2021 array function RANDARRAY to CalcBalazs Varga1-0/+16
Add new function called RANDARRAY to the function list. (TODO: dynamic array in separate patch, oasis proposal) Change-Id: I34bad3b7e8d631d649a0350d7c1170b26161331d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167003 Tested-by: Jenkins Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-04-26tdf#126573 Add Excel2021 array function SEQUENCE to CalcBalazs Varga1-0/+14
Add new function called SEQUENCE to the function list. (TODO: dynamic array in separate patch, oasis proposal) Change-Id: I9fa6f2c83536536987542cc00a9eec5c196ada8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166245 Tested-by: Jenkins Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-03-26tdf#126573 Add Excel2021 array function SORTBY to CalcBalazs Varga1-0/+12
TODO/WIP: oasis proposal More information about how this new function works: https://support.microsoft.com/en-au/office/sortby-function-cd2d7a62-1b93-435c-b561-d6a35134f28f https://exceljet.net/functions/sortby-function Change-Id: I4538a32f7f75056d3055369fc5f4483d24fd1089 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165069 Tested-by: Jenkins Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-03-25tdf#126573 Add Excel2021 array function SORT to CalcBalazs Varga1-0/+14
TODO/WIP: oasis proposal More information about how this new function works: https://support.microsoft.com/en-au/office/sort-function-22f63bd0-ccc8-492f-953d-c20e8e44b86c https://exceljet.net/functions/sort-function Note: Move ScSortInfoArray class to sortparam.hxx, which is a more logical place. Change-Id: I70e720e93ba0414d54cb3437de0bfa066508fe30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164778 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-03-15Related: tdf#126573 Add Excel2021 array function FILTER to CalcBalazs Varga1-2/+2
Add ocFilter to matrix (array) functions. Some follow-up cosmetic clean. Follow up commit of b0791dd9216224bdb266fd0d8c87df253b6d0583 Change-Id: I4c3c786fe14ab870be8c43211ca6a76c5ff6ac6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164847 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-03-01tdf#126573 Add Excel2021 array function FILTER to CalcBalazs Varga1-0/+12
https://issues.oasis-open.org/browse/OFFICE-4156 TODO: add dynamic arrays would be useful: Older array formulas, known as legacy array formulas, always return a fixed-size result - they always spill into the same number of cells. The spilling behavior described in this topic does not apply to legacy array formulas. More info about it: https://support.microsoft.com/en-gb/office/dynamic-array-formulas-and-spilled-array-behavior-205c6b06-03ba-4151-89a1-87a7eb36e531 Related Bug: https://bugs.documentfoundation.org/show_bug.cgi?id=127808 Change-Id: I1c3769ef33fa0207f55e1c96083717c2d90402e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163955 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-02-18tdf#128425 Add Excel2021 function XMATCH to CalcBalazs Varga1-0/+14
https://issues.oasis-open.org/browse/OFFICE-4155 Change-Id: I7791ab873cf62ce882feba75dc0d722bc5990f9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163260 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-01-31tdf#127293 Add Excel2021 function XLOOKUP to CalcWinfried Donkers1-0/+18
https://issues.oasis-open.org/browse/OFFICE-4154 What is working already: xlookup with normal forward, backward search in columns/rows. Binary search in rows with real binary search algorithm, in columns only works with linear search yet. Linear forward backward wildcard/regex search in columns/rows. Looking for the first smaller or greater value with linear and binary search ALso all the combination of all these options. Except XLOOKUP not supperted wildcard/regex search with binary search. TODO in next patches: - add the binary search option for searching in columns. - Evaluate Formula calculation not working in general. Co-authored-by: Balazs Varga <balazs.varga.extern@allotropia.de> Change-Id: I15fd4479b63ec13b093d269760d1bbb5957553e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131905 Tested-by: Jenkins Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-10-12Make NC_ constexpr-friendlyStephan Bergmann1-1/+1
...by moving the char8_t -> char reinterpret_cast out of any potential constexpr paths into a new TranslateId::getId. And demonstrate constexpr'ability by making the aCategories var in OApplicationIconControl::Fill (dbaccess/source/ui/app/AppIconControl.cxx) constexpr. (And there might be more such cases that could now be made constexpr.) Change-Id: I0b4e3292faf8f6b901f9b9e934e1aa6bf0f583ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157862 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-27tdf#151309 Fix the use of t-test in the UIRafael Lima1-4/+4
As discussed in the ticket, we should use "t-test" instead of "T test". Change-Id: I0aeb122b0f9a9affd4c298915956396580cb4de7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149598 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-10-31tdf#150465 Improve description of RANDBETWEEN in function wizardRafael Lima1-3/+3
As requested by the user, this patch makes it clearer that both Bottom and Top values may be returned by the RANDBETWEEN and RANDBETWEEN.NV functions, making the Function Wizard and the online Help descriptions more similar. Change-Id: I730a9a5e42525f890c85c2489ef03797b812917a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141922 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-10-24Related: tdf#140554 Function Wizard, FIXED() second parameter default is 2Eike Rathke1-1/+1
Change-Id: Ibf01670874f753a3b7a8ad79e46175f103a11619 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141767 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-09-25Resolves: tdf#151165 Function Wizard: ISODD()/ISEVEN() truncate to integerEike Rathke1-2/+2
Change-Id: I73d06c6c40ac33f59cf38218b3e696de9aeb0b87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140569 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-02-14Recheck modules s[a-c]* with IWYUGabor Kelemen1-0/+2
See tdf#42949 for motivation Change-Id: I867e1f7a2c44210de3281b36e22708a5d32ddb7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129476 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-08-05Pass context and resource string down to boost::locale separatelyNoel Grandin1-396/+396
because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-23tdf#124176 Use pragma once in s*Vincent LE GARREC1-4/+1
sc, scaddins, sccomp, scripting Change-Id: Ia99fec9e238033821cb784810edd4762c09bd5db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112049 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-02-18tdf#140400: Percentile function wizard has a typo in the hintJulien Nabet1-2/+2
Change-Id: I4f0c72f974b410a2da7e0c7c2c505ecbf5a6a751 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110879 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-11-14Resolves: tdf#103419 - update tooltip for SWITCH in CalcSeth Chaiklin1-3/+3
Change-Id: I931ae2d4b2a26f5369c78b4f91ecd53a1b1fd4bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105464 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2020-04-28Resolves: tdf#127831 implement RAND.NV() and RANDBETWEEN.NV() non-volatileEike Rathke1-0/+16
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 <erack@redhat.com>
2019-11-11tdf#121090: Correct the last argument to HLOOKUP/VLOOKUP descriptionMike Kaganski1-4/+4
The argument is meant to define semantical meaning of the array's first column, not just define if it's sorted or not. Change-Id: I87ff172bcc13d6471ee4025e74962be89f1b0b50 Reviewed-on: https://gerrit.libreoffice.org/82376 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-11-04Fix typo in codeAndrea Gelmini1-1/+1
To complete: https://gerrit.libreoffice.org/#/c/76037 Change-Id: I4d804c4ca6f011e8a322c2d7cccb308676bfb5d2 Reviewed-on: https://gerrit.libreoffice.org/76207 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-08-12Fix typosAndrea Gelmini1-1/+1
Change-Id: I94d0e85c731801b8b0ec844ae2a8f268b2f1022e Reviewed-on: https://gerrit.libreoffice.org/77256 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-03-26tdf#74664: FOURIER: add 5th optional parameter MinimumMagnitudeDennis Francis1-1/+3
This parameter is used only if Polar=TRUE. All frequency components with magnitude less than MinimumMagnitude will be suppressed with a zero magnitude-phase entry. This is very useful when looking at the magnitude-phase spectrum of a signal because there is always some very tiny amount of rounding error when doing FFT algorithms and results in incorrect non-zero phase for non-existent frequencies. By providing a suitable value to this parameter, these non-existent frequency components can be filtered out. By default the value of this 5th parameter is 0.0, so *no* suppression is done by default. Change-Id: I422ad1bf91f42b320e98e58a19c99bf8528e4708 Reviewed-on: https://gerrit.libreoffice.org/69471 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2019-02-19tdf#120752 Clarify MATCH() third argument 'Type'Olivier Hallot1-1/+1
Change-Id: I7a034cbcbca892d80d01baf5b51da3647f45120c Reviewed-on: https://gerrit.libreoffice.org/67979 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-02-19tdf#74664 : Adds FOURIER() formulaDennis Francis1-0/+14
FOURIER(Array, GroupedByColumns, Inverse, Polar) is a matrix formula that computes discrete Fourier transform[DFT] of input array(first argument) via a radix-2, decimation-in-time fast Fourier transform algorithm. Unit test for this is coming up in a new commit. The data in input array(first argument) can be :- 1) grouped by columns (needs to be indicated by flag GroupedByColumns = TRUE) In this case the array can contain 1 or 2 columns, where the first column contains the real part of input series and second column if present contains the imaginary part of the input series. If there is only 1 column, the input series is treated as purely real. If the number of rows is not a power of 2, zeroes are appended to the input series internally to make the series length equal to the next nearest power of 2. 2) grouped by rows (needs to be indicated by flag GroupedByColumns = FALSE) In this case the array can contain 1 or 2 rows, where the first row contains the real part of input series and second row if present contains the imaginary part of the input series. If there is only 1 row, the input series is treated as purely real. If the number of columns is not a power of 2, zeroes are appended to the input series internally to make the series length equal to the next nearest power of 2. The third argument "Inverse" is a boolean flag to indicate whether an inverse DFT needs to be computed. This argument is optional and the default value is FALSE. The fourth argument Polar is a boolean flag to indicate whether the final output needs to be in polar coordinates. This argument is optional and the default value is FALSE. The result of DFT consists of two columns - first column contains the real parts (or the magnitudes if Polar=TRUE) and second column contains the imaginary parts (or the phases if Polar=TRUE). Implementation: A fairly straighforward non-recursive implementation of radix-2 FFT algorithm is written from scratch. Reference: Heckbert, P., 1995. Fourier transforms and the fast Fourier transform (FFT) algorithm. Computer Graphics, 2, pp.15-463. The normalization factor used in DFT / and inverse DFT in this implementation matches that of fft() and ifft() functions of Matlab/Octave. It also matches the one used in Wikipedia article on DFT: https://en.wikipedia.org/wiki/Discrete_Fourier_transform. Change-Id: If4a40a6ef62bce1f03c589ae5357b2049f66fe64 Reviewed-on: https://gerrit.libreoffice.org/67938 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-11-29Support occurrence number as REGEX() 4th argument, tdf#113977 follow-upEike Rathke1-2/+2
REGEX( Text ; Expression [ ; [ Replacement ] [ ; Flags|Occurrence ] ] ) REGEX(Text;Expression) extracts the first match of Expression in Text. If there is no match, #N/A is returned. REGEX(Text;Expression;Replacement) replaces the first match of Expression in Text, not extracted. If there is no match, Text is returned unmodified. REGEX(Text;Expression;Replacement;"g") replaces all matches of Expression in Text with Replacement, not extracted. If there is no match, Text is returned unmodified. REGEX(Text;Expression;;Occurrence) extracts the n-th match of Expression in Text. If there is no n-th match, #N/A is returned. If Occurrence is 0, Text is returned unmodified. REGEX(Text;Expression;Replacement;Occurrence) replaces the n-th match of Expression in Text with Replacement, not extracted. If there is no n-th match, Text is returned unmodified. If Occurrence is 0, Text is returned unmodified. Change-Id: Iadb705e4c76415c57bf510489410ec029344cca7 Reviewed-on: https://gerrit.libreoffice.org/64199 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins