summaryrefslogtreecommitdiff
path: root/formula
AgeCommit message (Collapse)AuthorFilesLines
2019-05-11remove unused RefEdit/RefButtonCaolán McNamara5-264/+69
and rename WeldRefEdit/WeldRefButton back Change-Id: I3aab8585d4ba1017cc755bf21e827522e7ee6980 Reviewed-on: https://gerrit.libreoffice.org/71957 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-11weld conditional formattingCaolán McNamara1-1/+1
Change-Id: Ia9c99a17d5a95d67a412cfde959192c99caa70be Reviewed-on: https://gerrit.libreoffice.org/71956 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-09loplugin:unusedmethodsNoel Grandin4-57/+0
Change-Id: I7b4d2e5e611935284e2902b0089950768dfb7717 Reviewed-on: https://gerrit.libreoffice.org/72036 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-09loplugin:unusedfieldsNoel Grandin3-30/+0
Change-Id: I8dc5a6ef84f43bad0bee26592b3a8e95c58e6f22 Reviewed-on: https://gerrit.libreoffice.org/72027 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-07weld FormulaDialogCaolán McNamara13-1406/+1267
drop xFocusWin hack, I don't see what gain it gives Change-Id: I31952b5440797e6209ed1de6b546f1e4c0238d08 Reviewed-on: https://gerrit.libreoffice.org/71675 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-06tdf#42949 Fix IWYU warnings in include/formula/Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I564e3dd53e7718326fc1e8b98c9ae3367381703c Reviewed-on: https://gerrit.libreoffice.org/70550 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-19drop some unneeded includesCaolán McNamara3-3/+3
Change-Id: Idde1f747f500d94b3191a97e7d502794cc2b8450 Reviewed-on: https://gerrit.libreoffice.org/70972 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-17weld ScTPValidationValue and ScValidationDlgCaolán McNamara1-0/+1
Change-Id: I74b1569fe378f42c1cc78ca8d9b758c6e585c979 Reviewed-on: https://gerrit.libreoffice.org/70845 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-10weld ScCorrelationDialogCaolán McNamara2-0/+201
this is first of the calc dialogs with a range selector, so some temp scaffolding is required during interim case of both welded/unwelded in existence Change-Id: I5480179092da7b56864cef066af781b35f735ebc Reviewed-on: https://gerrit.libreoffice.org/70474 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-10clang-tidy: Fix suspicious catches of WIP unhandled-self-assignment checkTamás Zolnai1-0/+3
Change-Id: I1cb16b180f4cc5bf4d65485f03c44a06414d3580 Reviewed-on: https://gerrit.libreoffice.org/70481 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-03-25tdf#42949 Fix IWYU warnings in include/sfx2/[a-D]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444cb71bc3d045072a4b1f9eed279ed7e425a0d4 Reviewed-on: https://gerrit.libreoffice.org/69481 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-07log nice exception messages whereever possibleNoel Grandin1-4/+6
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-23loplugin:unusedfields in forms..fpickerNoel Grandin1-6/+0
Change-Id: Ifd3afbf276100e3cef802bbcc0792b43a9cd84f8 Reviewed-on: https://gerrit.libreoffice.org/68228 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-23Resolves: tdf#123477 let array/matrix formula act as ForceArray on callsEike Rathke1-2/+11
... so the inheritance and checks introduced with ParamClass::ReferenceOrRefArray work for those as well. Change-Id: Ieb87f6a3df5a388f859eae4c5558cf282cd0cde3 Reviewed-on: https://gerrit.libreoffice.org/68236 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-02-19tdf#74664 : Adds FOURIER() formulaDennis Francis2-0/+7
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>
2019-01-21o3tl::make_unique -> std::make_unique in dbaccess...frameworkGabor Kelemen1-2/+1
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Iad5a422bc5a7da43d905edc91d1c46793332ec5e Reviewed-on: https://gerrit.libreoffice.org/66545 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-16Related: tdf#122301 FREQUENCY() with ForceArrayReturn on callerEike Rathke3-1/+9
FREQUENCY() forces its direct caller into array mode, but only for the immediate subexpression and not for further operators of the same parameter. This weird Excel behaviour is stated in ECMA-376-1:2016 OOXML 18.17.7.127 FREQUENCY "A call to FREQUENCY shall be an array formula." somewhat unclear what it actually applies to, but it turned out that "a call" is indeed *only* THE direct call, see https://bugs.documentfoundation.org/show_bug.cgi?id=122301#c19 Change-Id: I145d8fe26d75d5af25b987e190bf35f2d2c03ec6 Reviewed-on: https://gerrit.libreoffice.org/66407 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-01-07tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4 Reviewed-on: https://gerrit.libreoffice.org/65614 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-08use Image(OUString) instead of Image(Bitmap(OUString))Noel Grandin2-6/+6
which benefits LOOL since we can delay creating the image until we know the dpi setting of the display we are going to write to. Achieved by perl -pi -w -e "s/\bImage\s*\(\s*BitmapEx\s*\((\w+)\s*\)\s*\)/Image\(\1\)/g" $( git grep -lw "BitmapEx" ) followed by git grep -nP '\bImage\s*\(\s*BitmapEx\s*\(' followed by commenting out the BitmapEx(OUString) constructor and seeing what needed adjusting. Change-Id: I3224e11937d720fa484b0d659d25673a9e809267 Reviewed-on: https://gerrit.libreoffice.org/64760 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann1-2/+2
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-28drop some unnecessary includesCaolán McNamara3-3/+0
Change-Id: I474b5762e6a07982fddc0315a67181399ea4c30e Reviewed-on: https://gerrit.libreoffice.org/64156 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-25tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski1-5/+4
Change-Id: If173f42302553b164267909a0a3156bb25a6d558 Reviewed-on: https://gerrit.libreoffice.org/63957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-23convert FormulaDlgMode to scoped enumNoel Grandin1-7/+7
and drop unused ARGS value Change-Id: I9b9d0c9ea64a2174759dcf6406bdf6cd5be5862a Reviewed-on: https://gerrit.libreoffice.org/63892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-11-10clang-tidy: (WIP) bugprone-too-small-loop-variable findings 2Tamás Zolnai1-4/+4
Change-Id: I1ddf3fe0e5fad265ae14712a23469b684253079d Reviewed-on: https://gerrit.libreoffice.org/63241 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-11-09Resolves: tdf#120895 new ParamClass::ReferenceOrRefArray, tdf#58874 relatedEike Rathke3-9/+28
Too many side conditions are possible with implicit array of references in array mode. Propagate new ReferenceOrRefArray parameter class to indicate the preferred return type for arguments to functions whose parameters explicitly handle array of references. Change-Id: I1f01266495c2ef1941ffe0cb7c2e0a5ae0bb7e69 Reviewed-on: https://gerrit.libreoffice.org/63201 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-11-07move SvTreeListBox to vclCaolán McNamara4-4/+4
Change-Id: I04a146d3d8a428ac1678827dc883525c40240a44 Reviewed-on: https://gerrit.libreoffice.org/62787 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-06loplugin:collapseif in dbaccess..lotuswordproNoel Grandin1-5/+2
Change-Id: Ia2a0d25c3833dfde0cd28337361f3cbd2aa29662 Reviewed-on: https://gerrit.libreoffice.org/62934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-03tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski1-7/+3
Change-Id: I27bf92770431f6a1f35e1c8224c0847555a8d43f Reviewed-on: https://gerrit.libreoffice.org/62819 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-28update old 'interface-requires' comments to <requires> tagCaolán McNamara2-2/+2
Change-Id: If7533650ae543f9d43a3a50fdfc137141fa64586 Reviewed-on: https://gerrit.libreoffice.org/62444 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-26tdf#42949 Fix IWYU warnings in include/unotools/*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444c43b9d549977039f25bec2b5bf666c3e15e0e Reviewed-on: https://gerrit.libreoffice.org/62041 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
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
2018-10-23remove all use_action_appearance linesCaolán McNamara2-15/+0
Change-Id: I031676e939f53a28b1a62654ffe0a91b95dea029 Reviewed-on: https://gerrit.libreoffice.org/62234 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-20copy and paste errorCaolán McNamara1-1/+1
Change-Id: If19bd49e14ec5347312949bf4ba4d4c0719e22ef Reviewed-on: https://gerrit.libreoffice.org/61981 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-10-19clang-tidy readability-container-size-emptyNoel Grandin1-1/+1
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17loplugin:staticvar in editeng..frameworkNoel Grandin1-1/+1
Change-Id: I8e555a98f74f61e6e40122564b7ad19ca07a8a91 Reviewed-on: https://gerrit.libreoffice.org/61866 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin1-2/+2
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15Resolves: tdf#102257 RANDBETWEEN() volatile like RAND(), ScRecalcMode::ALWAYSEike Rathke1-1/+9
Change-Id: I01698e6b9981d7dd15bf42fcb69a7bd4778d1798 Reviewed-on: https://gerrit.libreoffice.org/61792 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-14drop unnecessary vcl/group.hxx includesCaolán McNamara4-4/+0
Change-Id: I09d86ee7e156ac71d7c1f9fd58d43751037d2629 Reviewed-on: https://gerrit.libreoffice.org/61761 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-11Resolves: tdf#90698 catch list (1;2) of non-references as errorEike Rathke1-4/+23
Change-Id: Icc6f93bbf85df245ba332ce89791a1c8d266b1c6 Reviewed-on: https://gerrit.libreoffice.org/61639 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-10add ScTokenArray::Finalize() to explicitly reduce memory usageLuboš Luňák1-1/+14
Since ScTokenArray::Add() overallocates memory, make sure we do not keep such possibly large arrays. Since any copying of ScTokenArray implicitly finalizes as well, this is not a big problem right now, but then why needlessly do the copies? (next commit) Change-Id: I55398bcd8fb31f1be5a4b8e3f5a71b26649a7594 Reviewed-on: https://gerrit.libreoffice.org/60862 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-10-10avoid usually needless large allocation for formula token arrayLuboš Luňák1-1/+12
Change-Id: I855af060e1aeb91bccfc923ca567ad34d64be757 Reviewed-on: https://gerrit.libreoffice.org/60861 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann3-3/+3
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-02make all notebooks scrollable and enable_popupCaolán McNamara1-0/+2
Change-Id: I16a6d556ca4c6b3f876dc0c8380d01fe3022209e Reviewed-on: https://gerrit.libreoffice.org/61195 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-28Remove unused ocIndirectXL and ocAddressXLEike Rathke1-2/+1
Separated implementation is gone since long. Change-Id: I78279f631c9205202af92ad8e248f9a1226b7a19 Reviewed-on: https://gerrit.libreoffice.org/61075 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-09-17New loplugin:externalStephan Bergmann3-3/+3
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-08loplugin:simplifyconstruct in filter..frameworkNoel Grandin1-1/+0
Change-Id: Ida4307a92dfb1dbd14da5a30b6ee1f0fd6a9455e Reviewed-on: https://gerrit.libreoffice.org/60194 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-29Replace find_if with proper quantifier algorithmsArkadiy Illarionov1-3/+2
Change-Id: Icc820a47ac891c358883f9c01224f676c58fdd11 Reviewed-on: https://gerrit.libreoffice.org/59744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16remove mempoolNoel Grandin1-11/+0
we've been using the normal memory allocator instead of the sal slab allocator ever since commit bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 Date: Wed Nov 15 16:52:44 2017 +0530 Disable custom allocator Change-Id: I3383962cedb85d56fbec695398901f6ff7057651 Reviewed-on: https://gerrit.libreoffice.org/58577 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-13loplugin:returnconstant in forms..fpickerNoel Grandin2-9/+2
Change-Id: I3f0bead636632682488cbe677fd7fee60350f04d Reviewed-on: https://gerrit.libreoffice.org/58876 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>