summaryrefslogtreecommitdiff
path: root/formula
AgeCommit message (Collapse)AuthorFilesLines
2017-07-17Resolves: tdf#104186 spaces between function name and ( not allowed in OOXMLEike Rathke1-6/+22
Change-Id: I6f6fcdab24a426d0f62052fa2d31f4098d1d893a
2017-07-16FormulaDlg_Impl::UpdateValues: evaluate in force-array context if presentEike Rathke1-4/+22
Change-Id: I32488373bd22e644ee06920045008f3d9e20e985
2017-07-14Turn m_nEdFocus into local variable, it's not read elsewhereEike Rathke1-6/+3
... and not read after having been set in FillControls() Change-Id: I09ae5655b6187bcedc95232797bddb24b9064847
2017-07-14Prefix member variables with m_Eike Rathke1-254/+252
Code is already confusing enough.. Change-Id: I5b6f5bce32342623374df67727c44cc50b77930c
2017-07-13Reorganize Scheduler priority classesJan-Marek Glogowski2-3/+0
This is based on glibs classification of tasks, but while glib uses an int for more fine grained priority, we stay with our enum. 1. Timers start with DEFAULT priority, which directly corresponds with the previous HIGH priority 2. Idles start with DEFAULT_IDLE priority instead of the previous HIGH priority, so idle default becomes "really run when idle". As RESIZE and REPAINT are special, and the DEFAULTS are set, there is just one primary decision for the programmer: should my idle run before paint (AKA HIGH_IDLE)? If we really need a more fine-grained classification, we can add it later, or also switch to a real int. As a result, this drops many classifications from the code and drastically changes behaviour, AKA a mail merge from KDE is now as fast as Gtk+ again. Change-Id: I498a73fd02d5fb6f5d7e9f742f3bce972de9b1f9
2017-07-13loplugin:oncevar: empty strings: formulaStephan Bergmann1-2/+1
Change-Id: I76c0ac6cbd8475884fb80002ebb91f2ba84818a0
2017-07-11Buy some newlinesEike Rathke1-0/+13
Author's Enter key must had been broken as well, not only Space key.. Change-Id: I61c947a988f36cb55d1037ca0bd277fca181b09e
2017-07-11Use proper non-/array context to calculate Structure treeEike Rathke1-7/+41
Now that ScCompiler compiles ScTokenArray we can finally handle FormulaToken::IsInForceArray() as well. Still missing is the evaluation of the selected sub expression of a formula. Change-Id: I801859498569e4369db13144fe8ba08ca576350b
2017-07-11Revert "loplugin:casttovoid"Eike Rathke1-1/+2
This reverts commit ff10bc47abe0b04480c9fb5db025afbb5e402b4b. commit ff10bc47abe0b04480c9fb5db025afbb5e402b4b Date: Tue Jul 11 10:24:51 2017 +0200 loplugin:casttovoid ...as introduced with f6574be0e375e215e6f21830b9e09d77d01b5097 "FormulaDlg_Impl::MakeTree: pass down current function/operator token: In preparation of better argument evaluation." That (void)pFuncToken was there to not break the build with unused parameter.. and all work in progress. Commit actually using pFuncToken follows immediately, I'm just too lazy to resolve the merge conflict for an already ready patch. Change-Id: I572c3087a1cca9efa217e1e1818192d251e3345d
2017-07-11Instanciate FormulaCompiler using createCompiler()Eike Rathke1-4/+4
So this actually obeys all application specific rules when generating RPN code. Change-Id: I5e1a89efffe5188d3c4b68176cc410a6cd76483a
2017-07-11loplugin:casttovoidStephan Bergmann1-2/+1
...as introduced with f6574be0e375e215e6f21830b9e09d77d01b5097 "FormulaDlg_Impl::MakeTree: pass down current function/operator token: In preparation of better argument evaluation." Change-Id: I2ea39115bc2d2dbbea6fd899c347c98949ec281a
2017-07-10FormulaDlg_Impl::MakeTree: pass down current function/operator tokenEike Rathke1-7/+10
In preparation of better argument evaluation. Change-Id: I364fe03c58a975ae95f070112e11a9eec9505f3d
2017-07-10tdf#107135, add missing ODFF function REPLACEB.Winfried Donkers1-0/+6
Change-Id: I8d782b109eb390838b6c4f3a85e9b344ecef87ec Reviewed-on: https://gerrit.libreoffice.org/39606 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-10Spaces are cheap ... and really help to read codeEike Rathke1-92/+92
Change-Id: Icbe27f697aed9a67e3e1783783df0c6ad598b582
2017-07-10Buy more spaces, and newlines evenEike Rathke1-140/+146
Change-Id: I002f9ecea2933642399667caaa1a9d77e30751a9
2017-07-10Buy some spacesEike Rathke1-16/+16
Change-Id: I0edd454c03b0c3e502d4ef87db584a0cec2884be
2017-07-10Use const (I)FormulaToken* where possibleEike Rathke3-16/+18
Actually only the SvTreeList::InsertEntry() needs a non-const void* Change-Id: I63eb05ba63264efd63bfa287f0ab0bf2840b4414
2017-07-05Make that debuggable despite AnyInput() pendingEike Rathke1-1/+4
Somehow opening the Function Wizard always still has a keyboard input pending when breaking in the debugger so the first calculateValue() call was bypassed. Change-Id: I1ad2fdf1724ae793edc7497895c8d8cead733f86
2017-07-05Replace a "not ideal coding" ...Eike Rathke1-2/+4
... with what was actually meant (worked though). Change-Id: Ie7fb5f25bc45e8c224f0cc5853a45fc6e1574f3c
2017-07-04Set error on more than max params (255) per functionEike Rathke1-2/+6
Parameter count is size byte, so.. SUM(1,1,1,...) with 256 arguments resulted in 0 (uint8 wrapping around). Change-Id: Ib9997ad0d0d13d4c5171f276148b6c5cad570d5b
2017-07-04Move definition of VAR_ARGS and PAIRED_VAR_ARGS to formula/funcvarargs.hEike Rathke1-2/+1
... to have it at one central place instead of two. And add comments why changing the value is not just easily done. Change-Id: I266ea55c79c02a653a0704c33f9fa712bbcd104e
2017-07-04loplugin:unusedfields in formulaNoel Grandin5-28/+3
Change-Id: I5d8fe8869087efda68d040448b2d9e0e7e5611f6 Reviewed-on: https://gerrit.libreoffice.org/39493 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-04loplugin:casttovoid in VCL_BUILDER_DECL_FACTORYStephan Bergmann1-2/+1
Change-Id: I4b0dd08963cf50daa41901975c6f92fe21db2048
2017-07-02loplugin:casttovoid: formulaStephan Bergmann1-2/+0
Change-Id: Ice54ac31c7b1153220895359e3df5b15b54d5484
2017-06-25loplugin:oncevar in formula..frameworkNoel Grandin1-2/+1
Change-Id: I96d6af49c1994ebd7d6dcc41469127e3151b4350 Reviewed-on: https://gerrit.libreoffice.org/39186 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-22formula: remove indirection and use unique_ptrJochen Nitschke1-32/+25
Change-Id: Ib0c083803024d223f62b91ec54850b84eb68a758 Reviewed-on: https://gerrit.libreoffice.org/39033 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-19Add yet another kind of iterator for the two arrays in FormulaTokenArrayTor Lillqvist1-26/+22
This one has no extra functionality at all, and its only purpose is to be used in range-based for loops. If there is a cleaner way to do this, feel free. Not sure if this functionality could or should be combined with either of the two existing iterator classes related to FormulaTokenArray (FormulaTokenIterator and FormulaTokenArrayPlainIterator). Probably not. Change-Id: I32599b0800fd2585624d3742a46ad4896ce7e47a
2017-06-19Drop another friend declarationTor Lillqvist2-41/+41
Change-Id: I06dd3639e4110700e070f1224112a9fa6597a832
2017-06-19Drop one friend declaration and instead add some useful member functionsTor Lillqvist2-10/+6
Change-Id: I9a947078d9f2c1c06cb8524be137ba5e36e97a0b
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke1-1/+0
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: https://gerrit.libreoffice.org/38905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-16Get rid of the index inside FormulaTokenArrayTor Lillqvist2-198/+41
Instead, use FormulaTokenArrrayPlainIterator everywhere, especially in the FormulaCompiler. This is the final step of a long chain of commits. (Split up into many "uncontroversial" bits, and then this, to make potential bisecting easier.) Also added a logging operator<< for FormulaTokenArray, for SAL_DEBUG, SAL_INFO etc goodness. Change-Id: I02fe29f3f1e0dc33e5cba69e594223b4178a12bc Reviewed-on: https://gerrit.libreoffice.org/38851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-06-14Use pointer instead of referenceTor Lillqvist1-33/+33
Change-Id: I087f0fe99e6631d5b62ea773c83404e11d64d060
2017-06-14Avoid use of FormulaTokenArray::First() and Next() in another placeTor Lillqvist1-4/+5
Change-Id: Ie542f62b910648ee494b908703083d28f92d9a33
2017-06-14Avoid use of FormulaTokenArray::First() and Next() in another placeTor Lillqvist1-2/+2
Change-Id: I26147e53bad5f2b489a91eaa225196bb490bad27
2017-06-14Avoid use of FormulaTokenArray::First() and Next() in one placeTor Lillqvist1-2/+2
Change-Id: I941c3dba2c51eb9419cfb117b02cab9617906bac
2017-06-13Add FirstToken() and FirstRPNToken() functions that don't touch nIndexTor Lillqvist1-0/+14
... to FormulaTokenArray. Intermediate commit, these new functions aren't used yet. Change-Id: Ie505fe9dbd787087fa29f701d29ff9b4495c8699
2017-06-08Forgot FormulaTokenArrayPlainIterator::GetNextName()Tor Lillqvist1-0/+14
Change-Id: I3a485518be1372c9c56137c35cefdbc8d0362fe4
2017-06-07Take new FormulaTokenArrayPlainIterator into use in one simple placeTor Lillqvist1-5/+7
Change-Id: Ib3e0b24ab2857a94ccce3efbac160b2d8dd910c7
2017-06-06Partial start of separating the iterator out from FormulaTokenArrayTor Lillqvist1-0/+167
The plan is to drop the iterator functionality from FormulaTokenArray and instead use separate iterator objects. This will make parallelising code that uses these data structures easier. I call the new separate iterator class FormulaTokenArrayPlainIterator for now, feel free to come up with a better name. No change to what code actually gets run yet, so yeah, this adds "unused" code. Change-Id: Ie86f80529354174f0ce8bde1085a54bc6c5ac67b
2017-06-05clang-tidy performance-unnecessary-value-paramNoel Grandin1-2/+2
Change-Id: I6ed8c54c7c45931d91709cc818f2483c70197192 Reviewed-on: https://gerrit.libreoffice.org/38400 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-20Translate German comments and debug strings (leftovers in f... dirs)Johnny_M4-8/+7
Translates all (leftovers) found using a custom regex, in directories not shown by /bin/find-german-comments and beginning with "f". Additionally: - Fixed translation in formula/source/ui/dlg/funcutl.cxx (translated in https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=5e04331fc0a6434c61d3d18843cb4f80a44e5989 ), because clearing an event is quite the opposite of its triggering. Change-Id: I0fd62193a29883796cd05e5a80ce8a2900636b6c Reviewed-on: https://gerrit.libreoffice.org/37839 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-05-19loplugin:stringcopy: formulaStephan Bergmann1-1/+1
Change-Id: Ifab711d6081a70480396ac05112b4647206a754d
2017-05-17Resolves: tdf#96426 more whitespace intersection operator in Excel syntaxEike Rathke1-7/+16
Handle also stacked token arrays resulting from named expressions like =range1 range2 Change-Id: I1838af155f17b5e4f941e46895303caed75b6075
2017-05-12Introduce and check FormulaTokenArray::mbFinalized to not add further tokensEike Rathke1-1/+13
Obviously after FormulaTokenArray::Assign() or the copy-ctor for that matter, new tokens can not be added anymore to the shrunk code array. We don't do it, but ensure that it isn't done in future.. Change-Id: Ibc0115f9f38e9745028a7459c61408c188783d03
2017-05-10inherit ReferenceOrForceArray only if nested not Reference, tdf#107724 prepEike Rathke1-3/+18
Change-Id: I14c6a651677fcdcaac943d10f6a0d663bf37aff2
2017-05-10Hold ParamClass at FormulaByteToken instead of bool, tdf#107724 prepEike Rathke2-17/+23
* change IsInForceArray() to GetInForceArray() * add IsInForceArray() to keep previous functionality Change-Id: I64c891486e548a66539646846a4691a213c783ac
2017-05-10Change IsForceArrayParameter() to GetForceArrayParameter(), tdf#107724 prepEike Rathke1-5/+9
Change-Id: Icd3400e4ee1c69860908a2ad0ca6e52879f2f725
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke1-1/+0
with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-08cleanup tools/debug.hxx includesJochen Nitschke2-2/+0
with command > git grep -l tools/debug.hxx | xargs grep -L DBG_ | xargs sed -i '/#include *\(<\|\"\)tools\/debug.hxx.*/d' don't change files in includes/ and */pch Change-Id: Ie429d6a7dca5dfa1073e0f5ba037f7c84bdbec08 Reviewed-on: https://gerrit.libreoffice.org/37349 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-03split out the non-translatable stringsCaolán McNamara3-27/+36
Change-Id: Id4c3e9265ae591b938ae43554208823e0cdc06c0 Reviewed-on: https://gerrit.libreoffice.org/37164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>