summaryrefslogtreecommitdiff
path: root/formula/inc
AgeCommit message (Collapse)AuthorFilesLines
2024-11-06tdf#162177 Adapt function EASTERSUNDAY to ODF 1.4Regina Henschel1-1/+1
This includes writing ORG.OPENOFFICE.EASTERSUNDAY for ODF 1.3 and ODF 1.2. Change-Id: Ifa19021060f0d0223234c1ca1109300908e2dda1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175736 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2024-06-06tdf#137543 - Add new LET function to CalcBalazs Varga1-0/+8
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-05-15tdf#126573 Add Excel2021 array function UNIQUE to CalcBalazs Varga1-0/+6
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-08tdf#126573 Add Excel2021 array function RANDARRAY to CalcBalazs Varga1-0/+6
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/+6
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/+6
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/+6
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-01tdf#126573 Add Excel2021 array function FILTER to CalcBalazs Varga1-0/+6
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/+6
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/+6
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-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann1-6/+6
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-12Make NC_ constexpr-friendlyStephan Bergmann2-2/+2
...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>
2022-01-17Recheck modules [e-f]* with IWYUGabor Kelemen1-0/+1
See tdf#42949 for motivation Change-Id: I49a3ce10dee4b03f99156f5b641f69448e1d5617 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128479 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-11-25remove unused defines and convert some to OUStringLiteralNoel Grandin1-1/+0
Also remove the associated links.txt entries Change-Id: I5028fab2feb828875a0b772418fc29cbdfe4ce72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125773 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-24loplugin:stringliteraldefine in formual,fpickerNoel Grandin1-6/+6
Change-Id: I663a31ff6b207f43dd6f1c8240a341845b9e20b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125764 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-05Pass context and resource string down to boost::locale separatelyNoel Grandin3-12/+12
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-06-17use string_view in the Translate APINoel Grandin1-1/+2
Change-Id: I0bb0ea9d39ed623928060ffd3f2e2bc36ba33209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117272 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-23tdf#124176 Use pragma once in f*Vincent LE GARREC3-12/+3
filter, forms, fpicker, framework Change-Id: I55a25ad2dc3749e63465e638e8eeea3c322eabbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112047 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2020-04-28Resolves: tdf#127831 implement RAND.NV() and RANDBETWEEN.NV() non-volatileEike Rathke1-0/+12
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>
2020-02-16clang-format f*,h* with under 5-percent lines of changeMuhammet Kara1-1/+1
Files which could become clang-format conformant with under 5-percent lines of change relative to the total count of lines in the file are found by using bin/find-clang-format.py, and fixed with /opt/lo/bin/clang-format -i <path-of-the-file> There will be follow-up patches to fix all 'under-5-percent' files. Change-Id: I702c09bcd3a9a113b3d66c30edb6cf3b7e6a6593 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88776 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-25tdf#124176: Use pragma once instead of include guardsFaruk Demirbaş1-4/+1
Change-Id: I4a4e18cf3c61aaebb467e43ebbf846e8860f4105 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87388 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-10-11Add comments about preserving the leading '#' hash character in translationsEike Rathke1-0/+13
Comments at least end up in .po files and hopefully help.. Change-Id: I19d3177f5e36a53aa02c8b41dfee5ea6c290f1d3
2019-02-19tdf#74664 : Adds FOURIER() formulaDennis Francis1-0/+6
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-17Adapt to C++2a char_tStephan Bergmann2-2/+2
u8 literals incompatibly change their type (as implemented by recent Clang trunk) Change-Id: Ia4f7b91f5d86656a056303d2754981ab2093a739 Reviewed-on: https://gerrit.libreoffice.org/63494 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-25Resolves: tdf#113977 implement REGEX() spreadsheet functionEike Rathke1-0/+6
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 <erack@redhat.com> Tested-by: Jenkins
2017-10-23loplugin:includeform: formulaStephan Bergmann1-1/+1
Change-Id: I50b898e477e0842577bcc648540e7f4b66d5b693
2017-09-07tdf#107135 Add missing ODFF function SEARCHB.Winfried Donkers1-0/+6
Change-Id: Ic72693ad8f33fb94c171751f82680eabad1d3d6d Reviewed-on: https://gerrit.libreoffice.org/41900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-08-02normalize resource locale ctor construction mechanismsCaolán McNamara1-0/+30
make them all the same and share std::locales more various OModuleClient, etc, classes go away Change-Id: I7e3ff01a69332eeacd22e3078f66a60318de62d5 Reviewed-on: https://gerrit.libreoffice.org/40634 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-25tdf#107135 Add missing ODFF function FINDB.Winfried Donkers1-0/+6
Change-Id: I96bbca8e6d91448fbb27fe95a57ce62a78d1b2c5 Reviewed-on: https://gerrit.libreoffice.org/40242 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-07-21de-hrc various thingsCaolán McNamara1-1/+1
e.g. helpid[s].hrc -> helpids.h and insert include guards where missing move "ordinary" defines into .hxx files remove .hrc entries that are used as arguments to dialog factory when a dedicated method can be added instead Change-Id: I792fb8eb0adfaa63cf354e6e57401fc943e9196e
2017-07-21migrate to boost::gettextCaolán McNamara2-0/+2738
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-04-26remove formula bitmaps from .src filesCaolán McNamara1-0/+23
Change-Id: If1f43c9ff969c12b87999424b6e4be8390307c8f Reviewed-on: https://gerrit.libreoffice.org/36964 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-06remove unused constants in HRC filesNoel Grandin1-30/+0
Change-Id: Ia034fb16ce75caeb69fd746d4a602cd5fcfef6d1 Reviewed-on: https://gerrit.libreoffice.org/25817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-06-17remove helpids that are unused or go nowhereCaolán McNamara1-15/+0
Change-Id: I5af0b84ff4a85e72f5068d450a04d01df0592d3b
2013-04-23execute move of global headersBjoern Michaelsen17-3135/+0
see https://gerrit.libreoffice.org/#/c/3367/ and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a
2013-04-17stash the label widget for shrink mode in the edit, not the buttonCaolán McNamara1-8/+9
because we always have we a refedit, but sometimes not a refbutton, so set the label widget to use for the dialog shrink mode on the refedit instead of the refbutton. This way we get the shrunken dialog title bar updated with the label contents regardless of using the shrink button or clicking in the editbox and dragging the mouse around the spreadsheet triggering the shrink mode Change-Id: Ifdff01a30d5c65aa964d4bf544017a2927757d67
2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák7-37/+37
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk have kept them, in order not to break external API (the automatic using declaration is LO-internal). Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-03-19First cut on checking the token array on whether we could do vectorization.Kohei Yoshida2-0/+10
Not tested yet. Change-Id: I87f8a8595229d8d8e83526dc0334891d253cf2c7
2013-03-19Move GetHash() from FormulaTokenArray to ScTokenArray.Kohei Yoshida1-1/+0
To allow access to reference tokens. Change-Id: I3e2d2653722005c04b6d26e1a4ddfce0a459ef37
2013-03-19Skeleton for generating a hash value from an array of token.Kohei Yoshida1-0/+2
To be implemented... Change-Id: I4704f06b50dcc9dd5e1af9c3531ecd498015811c
2013-03-08fdo#60691 add modelines to *.src and *.hrc filesBorim2-0/+5
use solenv/bin/add-modulelines script for the task and remove all UTF bom from *.src and *.hrc files svx/source/dialog/hdft.src Change-Id: I745d4f0fe9b05436a142a03f8512970f91c41bd4
2013-03-08make link RefButton and widget for shrunk dialog title explicitCaolán McNamara1-6/+9
Change-Id: Ia6dd6cc4cf89b067310639bc3da72abbc6fa1ad2
2013-03-08Resolves: fdo#58630 crash with refEdit button in SfxTabDialogCaolán McNamara1-0/+2
Change-Id: I11d6a0f1d4852aab1fe08671fd9c2a0dac0825a7
2013-03-05make formula refButton and refEdit loadable from .uiCaolán McNamara1-2/+4
Change-Id: I2ad13cd8de2c0f8f5672a30c3c1117708368b05f
2013-03-05make RefButton quick help toggle saying shrink/expandCaolán McNamara1-0/+2
Change-Id: Id5b5518a0cb3982ebc398e57499c5c240ee7d683
2013-03-04doubled includesThomas Arnhold1-2/+0
Change-Id: I70ec796188e2388e1e4d699126f7ae817f5ff86e
2013-02-15renamed SetRecalcMode...() to SetExclusiveRecalcMode...()Eike Rathke1-5/+5
To emphasize exclusiveness of the four basic recalc modes renamed the corresponding methods. Change-Id: If6f99d2c84e4a042a3a3e3640cf416d306a2d0c5
2013-02-08fdo#60322 add calc function SKEWP as in ODFF v1.2Winfried Donkers2-2/+4
Change-Id: I4851df1473fc7788af1ac642bb0fb527ec872821 Reviewed-on: https://gerrit.libreoffice.org/2020 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2013-02-02fdo#57180 add calc function NUMBERVALUE as defined in ODFF1.2Winfried Donkers1-1/+1
Conflicts: sc/source/filter/excel/xlformula.cxx sc/source/filter/oox/formulabase.cxx Change-Id: I6ee01764ae9fc27854fd3bd8a630b9d3560192e5 Reviewed-on: https://gerrit.libreoffice.org/1477 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2013-01-24import inherited number formats with cached values, fdo#59724Markus Mohrhard1-0/+3
Change-Id: I698f60daf4e591b57d8d99c130d2e524dc10c306