summaryrefslogtreecommitdiff
path: root/formula
AgeCommit message (Collapse)AuthorFilesLines
2018-05-18tdf#116511: Drop questionable check for more keyboard inputTor Lillqvist1-23/+15
For some reason, on macOS, when this is being invoked through the shortcut, Application::AnyInput( VclInputFlags::KEYBOARD ) returns true, so the code thinks that there is more keyboard input and won't call UpdateTokenArray(), which sets m_pTokenArray. I think that optmisation is questionable, especially as the exact semantics of our event loop API, like Application::AnyInput(), is under-defined and probably can and will change in various minor ways when people work on improving it on the Mac (and perhaps other platforms, too). (The event loop etc certainly needs improvement on the Mac. Consider the "WindowServer grows to tens of gigabytes when running make check" issue which is closely related. Unfortunately nobody has come up with a simple fix for that yet, exactly because we use our event loop related APIs in so imaginative ways all over the code, and fixing one thing usually breaks another.) Change-Id: I865d46e5ee69609ad58bc915ff949e0f3602d8f5 Reviewed-on: https://gerrit.libreoffice.org/54448 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 16f784b10695d1d3212463f96f597c665a90a8e2) Reviewed-on: https://gerrit.libreoffice.org/54545 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-03-21Resolves: tdf#116468 do not check array/matrix context for reportdesignEike Rathke1-10/+19
It doesn't have any, and worse, there's no currently active OpCode symbol map that could be used to create strings from tokens. Regression from commit bf1ffc64128f5b96d7c2fcc7adc81cbc25e232fd Date: Sun Jul 16 15:18:09 2017 +0200 FormulaDlg_Impl::UpdateValues: evaluate in force-array context if present Change-Id: I77c2035fdd0926f67fcc85e7090f30485b4e312c (cherry picked from commit 3a3a61bce913b564c7b7a98c56b55cbc11ea273a) Reviewed-on: https://gerrit.libreoffice.org/51642 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2018-03-21Resolves: tdf#116100 fewer array of references cases, tdf#58874 relatedEike Rathke2-1/+6
In particular if in any ForceArray context use the matrix result instead of the array of references list. (cherry picked from commit cfc6cf5177f8df23af35c4509c0276a19de56cce) Change-Id: I72328a690760637f6d31fadba447641c64711a67 Reviewed-on: https://gerrit.libreoffice.org/50842 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-11-21Assert also new FormulaToken::SetDoubleType() virtual dummyEike Rathke1-1/+1
Change-Id: I4532d0329dc7cd2609bc96abba140aba3f3d36f3
2017-11-21cache FormulaToken for doublesDennis Francis1-0/+10
Change-Id: Ic0b4dff6f03ef3f88bd150e798fa2d83dfb0f486
2017-11-15Assert all FormulaToken::Set...() virtual dummy methodsEike Rathke1-9/+10
Attempting to set on a wrong token type can never be right. Change-Id: I788221505a628f40dfbb9c2ee7c92ac789529303
2017-11-02loplugin:finalclasses in formsNoel Grandin3-9/+3
Change-Id: I0f849fd104699e2861aaba2d4be38168e80703b0 Reviewed-on: https://gerrit.libreoffice.org/44189 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-26vcl: make MapMode constructor explicitMichael Stahl3-3/+3
Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-23loplugin:includeform: formulaStephan Bergmann16-49/+49
Change-Id: I50b898e477e0842577bcc648540e7f4b66d5b693
2017-10-17turn implicit container explicit in buildable notebooksCaolán McNamara1-3/+27
as in interim measure for SfxTabDialogs we throw away the TabPage if its not suitable for reuse Change-Id: Ic5776ca3d2a8cb6bf41f33df01b211f81c62a842 Reviewed-on: https://gerrit.libreoffice.org/43134 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-02Tone down excessive directional chars in Back/Next buttonsAdolfo Jayme Barrientos1-2/+2
This tiny inconsistency with other software has annoyed me for too long. Change-Id: Ieef8cdcf13f1cea0e414fbe086e45a4e05895467
2017-09-25Rename GetSelectEntryCount -> GetSelectedEntryCountSamuel Mehrbrodt1-1/+1
Change-Id: I405b347b404ed0acb3b6a0204e0b914a7698ce25 Reviewed-on: https://gerrit.libreoffice.org/42284 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21Rename GetSelectEntryPos -> GetSelectedEntryPosSamuel Mehrbrodt1-3/+3
Change-Id: I0bd4cb463575af843c72d9c8aaf91742203532a4 Reviewed-on: https://gerrit.libreoffice.org/42283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21Rename GetSelectEntry -> GetSelectedEntrySamuel Mehrbrodt1-1/+1
Change-Id: Ibb7d8c59c0e61b0e87455bd78f241d8691dd9dce Reviewed-on: https://gerrit.libreoffice.org/42282 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-11clang-tidy modernize-use-emplace in editeng..frameworkNoel Grandin1-3/+3
Change-Id: I7739c4f77c856d34f8484754244df13d8fef840e Reviewed-on: https://gerrit.libreoffice.org/42151 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-11convert std::map::insert to std::map::emplace IINoel Grandin1-1/+1
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331 Reviewed-on: https://gerrit.libreoffice.org/41019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11convert std::map::insert to std::map::emplaceNoel Grandin1-7/+7
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02normalize resource locale ctor construction mechanismsCaolán McNamara16-351/+21
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-08-01move resmgr to unotoolsCaolán McNamara4-7/+5
and the vast majority of translations is to the ui language so default ctor with that arg and now drop OModuleResourceClient Change-Id: I3b85a560ffdfe5f019c2271ac56a5fe4a361522b
2017-07-31loplugin:constparams in formula,xmlhelpNoel Grandin2-6/+6
Change-Id: I1c987d991a5b292df327d1bb921099233b5531fe Reviewed-on: https://gerrit.libreoffice.org/40584 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28loplugin:constparams handle constructorsNoel Grandin1-1/+1
had to change the structure of the plugin considerably, was too messy to structure it to do the calculations on a per-function basis Change-Id: I4edee7735f726101105c607368124a08dba21086 Reviewed-on: https://gerrit.libreoffice.org/40516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-26loplugin:unusedfieldsNoel Grandin1-4/+0
Change-Id: I21e538b8e9c7a5f0fb233019efac37a3555e3c93 Reviewed-on: https://gerrit.libreoffice.org/40438 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-21give formula .uis their translation domainCaolán McNamara4-4/+4
Change-Id: I9fe10986270117495628817b56ddf31f9f315454
2017-07-21de-hrc various thingsCaolán McNamara4-27/+6
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 McNamara26-3005/+2804
* 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-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