562 Commits

Author SHA1 Message Date
Caolán McNamara
5401ccd65d unwind RID_ANALYSIS_DEFFUNCTION_NAMES local resource
Change-Id: I65ce69460b6c5f73fd41345f55630d0fcf5c04a4
2017-02-14 16:46:39 +00:00
Caolán McNamara
288ca353a8 covert ANALYSIS_* resources to StringArrays
Change-Id: Id0aba9531ef179102f62c4f89fa65a244c975570
2017-02-14 16:46:39 +00:00
Caolán McNamara
1273edfdf7 unwind RID_ANALYSIS_FUNCTION_DESCRIPTIONS local resource
Change-Id: Iad53fa9af738873c6d594d60aec1cfdb29e2ea1d
2017-02-14 16:46:39 +00:00
Caolán McNamara
62d550804d unwind RID_ANALYSIS_FUNCTION_NAMES local resource
Change-Id: Icaab5d3690922748bd473434dbbb1d8cc6eccd2d
2017-02-14 16:46:38 +00:00
Caolán McNamara
765acdf91d convert DATE_FUNCDESC_* resources to StringArrays
Change-Id: I13527ba3a53b7a0e913b672a5a87dae4a1556270
2017-02-14 16:46:38 +00:00
Caolán McNamara
3ff163ae94 convert PRICING_FUNCDESC_* resources to StringArrays
Change-Id: If1726a57b427b73269e826b0f719d6b69782611e
2017-02-14 16:46:38 +00:00
Caolán McNamara
56f6a86851 unwind RID_DATE_FUNCTION_DESCRIPTIONS local resource
Change-Id: If769264721850397c3c243c976c64c49fddf64fb
2017-02-14 16:46:38 +00:00
Caolán McNamara
a906102e4c unwind RID_PRICING_FUNCTION_DESCRIPTIONS local resource
Change-Id: Ib171e111c330241fb93edf1f2f39933eadc4adea
2017-02-14 16:46:38 +00:00
Caolán McNamara
b1f7c093a2 unwind RID_PRICING_FUNCTION_NAMES local resource
Change-Id: I3da1caed4b6c91acdabe16d98e6d43bf5dc32247
2017-02-14 16:46:37 +00:00
Caolán McNamara
83d062b710 unwind RID_DATE_FUNCTION_NAMES local resource
Change-Id: I1d849238f6dd96986d640bb791f966a29b19525b
2017-02-14 16:46:37 +00:00
Caolán McNamara
c4bce0078e unwind RID_DATE_DEFFUNCTION_NAMES local resource
Change-Id: I99ac46b89d2158d420e6458055cdeb5c6421f1ac
2017-02-14 16:46:37 +00:00
Caolán McNamara
2141a4e073 unwind RID_PRICING_DEFFUNCTION_NAMES local resource
Change-Id: I9834795ef873e1ffb6cb1abc092a8333f9373e32
2017-02-14 16:46:37 +00:00
Caolán McNamara
40c618ccb6 don't need to store this data
Change-Id: I797c0fc9cc293b0538392362e2e582e9821da530
2017-02-14 13:01:39 +00:00
Caolán McNamara
16ba6968f4 don't need to store this data
Change-Id: Ic6d1e061073937b967e289d16a7d2926b5cb733a
2017-02-14 13:00:00 +00:00
Caolán McNamara
ded409b97f don't need to store this data
Change-Id: I7606088fe9e04edddc1918fa8847f927510b1086
2017-02-14 12:58:31 +00:00
Caolán McNamara
6ba9de6a65 replace localresource of strings and keys with StringArray
Change-Id: I09543bf862dce9e0ad2afb626d58f062f552fcba
2017-02-14 12:20:10 +00:00
Caolán McNamara
dd355079b8 replace localresource of strings and keys with StringArray
Change-Id: I4bbf5286384905b6201b1a04f161d50f4c9d4aef
2017-02-14 12:08:21 +00:00
Noel Grandin
c421cab5bd remove more STR_FROM_ANSI macro
Change-Id: I0957d1162c7b5bf8f52c7a79aaced667961d40a3
2017-02-07 10:48:19 +02:00
Noel Grandin
99330e7b35 convert ScaCategory to scoped enum
and drop unused AddIn constant

Change-Id: Ic775e3c956c7200bb04be0a776a688284ba9d19b
2017-02-07 10:48:19 +02:00
Noel Grandin
4dc6dee3aa remove unnecessary STR_FROM_ANSI macro
Change-Id: I262158991a83083f999b0ae48da4ed4d77fc57fe
2017-02-07 10:48:19 +02:00
Noel Grandin
75b7b685ce convert ScaCategory to scoped enum
and drop unused AddIn constant

Change-Id: I4422f34db756649cb08aa9aa7f975cef73ccfa91
2017-02-07 10:48:19 +02:00
Noel Grandin
de9c7e4d94 convert FDCategory to scoped enum
and drop unused AddIn constant

Change-Id: I9cb07d58d7c986973d9713572538ce2142654397
2017-02-07 10:48:19 +02:00
Stephan Bergmann
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
Stephan Bergmann
d97bdf10d2 Avoid calling log10(0)
...to avoid UBSan reporting during CppunitTest_sc_addin_functions_test:

[...]
> Testing file:///data/sbergman/lo-san/core/sc/qa/unit/data/functions/addin/fods/imabs.fods:
> warn:xmloff.style:14186:1:xmloff/source/style/xmlstyle.cxx:300: Here is a duplicate Style
> scaddins/source/analysis/analysishelper.cxx:949:37: runtime error: value -inf is outside the range of representable values of type 'int'
>     #0 0x7f77717d11d6 in sca::analysis::ParseDouble(char16_t const*&, double&) scaddins/source/analysis/analysishelper.cxx:949:37
>     #1 0x7f77717e39e5 in sca::analysis::Complex::ParseString(rtl::OUString const&, sca::analysis::Complex&) scaddins/source/analysis/analysishelper.cxx:1690:10
>     #2 0x7f77717e317f in sca::analysis::Complex::Complex(rtl::OUString const&) scaddins/source/analysis/analysishelper.cxx:1664:10
>     #3 0x7f777167fa79 in AnalysisAddIn::getImabs(rtl::OUString const&) scaddins/source/analysis/analysis.cxx:912:19
>     #4 0x7f78148bd16a in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5
>     #5 0x7f78148b6b70 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233:13
>     #6 0x7f78148b3894 in bridges::cpp_uno::shared::unoInterfaceProxyDispatch(_uno_Interface*, _typelib_TypeDescription const*, void*, void**, _uno_Any**) bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:420:13
>     #7 0x7f7772bdd096 in stoc_corefl::IdlInterfaceMethodImpl::invoke(com::sun::uno::Any const&, com::sun::uno::Sequence<com::sun::uno::Any>&) stoc/source/corereflection/criface.cxx:697:9
>     #8 0x7f7772bdf45a in non-virtual thunk to stoc_corefl::IdlInterfaceMethodImpl::invoke(com::sun::uno::Any const&, com::sun::uno::Sequence<com::sun::uno::Any>&) stoc/source/corereflection/criface.cxx
>     #9 0x7f77d3c63f17 in ScUnoAddInCall::ExecuteCallWithArgs(com::sun::uno::Sequence<com::sun::uno::Any>&) sc/source/core/tool/addincol.cxx:1466:31
>     #10 0x7f77d3c631da in ScUnoAddInCall::ExecuteCall() sc/source/core/tool/addincol.cxx:1444:9
>     #11 0x7f77d484504f in ScInterpreter::ScExternal() sc/source/core/tool/interpr4.cxx:2999:19
[...]

Change-Id: Ie31d6374bdac3ae11784d925011c5a67802cdf56
2017-01-25 16:15:58 +01:00
Noel Grandin
4fabc2347c loplugin: unnecessary destructor scaddins..sdext
Change-Id: I6ae02ad25863ec7e0f780020dbc69c9a99488c24
Reviewed-on: https://gerrit.libreoffice.org/33511
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25 07:31:25 +00:00
Stephan Bergmann
8870dec9a4 New loplugin:dynexcspec: Add @throws documentation, scaddins
Change-Id: I8b78ab7ac34cace1a6aad8807f4964e4414c9ac3
2017-01-19 18:03:15 +01:00
Stephan Bergmann
86215f8c6b New loplugin:conststringvar: scaddins
Change-Id: I14b74d90fabaa288f412ebb63a10c07de824f0f3
2017-01-10 08:10:53 +01:00
Noel Grandin
7cca2c7fb3 new loplugin finalprotected
look for final classes, and make sure they don't have protected members

Change-Id: I1fa810659bba02b61a5160dbfd8e24185ec9abf4
Reviewed-on: https://gerrit.libreoffice.org/30895
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-16 09:10:16 +00:00
Noel Grandin
dda87c6a46 loplugin:unnecessaryvirtual in sc..scaddins
Change-Id: I4a2d333984827f363ea76580993438d704f9738f
Reviewed-on: https://gerrit.libreoffice.org/30660
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 06:10:13 +00:00
Noel Grandin
8a22bc93e0 update unnecessaryoverride plugin to find pure forwarding methods
which can be replaced with using declarations.

Is there a more efficient way to code the search? Seems to slow the
build down a little.

Change-Id: I08cda21fa70dce6572e1acc71bf5e6df36bb951f
Reviewed-on: https://gerrit.libreoffice.org/30157
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-28 12:56:17 +00:00
Noel Grandin
24360897c0 loplugin:expandablemethods in scaddins..scripting
Change-Id: I6a39184e526c9a41155565e798a7f1f2542985f2
Reviewed-on: https://gerrit.libreoffice.org/30331
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-28 06:59:41 +00:00
Noel Grandin
e7324c5705 loplugin:expandablemethodds in scaddins..sdext
Change-Id: Ife021e368efaafe9097750b4ca1a5472e94352a9
Reviewed-on: https://gerrit.libreoffice.org/30054
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-20 06:11:51 +00:00
Winfried Donkers
75d5acfc78 tdf#100496 accept year basis 2 for AMORDEGRC and AMORLINC.
Although year basis 2 is not supported by Excel, it is defined in ODFF1.2
for AMORLINC and is supported by Gnumeric.

Change-Id: Iacf60dbb7c0502338998f7ff22233c5f8b0b7146
Reviewed-on: https://gerrit.libreoffice.org/29188
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-10-05 21:19:25 +00:00
Stephan Bergmann
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
Stephan Bergmann
7a63e5f69a loplugin:stringconstant: adapt to improved OUStringLiteral1 (scaddins)
Change-Id: I30a66d2ff5233d6a2a6ec076e188f75a74843cc7
2016-08-30 15:28:52 +02:00
Caolán McNamara
a3b7bec840 cppcheck: useInitializationList
Change-Id: I10b2985f615e1943f56aed086739258c43ede985
2016-08-18 12:13:42 +01:00
Markus Mohrhard
dc72abc793 no need to check for nullptr before deleting
Change-Id: I5512ad52c9a0f943b29656e16cceeb08ce164abf
Reviewed-on: https://gerrit.libreoffice.org/27888
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-08-05 18:27:51 +00:00
Noel Grandin
f12476f0f6 loplugin:countusersofdefaultparams in oox..sd
Change-Id: I4504939a3957606979c6ac36af6611e1fe072d01
Reviewed-on: https://gerrit.libreoffice.org/27902
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-05 11:50:45 +00:00
Eike Rathke
ced79363cc Resolves: tdf#69539 UI rename CONVERT to CONVERT_OOO, CONVERT_ADD to CONVERT
... with same syntax but different semantics that was even more confusing.

Change-Id: Ibe1efcd5c4e82c9ce8d9fe8ed0f85e86dac327f7
2016-08-03 18:57:37 +02:00
Eike Rathke
dbbab7b1b0 UI rename DURATION to PDURATION, DURATION_ADD to DURATION, tdf#50488 related
Change-Id: I7ba783b59a711fc9c9d6bbe68dcf8c3c1a0d409d
2016-08-03 17:08:36 +02:00
Winfried Donkers
5c78a453bc Make Calc Add-In function RECEIVED behave like Excel and Gnumeric.
EXcel and Gnumeric demand that Maturity > Settlement, Calc now does too.

Change-Id: Id02918153d5c07f438c9160330b0dc09fdf13f6c
Reviewed-on: https://gerrit.libreoffice.org/27619
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-07-29 19:25:30 +00:00
Winfried Donkers
0759f31172 tdf100766 : ODDLPRICE apply constraints to comply with ODFF1.2
Change-Id: I7706a950b904603b6d87306e4a8faa0c4f0cc8d8
Reviewed-on: https://gerrit.libreoffice.org/27006
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-07-12 12:17:58 +00:00
Winfried Donkers
897049ef65 tdf#100729 ODDLYIELD : apply constraints in compliance with ODFF1.2
(and Excel).

Change-Id: I1cc40494fb2451a06864f770af7c33d26013dcaa
Reviewed-on: https://gerrit.libreoffice.org/27002
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-07-12 12:16:21 +00:00
Winfried Donkers
2fd00e59ad tdf#100528 follow up; filter nonsense results.
With unrealistic depreciation rates (>100%), the caluculated amortisation
value can be < 0. Although mathematically correct, financially this is
nonsense. The patch returns 0.0 when the calculated amortisation values
gets < 0.0. (Excel does the same.)

Change-Id: I928bba647429ff6141abfdbd996d4562e31da746
Reviewed-on: https://gerrit.libreoffice.org/26996
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-07-12 12:09:38 +00:00
Winfried Donkers
09f6bfadad tdf#100843 LCM_EXCEL2003 fix incorrect handling of non-integer values.
Non-integer values should be truncated as Excel does.
Also, make the function return an error with negative values.

Change-Id: I6a8ce1fb82d20294d9398ca2af308f88b51d5e82
Reviewed-on: https://gerrit.libreoffice.org/27096
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-07-11 14:55:04 +00:00
Winfried Donkers
3d76efdaad tdf#100811 Add extra conversion units to ODFF function CONVERT
for full compliance with ODFF1.2.
(UI name of function still is CONVERT_ADD.)

Change-Id: I6b620c35a5be2bb7195ff0e569dfe6c9cf63ad6d
Reviewed-on: https://gerrit.libreoffice.org/27106
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-07-11 14:48:18 +00:00
Eike Rathke
14e31d6cf4 Resolves: tdf#100440 check mode to be 0 or 1 for MONTHS(), YEARS() and WEEKS()
Needed to adapt the WEEKS and YEARS test documents to cope with the
change.

Change-Id: Ia52505418f4fed684bd04290c608e2a65eee2fbc
2016-06-30 18:53:50 +02:00
Winfried Donkers
67188d0e55 tdf#100528 Add constraints for AMORLINC function
Function returned different results than Excel does because of missing constraints.
Added constraints are all defined in ODFF1.2 for AMORLINC.

Change-Id: Icd5f9de9cf252e6864e3aa9b47346f6f75669c92
Reviewed-on: https://gerrit.libreoffice.org/26572
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-06-28 14:51:42 +00:00
Winfried Donkers
e227b65162 tdf#100523 Add constraints for AMORDEGRC function.
Function returned different results than Excel does because of missing constraints.

Change-Id: Iea8424a8429e0c48a19fe2818ca4be26c90afd32
Reviewed-on: https://gerrit.libreoffice.org/26571
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-06-28 14:49:36 +00:00
Stephan Bergmann
8132d7f9d7 o3tl::tryGet on a temporary is dangerous
...so rename to o3tl::tryAccess to make it more obvious that the returned
proxy points into the internals of the given Any, and forbid calling
o3tl::tryAccess on a temporary

Change-Id: Ia412c6b2b06693811b9b7f0076a08bbf97142df9
2016-06-10 15:52:05 +02:00