summaryrefslogtreecommitdiff
path: root/formula
AgeCommit message (Collapse)Author
2016-10-19tdf#93894: Prohibit grouping when certain token types are present.Kohei Yoshida
For instance, column / row label tokens don't work correctly in grouped cells with the current implementation. Change-Id: Idf86312ef15fbfd4382aa90ee6d131c671a80683 (cherry picked from commit e944d9510404d8c67b3867d7cd9f313fd5091004) Reviewed-on: https://gerrit.libreoffice.org/30027 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-06-27correct OOXML function name is EFFECT instead of EFFECTIVEEike Rathke
(cherry picked from commit ed5bcef57b678cb92c68bf842a72e50f4dd1e2ea) accept EFFECTIVE as EFFECT in OOXML import (cherry picked from commit f3f89f4f3180b0fd63c5290c665894c6a27f2ae2) 18a914972d69a37e9dcf5b18ffbea9177004dad7 Change-Id: Ieb7484afe210e378efd43ba3a181cd90d29619b9 Reviewed-on: https://gerrit.libreoffice.org/26702 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-06-10check for svDouble when stripping DCOUNT/A argument, tdf#70806 follow-upEike Rathke
Change-Id: Ic7897b5240f9f3f66eb71485ef9eed4fa8ce87e1 (cherry picked from commit 2b6710c2b50c83f62824fd2b258b112a5e911da1) Reviewed-on: https://gerrit.libreoffice.org/26158 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-05-30cid#1362174, 1362177: USE_AFTER_FREE+resource leak due to copypastaJulien Nabet
Change-Id: Icd903335fdef3921781e2f16e98a0e10bda31e3f Reviewed-on: https://gerrit.libreoffice.org/25641 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 7a2bca302f8299d70f77952110fb4ccfa4b258c2) Reviewed-on: https://gerrit.libreoffice.org/25649 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-05-27strip 0 argument only if not part of an expression, tdf#70806Eike Rathke
Change-Id: Ia1f986a594194a1c564d815bbe2faa987eea971a (cherry picked from commit 3129b75fca1ec38fc79cbc5397b28923fc273ff9) Reviewed-on: https://gerrit.libreoffice.org/25568 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-05-27omit DCOUNT or DCOUNTA 2nd argument if 0 when writing ODFF or OOXML, tdf#70806Eike Rathke
Change-Id: I2833a1005c6941e66a09172b337e23b0bf7f2002 (cherry picked from commit a88ee01b8683ded7d9da6dbcbf4d3e0c2ed4cadc) Reviewed-on: https://gerrit.libreoffice.org/25559 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-05-25(nearly) nothing uses GetUniqueId anymore, so remove it.Caolán McNamara
The odd one out is the usage in Formula, which attempts to restore focus to a particular window identified by an unique id. In this case restore focus by keeping a VclPtr to the desired window. Change-Id: I1dc335325c109d75745c6bba2e12662e6ae50638
2016-05-20clang-tidy misc-assign-operator-signatureNoel Grandin
Change-Id: I2953a88d9e2f5923732865ef17615d5928ac5f5f Reviewed-on: https://gerrit.libreoffice.org/25154 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-19clang-tidy modernize-make-uniqueNoel Grandin
Change-Id: I550bb69ddcef69906027516ccde62cf8e87c295b Reviewed-on: https://gerrit.libreoffice.org/25138 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18update unusedmethods plugin to deal with constructorsNoel Grandin
and fix the operator< implementations in some of the other plugins too. Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035 Reviewed-on: https://gerrit.libreoffice.org/25057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-04tdf#97831 [part] Add Excel 2016 functions to CalcWinfried Donkers
Functions MINIFS and MAXIFS Change-Id: I4bd2e8b82f8377af81f4373d0c33ac286588b8df Reviewed-on: https://gerrit.libreoffice.org/24619 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-05-03tdf#97831 [part] Add Excel 2016 functions to CalcWinfried Donkers
Functions IFS and SWITCH. Change-Id: Ic43d42a933bcac883e9aa2213dd4ddeddf45abf0 Reviewed-on: https://gerrit.libreoffice.org/24424 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-05-02check presence of token, tdf#96426 follow-upEike Rathke
Change-Id: I4c368dfd113b02d208013b4ba79dff606769a150
2016-05-02Revert "crashtesting: fix ooo123540-1.xlsx etc"Eike Rathke
This reverts commit bfca69eddd3d94e74d6b73f91476b79c8f72cce7. Rather let the caller check for a valid token instead of checking it twice for other places that already do, and we usually need two valid tokens before even one call makes sens.
2016-04-30crashtesting: fix ooo123540-1.xlsx etcCaolán McNamara
Change-Id: I178c3e5818f4538bc306694115bc3d1cbe95513e
2016-04-30Fix typosAndrea Gelmini
Change-Id: Id81b16ff26283611f0b84929d831c827f847ab73 Reviewed-on: https://gerrit.libreoffice.org/24317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-28tdf#97087 Give comprehensible, unique names to idlesMuhammet Kara
Timers and idles should have programmer comprehensible, unique names Change-Id: Id0f2c0a77cd28c3ec5473e8432569739b58d2101 Reviewed-on: https://gerrit.libreoffice.org/24388 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-04-27clang-tidy modernize-loop-convert in f*Noel Grandin
Change-Id: Id866aa244378758e3bdb9e99d02cdd2ae6104e16
2016-04-26tdf#97831 [part] Add Excel 2016-Office 365 functions to CalcWinfried Donkers
Functions CONCAT and TEXTJOIN. Change-Id: I38092f77df719d11f6746ac10fe14dc53b7e93e7 Reviewed-on: https://gerrit.libreoffice.org/23601 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-04-26update loplugin stylepolice to check local pointers varsNoel Grandin
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1 Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-24first range can be anywhere before second at RPN end, tdf#96426 follow-upEike Rathke
... not just adjacent to the one at the end. So we actually can handle INDIRECT("A2:C2") INDIRECT("B1:B3") Change-Id: Ie8030ebc13bb1ae2246611f5722da97970b8c544
2016-04-23more differentiated significant whitespace recognition, tdf#96426 follow-upEike Rathke
Change-Id: I081409a82a9ff64f163115bf4597afbb9b2f5fa6
2016-04-23narrow down where a space could be an intersection, tdf#96426 follow-upEike Rathke
Change-Id: Ic53a4a0d19a11298895efb28e2786e48a071e72b
2016-04-23fully check for adjacent RPN end, tdf#96426 follow-upEike Rathke
Change-Id: I886e559c6f6041bf4889fdd6d89c12a10be70e5f
2016-04-23use FormulaToken::DeleteIfZeroRef() instead of Delete() at some placesEike Rathke
The array overflow detecting places that unconditionally deleted the token in case of overflow should do so only if no reference is held, i.e. the token was allocated with new and passed immediately without being assigned to a FormulaTokenRef. Just to be on the safe side. Change-Id: If2ccabec3725ac73fe82c23f51a291246847cfdb
2016-04-23Resolves: tdf#96426 significant whitespace as intersection in Excel syntaxEike Rathke
Also when reading/writing OOXML, so change SC_OPCODE_INTERSECT of RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML accordingly to " ", where previously "!" was expected and written, which was plain wrong. Change-Id: Ic0cfd7afc657f07bfd8e37de61b3621cc68685ff
2016-04-23simplify the ReplaceToken() offset logic to absolute offsetsEike Rathke
Change-Id: I8d02fb63bc0c5cb48aabaf7a8800f5f9ac95cbf5
2016-04-23newline shortageEike Rathke
Change-Id: Id2487480270bb2be765495bb6d5982c85ae2117f
2016-04-23change multiple ifs to switch caseEike Rathke
... obtaining mpToken->GetOpCode() only once. Change-Id: I909fef97540998a7f09115738fb76a1e963480bf
2016-04-23join two lines that cause an annoying debugger step over experienceEike Rathke
Change-Id: I50bf6710f7319f5c2ea18d8a3aa02f5c613de063
2016-04-18clang-tidy performance-unnecessary-copy-initializationNoel Grandin
probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-12Avoid reserved identifierStephan Bergmann
Change-Id: Ie86787cdcf96453c94e6859e66b158d9188f3491
2016-04-11clang-tidy performance-unnecessary-value-param in formulaNoel Grandin
Change-Id: I9f90c55f74216c2f3452e5b30d85b304668330b3
2016-04-04get rid of a TODO commentWinfried Donkers
Checked if the < is correct. It is. Calc function Choose has 1 index argument plus up to 30 value-arguments, so the maximum argument count is 31. FORMULA_MAXJUMPCOUNT is 32. Change-Id: I0bc8cc122902848dadfc92d56b6f06fbec43e4be Reviewed-on: https://gerrit.libreoffice.org/23794 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-03-31use SAL_N_ELEMENTS more widelyNoel Grandin
found using git grep -n 'sizeof.*/.*sizeof.*[0]' Change-Id: Icd4a6cc1ca8ec8ebd68e1701a02789c74cf0eb2a
2016-03-23missing nullptr check, tdf#98427Markus Mohrhard
Change-Id: I657dc0c84eab6ff5b31976fac3317adc0a99dd51
2016-03-18Resolves: tdf#96915 implement other-sheet-local named expressionsEike Rathke
Change-Id: I0d62536caa6eb455473a755067abc585662cd9a5
2016-03-18loplugin:constantparam in formulaNoel Grandin
Change-Id: I3adeed435b62ae60b5d0d4b763dceced5675cd85 Reviewed-on: https://gerrit.libreoffice.org/23330 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-14prefix domain namespace to FORECAST.* functions for ODFF, tdf#94635 follow-upEike Rathke
Change-Id: If875b538f2143eb572371dfcc086145c2f6e80f5
2016-03-10loplugin:constantparam in formulaNoel Grandin
Change-Id: I18246d34d27f1b12dfd107166b31ef16d9632462
2016-03-03tdf#94635 Add FORECAST.ETS functions to CalcWinfried Donkers
Change-Id: Ifbfff1c27fb3960a06f467630da0fa39665f0ce4 Reviewed-on: https://gerrit.libreoffice.org/20073 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-03-03loplugin:unuseddefaultparams in formulaNoel Grandin
Change-Id: I7f0baa2709db24e8299f0e1c19c0703aee1cbf4f
2016-02-23new loplugin: commaoperatorNoel Grandin
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
2016-02-18tdf#43157 Cleanup DBG_ASSERT for formula module.aybuke
Change-Id: I1be9332b4408b3c28aacfa872d63fce67adcb1fe Reviewed-on: https://gerrit.libreoffice.org/21958 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-09Remove excess newlinesChris Sherlock
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-04vcl: take into account the font width is the average font widthChris Sherlock
I'm changing the Font class function names: - SetSize -> SetFontSize - GetSize -> GetFontSize - SetHeight -> SetFontHeight - GetHeight -> GetFontHeight - SetWidth -> SetAverageFontWidth - GetWidth -> GetAverageFontWidth That's because it really makes no sense to say that there is a single constant font width because obviously proportional fonts don't have one - the best we can do is an average font width, which is what folks like Microsoft sort of do already. On a fixed font, the average is still accurate, for obvious reasons :-) I'm also not a fan of GetSize/SetSize as I find it a might too generic. Change-Id: Ib80a604ba62d6883fd6cbc7994da763976be5c70 Reviewed-on: https://gerrit.libreoffice.org/22069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-20loplugin:unusedmethodsNoel Grandin
Change-Id: Ib2dc804f55d1a96ae01f2cf31b7d55956040a72e Reviewed-on: https://gerrit.libreoffice.org/21603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-12loplugin:unusedmethods unused return value in include/formulaNoel Grandin
Change-Id: Ic5d6c11d955ef5ef53dea0bb4e5bec8167874a91
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-09Function Wizard: exclude functions with hidden flag from listsEike Rathke
Change-Id: Ia209bb44cef5969e5c9cd360aa5725708d6bdec5