summaryrefslogtreecommitdiff
path: root/formula/inc
AgeCommit message (Collapse)AuthorFilesLines
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
2013-01-11fdo#56124 changes to "add functions IFERROR and IFNA"Eike Rathke1-0/+3
* reimplemented actual ScIfError() function for matrix cases and simpler pop/push of non-error values * various smaller adaptions, see also inline comments of https://gerrit.libreoffice.org/1522 Change-Id: I80a8235a2cbb548c0ef993862e76741af46e30d2
2013-01-11fdo#56124 add functions IFERROR and IFNA to calc as in ODFF1.2Winfried Donkers2-20/+24
Change-Id: I6403b51ac8c710ad3b8d2625e1482971f50e6b1d
2013-01-09fdo#58539: Correctly set cached matrix formula result.Kohei Yoshida1-1/+2
During the import, a cached matrix value only has an empty matrix of correct geometry, plus the token type of the top-left cell. The rest of the elements are imported as hybrid values. For now, this seems to do the trick. In the future we may want to change it to fully populate the matrix cache value during the import, and skip setting the hybrid values for the non-top-left elements. This commit also make several other trivial changes: * Mark pRawToken mutable so that we can mark those IsFoo() methods const. * Move the ScCompiler instance from static instance to member of ScXMLImport. Since we don't need the instance to persist once the import is over, this is more appropriate. Change-Id: I1abde03c0fcd91b02ef4dbf8b5526f7965eaf19c
2012-12-15calcishmakkica: #i90269# #i95144# #i101466# implement SUMIFS, AVERAGEIFS, ↵Marina Plakalovic2-3/+9
COUNTIFS Merged from Apache OO with adaptions. http://svn.apache.org/viewvc?rev=1381447&view=rev Original Apache OO committer: Andrew Rist <arist@apache.org> Original Author: Marina Plakalovic <makkica@openoffice.org> Original Committer: Eike Rathke [er] <eike.rathke@oracle.com> # HG changeset patch # User Eike Rathke [er] <eike.rathke@oracle.com> # Date 1288810126 -3600 # Node ID 02cf226fcde498f6fd926d45df497e9fb412fe0f # Parent 528da6bfd0daed4355d745590d5ac3a319b08fb4 Change-Id: I08754653cd2ff20536ad3e9f260f747cb127ccdd
2012-12-15calcishmakkica: #i101466# implement AVERAGEIFMarina Plakalovic2-2/+4
Merged from Apache OO with adaptions. http://svn.apache.org/viewvc?rev=1381445&view=rev Original Apache OO committer: Andrew Rist <arist@apache.org> Original Author: Marina Plakalovic <makkica@openoffice.org> Original Author: Eike Rathke [er] <eike.rathke@oracle.com> Original Committer: Eike Rathke [er] <eike.rathke@oracle.com> slightly reworked patch by <makkica> # HG changeset patch # User Eike Rathke [er] <eike.rathke@oracle.com> # Date 1284055400 -7200 # Node ID 237cb91dd986ff11eb100cc631206cda102e91f7 # Parent 1c32319bb02fdf173de6a609fca9f2e9c9f4c73a Change-Id: Id168462272dc8d618513319ebab41fde5c728b08
2012-11-01Remove unused method in formula moduleMarcos Paulo de Souza1-1/+0
Change-Id: I67259c5a3894be406b2d38900368a3f8aac86921 Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2012-10-19Merge SvListEntry and SvLBoxEntry into SvTreeListEntry.Kohei Yoshida1-4/+4
Change-Id: I89cfc8c1288c00674fe64e791c149743d377d5ee
2012-10-11kill RefEdit constructor that does not initialize the highlightingMarkus Mohrhard1-1/+0
Change-Id: I5c277526fdf376bfa96466e25975388edc3c7950
2012-07-30Typo ressource -> resourceStephan Bergmann1-1/+1
Change-Id: Id13e7acfbe34eca5e124c9032d36d6f158bfb831
2012-07-23-Werror,-Wshadow (Clang 3.1)Stephan Bergmann1-1/+1
...where a local variable in a nested class shadows a member of an outer class. Fixed by renaming the relevant outer class members as "m..." Change-Id: I6caa33914ff1060e08f66eadde879fb7b4e3e7cc
2012-07-02Remove unused definesThomas Arnhold1-3/+0
Some of them were commented out for documentation purpose. Change-Id: I29a6b2cbe774b527f0c3a0be5675160817a7f3ce
2012-06-28re-base on ALv2 code.Michael Meeks13-308/+191
2012-06-27Remove unused include filesThomas Arnhold1-32/+0
Those never get included at any point in the code. Change-Id: I17736e005635b9e57759cfc95176a99e7c5e8988
2012-06-22re-base on ALv2 code.Michael Meeks1-23/+14
Change-Id: I8018d9b5fa01d1720c0392dc5fdc4a0656f25a35
2012-06-21re-base on ALv2 code.Michael Meeks4-98/+62
Change-Id: I6c145e984c885c7e06caa1c27bfb354ea49ad9ce
2012-06-21re-base on ALv2 code.Michael Meeks1-26/+17
Change-Id: Ice06e639213aeb6f7f23cbf4634947dd25613db1
2012-06-12fdo#50822 add function XOR to calc as in ODFF1.2Winfried Donkers2-2/+4
Change-Id: I994119c0520658775d07f776237d31a03f53ab52
2012-05-13fdo#44456 added calc function DATEDIF as in ODF1.2Winfried Donkers2-3/+5
Change-Id: I082ea20d02bf37d515fc33d627281696fc48fcb6
2012-04-23Unused code removalJavier Silva Sanahuja1-1/+0
2012-03-23.hrc files don't need executable bitsMichael Stahl2-0/+0
2012-03-23.h files don't need executable bitsMichael Stahl1-0/+0