Commit Graph

300 Commits

Author SHA1 Message Date
5128960109 loplugin:inlinefields in formula::FormulaCompiler
Change-Id: I6dc6dfd064bf944db278b4663812d71b6cc49b3a
Reviewed-on: https://gerrit.libreoffice.org/36344
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-10 10:51:37 +02:00
b7b2c95fbc remove hack for non DBG_UTIL builds
always use a 8bit enum for StackVar

correct StackVar types for opcode opSep and opClose in unit test
and test them.

Change-Id: I89fac97d791eb12667ce5218ff31e798c8711e10
Reviewed-on: https://gerrit.libreoffice.org/36000
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-03 06:33:51 +00:00
0b1b361090 There doesn't seem to be any reason for the svMissing = 0x70
Change-Id: I9b416b28bb87599d222e60f59589cb0ec639166a
Reviewed-on: https://gerrit.libreoffice.org/35979
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-04-01 11:03:08 +00:00
bb37c73bdc tdf#39468 Translate German comments
Translate German comments in filter/

Change-Id: I2b5856f1d4b894ca64a5b8105ca3f6466b17360b
Reviewed-on: https://gerrit.libreoffice.org/35953
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-03-31 08:58:48 +00:00
1646e0164a Add warning about intended use case of debug helper
Change-Id: I685509a92653112f2bbbfc970db3706b5a9bf994
2017-03-29 11:15:02 +03:00
c5c82c81ec No std::to_string in the silly C++ library we still use on Android
Change-Id: I03a3bd999e4f423f6b5422417109e789dc5b5397
2017-03-27 21:38:58 +03:00
88637db0ef Move StackVarEnumToString to <formula/token.hxx> and use in a SAL_INFO
Once StackVarEnum has been changed to a scoped enum, we should
probably add an operator<< for it, too.

Is 'std::string FooToString(Foo e)' a good return type, signature, and
naming pattern for functions to turn enums into strings? Would return
type OUString be better? Is there some consistent existing convention?
For use only in SAL_INFO and friends, probably just an operator<< is
enough?

Change-Id: I89abbcb37ba2ab925b0a9d7fc6294d8f9ee5aebd
2017-03-27 18:02:17 +03:00
fc6d65e75e Bin noise comment
Change-Id: I7367d494143901c9b78349682f07cc292d1d64ea
2017-03-21 16:03:31 +02:00
6cb9e6dad7 Remove redundant 'inline' keyword
...from function definitions occurring within class definitions.  Done with
a rewriting Clang plugin (to be pushed later).

Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03 20:55:50 +00:00
3ee1c41ac7 tdf#105931 Add function ROUNDSIG to Calc.
SIGDIGITS rounds a value to a determined number of significant digits.

Change-Id: I5dbfb638bf17ca109f9a14b3588d6d6c103edfa4
Reviewed-on: https://gerrit.libreoffice.org/34148
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-02-20 17:04:04 +00:00
65227e9a40 remove unused svSubroutine from StackVarEnum
Change-Id: I88603ce20dd152b600b2f30c81f091795b23169d
Reviewed-on: https://gerrit.libreoffice.org/34359
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-17 10:09:58 +00:00
06f0d2d9f1 convert FormulaCompiler::SeparatorType to scoped enum
and drop unused COMMA_BASE enumerator

Change-Id: I5f35ba7453d5ca613ebd65d0853c7caaa210f3de
Reviewed-on: https://gerrit.libreoffice.org/34357
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-17 10:09:50 +00:00
1400cec164 remove unused formula ErrorCode enumerators
Change-Id: I0d81b43ba4e0a8734074651228743acaeae7aa97
2017-02-17 09:56:19 +02:00
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
bf110d40ef Change all Idle* LINKs to be Timer*
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles
Link in the Timer class. Now there are two possible solution:

  1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or
  2. split the inheritance of Idle from Timer again to maintain
     different Link<>s and move all common code into a TimerBase.

While the 1st is more correct, the 2nd has a better indicator for
Idles. This implements the first solution.

And while at it, this also converts all call sites of SetTimeoutHdl
and SetIdleHdl to SetInvokeHandler and gets rid of some local Link
objects, which are just passed to the SetInvokeHandler call.

It also introduces ClearInvokeHandler() and replaces the respective
call sites of SetInvokeHandler( Link<Timer *, void>() ).

Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
2017-01-23 20:49:05 +01:00
70fed865df new loplugin: useuniqueptr: forms..framework
Change-Id: I4300a13f455148b7156ac3f444c7102d63ae6db3
Reviewed-on: https://gerrit.libreoffice.org/33164
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-17 11:31:40 +00:00
6b89bcf85a check "#ERRxxx!" constants for accepted error values, tdf#105024 follow-up
Change-Id: I9a11695710baa2f4e022c8e07f01b962cfabe2e7
2017-01-05 18:23:45 +01:00
d1a9c73ea1 tdf#88206 replace cppu::WeakImplHelper* misc
also edited two examples in canvas comments

Change-Id: Iac82b462168f869f995c33bb2c639f3dbe09cbd5
Reviewed-on: https://gerrit.libreoffice.org/31715
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-12-07 10:56:36 +00:00
fe3e1067bf loplugin:countusersofdefaultparams in include/drawinglayer..i18nlangtag
Change-Id: I081ed66a88fc11648f5c63919c3de2a71f1afd59
Reviewed-on: https://gerrit.libreoffice.org/31556
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-05 05:54:31 +00:00
2a91304bdd remove anything svHybridValueCell related, it's nowhere set anymore
Change-Id: I9887d7ca83ffc012fec1a78ef9ef537d2188a7e3
2016-11-16 19:24:33 +01:00
990102be61 loplugin:unnecessaryvirtual in hwpfilter..rsc
Change-Id: I2e9df8223d503b813b4c458747e8c44bb8ef8868
Reviewed-on: https://gerrit.libreoffice.org/30661
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 06:10:25 +00:00
c445e1d678 no need for ResId here now
Change-Id: I2b9ec5e587724550ea8b78f023f18b6ec65d7f75
2016-10-25 11:41:23 +01:00
f23297e111 no Edit controls loaded from .src now
Change-Id: I42c7377c101c642ea39028e05e4ffd58fc7435d7
2016-10-25 11:41:23 +01:00
cd0e227a32 rename RECALCMODE_EMASK to ScRecalcMode::EMask
much neater this way

Change-Id: I0af38f8bc0d7be4f2f1be9899dd8739493cf66d5
2016-10-21 13:23:02 +02:00
e944d95104 tdf#93894: Prohibit grouping when certain token types are present.
For instance, column / row label tokens don't work correctly in
grouped cells with the current implementation.

Change-Id: Idf86312ef15fbfd4382aa90ee6d131c671a80683
2016-10-18 20:27:16 -04:00
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
3e22dfa5eb convert formula error codes to scoped enum
Change-Id: I5ff214bf1ec9031e30344bc125bc99916fd11bfb
Reviewed-on: https://gerrit.libreoffice.org/28897
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-09-23 15:22:38 +00:00
96e9ffa647 loplogin:singlevalfields in include/
Change-Id: I27842162fcf82120ecb811ee8e89e187430931fc
Reviewed-on: https://gerrit.libreoffice.org/28931
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-16 06:19:38 +00:00
4ef10fce39 recognize NaN with no bits set in lower word as error
Which can happen for example for -nan(0x8000000000000) as a result of
calculating with -inf. This was displayed as NaN instead of a proper error
value, now #NUM!

Example test case:
=FORECAST.ETS.ADD(50, {-1,-2,-3,-4}, {10,20,30,40})

Change-Id: I1e1d95e1f188e0036b72be37dd20039c9a9a13f6
2016-09-13 15:29:08 +02:00
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
b8064bdf7f new loplugin: countusersofdefaultparams
Change-Id: I79e2c690f3e664c14af12cf763dd5a8ac20d6b04
Reviewed-on: https://gerrit.libreoffice.org/28353
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-25 06:37:42 +00:00
fa2fdb6607 rename ocConvert to ocConvertOOo and related
... to clarify that this is not the "real" CONVERT function.

Change-Id: Ia71949ffabd2c983be0dbf9fa36bb8c52f0077ee
2016-08-03 18:57:37 +02:00
3bc16f4a47 rename ocDuration to ocPDuration and related
... to clarify that these belong to PDURATION (currently DURATION in UI)
instead of DURATION (currently DURATION_ADD in UI). The confusing UI name
situation will be resolved separately.

Change-Id: I09a7bc8437be1c4c9e72f94e61c877111fb48806
2016-08-03 16:39:41 +02:00
41eb7eef76 introduce formula::FormulaGrammar::Grammar::GRAM_API
Change-Id: Iceaf114847129f0b014ffd61d547e131baf1f07b
2016-08-03 15:16:50 +02:00
a859c37ee0 introduce mxSymbolsAPI and InitSymbolsAPI()
Change-Id: I1c4673a25bb0f686e0705f87318a04166e6688bb
2016-08-02 00:25:35 +02:00
908449639b let FormulaTokenArray::RemoveToken() return the actual count of tokens removed
Change-Id: Iebf654e7b4c682036b4ff334298948557b755eac
2016-07-14 22:31:20 +02:00
f9021f7eea re-add FormulaTokenArray::ReplaceToken() that was removed as unused, grml..
with 4ff5a5558472beee85eb1234dcc2aa2ed9000f6c

Change-Id: Id99c3ae74515f24c55a3734698c560dcac8bacd9
2016-07-14 22:26:25 +02:00
d480e5c7f6 rename *effective to *effect, tdf#100641 related
... to unify naming.

Change-Id: I0964822d53eafd69ea4ed0656dfdfcb3f5bfd561
2016-06-27 16:03:23 +02:00
8a6bffd2fe tdf#42949: clean up includes in include/formula with iwyu
Change-Id: Ieb601d98be80aeb2239d4f0a330d90e63f1abc43
Reviewed-on: https://gerrit.libreoffice.org/26398
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-21 07:58:59 +00:00
1ec01a340a introduce FormulaTypedDoubleToken to carry type information of a double
Change-Id: I88b4964ca95eefa41d415ed66fc106c834a686b6
2016-06-08 12:13:23 +02:00
77d5491e15 loplugin:unusedmethods
Change-Id: I08e9bb65b2530148b80c67f01d51e594fc698acb
Reviewed-on: https://gerrit.libreoffice.org/25543
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30 06:34:42 +00:00
a88ee01b86 omit DCOUNT or DCOUNTA 2nd argument if 0 when writing ODFF or OOXML, tdf#70806
Change-Id: I2833a1005c6941e66a09172b337e23b0bf7f2002
2016-05-27 18:09:21 +02:00
74713b34a3 loplugin:unusedmethods
Change-Id: Ib36bc0e87d00abb638cbfec511cd13b6179eabda
Reviewed-on: https://gerrit.libreoffice.org/25431
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26 07:50:33 +00:00
07f1a39509 (nearly) nothing uses GetUniqueId anymore, so remove it.
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-25 14:24:20 +01:00
8a2149c105 clang-tidy misc-assign-operator-signature
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-20 07:55:30 +00:00
2c8fe2e737 update unusedmethods plugin to deal with constructors
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-18 10:03:44 +00:00
c57dc741a6 tdf#97831 [part] Add Excel 2016 functions to Calc
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-04 21:54:01 +00:00
fa507ae23e Replace namespace ScErrorCodes with formula...
and remove that 'using namespace' statement in the header...

Change-Id: I2f994af5088ce6d1ffe92c8d36285a4f6fdd2248
Reviewed-on: https://gerrit.libreoffice.org/24628
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2016-05-04 02:23:30 +00:00
29433c6496 tdf#97831 [part] Add Excel 2016 functions to Calc
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-03 16:10:12 +00:00
a76c5e2137 tdf#97831 [part] Add Excel 2016-Office 365 functions to Calc
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-26 15:08:22 +00:00