summaryrefslogtreecommitdiff
path: root/formula
AgeCommit message (Collapse)Author
2018-03-26Resolves: tdf#116468 do not check array/matrix context for reportdesignEike Rathke
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> (cherry picked from commit e722779351bb83af4ca368c143ab9561f1864bcf)
2018-03-26Resolves: tdf#116100 fewer array of references cases, tdf#58874 relatedEike Rathke
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> (cherry picked from commit b52ca1a7cf9e3652ebd433753b6642b6f5124d1f)
2018-03-20lokdialog: Allow switching language of some of the ResMgr's.Jan Holesovsky
This way, it is possible to have all the strings translated in dialogs even when different users use different languages. [It was already possible to have different languages previously, but not everything in the dialog has switched - like the buttons at the bottom of the dialogs etc.] Change-Id: I29a5ae6d31a370eec60397884200b684ec1bf5b9 Reviewed-on: https://gerrit.libreoffice.org/46417 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/46979 Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 101a79cc4d13a1f566c1b97c1329813eb7c61bcf)
2017-11-21Assert also new FormulaToken::SetDoubleType() virtual dummyEike Rathke
Change-Id: I4532d0329dc7cd2609bc96abba140aba3f3d36f3
2017-11-21cache FormulaToken for doublesDennis Francis
Change-Id: Ic0b4dff6f03ef3f88bd150e798fa2d83dfb0f486
2017-11-15Assert all FormulaToken::Set...() virtual dummy methodsEike Rathke
Attempting to set on a wrong token type can never be right. Change-Id: I788221505a628f40dfbb9c2ee7c92ac789529303
2017-11-02loplugin:finalclasses in formsNoel Grandin
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 Stahl
Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-23loplugin:includeform: formulaStephan Bergmann
Change-Id: I50b898e477e0842577bcc648540e7f4b66d5b693
2017-10-17turn implicit container explicit in buildable notebooksCaolán McNamara
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 Barrientos
This tiny inconsistency with other software has annoyed me for too long. Change-Id: Ieef8cdcf13f1cea0e414fbe086e45a4e05895467
2017-09-25Rename GetSelectEntryCount -> GetSelectedEntryCountSamuel Mehrbrodt
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 Mehrbrodt
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 Mehrbrodt
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 Grandin
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 Donkers
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 Grandin
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 Grandin
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 McNamara
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 McNamara
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 Grandin
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 Grandin
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 Grandin
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 Donkers
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 McNamara
Change-Id: I9fe10986270117495628817b56ddf31f9f315454
2017-07-21de-hrc various thingsCaolán McNamara
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 McNamara
* 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 Rathke
Change-Id: I6f6fcdab24a426d0f62052fa2d31f4098d1d893a
2017-07-16FormulaDlg_Impl::UpdateValues: evaluate in force-array context if presentEike Rathke
Change-Id: I32488373bd22e644ee06920045008f3d9e20e985
2017-07-14Turn m_nEdFocus into local variable, it's not read elsewhereEike Rathke
... and not read after having been set in FillControls() Change-Id: I09ae5655b6187bcedc95232797bddb24b9064847
2017-07-14Prefix member variables with m_Eike Rathke
Code is already confusing enough.. Change-Id: I5b6f5bce32342623374df67727c44cc50b77930c
2017-07-13Reorganize Scheduler priority classesJan-Marek Glogowski
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 Bergmann
Change-Id: I76c0ac6cbd8475884fb80002ebb91f2ba84818a0
2017-07-11Buy some newlinesEike Rathke
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 Rathke
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 Rathke
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 Rathke
So this actually obeys all application specific rules when generating RPN code. Change-Id: I5e1a89efffe5188d3c4b68176cc410a6cd76483a
2017-07-11loplugin:casttovoidStephan Bergmann
...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 Rathke
In preparation of better argument evaluation. Change-Id: I364fe03c58a975ae95f070112e11a9eec9505f3d
2017-07-10tdf#107135, add missing ODFF function REPLACEB.Winfried Donkers
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 Rathke
Change-Id: Icbe27f697aed9a67e3e1783783df0c6ad598b582
2017-07-10Buy more spaces, and newlines evenEike Rathke
Change-Id: I002f9ecea2933642399667caaa1a9d77e30751a9
2017-07-10Buy some spacesEike Rathke
Change-Id: I0edd454c03b0c3e502d4ef87db584a0cec2884be
2017-07-10Use const (I)FormulaToken* where possibleEike Rathke
Actually only the SvTreeList::InsertEntry() needs a non-const void* Change-Id: I63eb05ba63264efd63bfa287f0ab0bf2840b4414
2017-07-05Make that debuggable despite AnyInput() pendingEike Rathke
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 Rathke
... with what was actually meant (worked though). Change-Id: Ie7fb5f25bc45e8c224f0cc5853a45fc6e1574f3c
2017-07-04Set error on more than max params (255) per functionEike Rathke
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 Rathke
... 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 Grandin
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 Bergmann
Change-Id: I4b0dd08963cf50daa41901975c6f92fe21db2048