summaryrefslogtreecommitdiff
path: root/scaddins/source
AgeCommit message (Collapse)Author
2017-02-07remove more STR_FROM_ANSI macroNoel Grandin
Change-Id: I0957d1162c7b5bf8f52c7a79aaced667961d40a3
2017-02-07convert ScaCategory to scoped enumNoel Grandin
and drop unused AddIn constant Change-Id: Ic775e3c956c7200bb04be0a776a688284ba9d19b
2017-02-07remove unnecessary STR_FROM_ANSI macroNoel Grandin
Change-Id: I262158991a83083f999b0ae48da4ed4d77fc57fe
2017-02-07convert ScaCategory to scoped enumNoel Grandin
and drop unused AddIn constant Change-Id: I4422f34db756649cb08aa9aa7f975cef73ccfa91
2017-02-07convert FDCategory to scoped enumNoel Grandin
and drop unused AddIn constant Change-Id: I9cb07d58d7c986973d9713572538ce2142654397
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(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-25Avoid calling log10(0)Stephan Bergmann
...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::star::uno::Any const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&) stoc/source/corereflection/criface.cxx:697:9 > #8 0x7f7772bdf45a in non-virtual thunk to stoc_corefl::IdlInterfaceMethodImpl::invoke(com::sun::star::uno::Any const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&) stoc/source/corereflection/criface.cxx > #9 0x7f77d3c63f17 in ScUnoAddInCall::ExecuteCallWithArgs(com::sun::star::uno::Sequence<com::sun::star::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-25loplugin: unnecessary destructor scaddins..sdextNoel Grandin
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-19New loplugin:dynexcspec: Add @throws documentation, scaddinsStephan Bergmann
Change-Id: I8b78ab7ac34cace1a6aad8807f4964e4414c9ac3
2017-01-10New loplugin:conststringvar: scaddinsStephan Bergmann
Change-Id: I14b74d90fabaa288f412ebb63a10c07de824f0f3
2016-11-16new loplugin finalprotectedNoel Grandin
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-08loplugin:unnecessaryvirtual in sc..scaddinsNoel Grandin
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-10-28update unnecessaryoverride plugin to find pure forwarding methodsNoel Grandin
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-28loplugin:expandablemethods in scaddins..scriptingNoel Grandin
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-20loplugin:expandablemethodds in scaddins..sdextNoel Grandin
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-05tdf#100496 accept year basis 2 for AMORDEGRC and AMORLINC.Winfried Donkers
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-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
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-08-30loplugin:stringconstant: adapt to improved OUStringLiteral1 (scaddins)Stephan Bergmann
Change-Id: I30a66d2ff5233d6a2a6ec076e188f75a74843cc7
2016-08-18cppcheck: useInitializationListCaolán McNamara
Change-Id: I10b2985f615e1943f56aed086739258c43ede985
2016-08-05no need to check for nullptr before deletingMarkus Mohrhard
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-05loplugin:countusersofdefaultparams in oox..sdNoel Grandin
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-03Resolves: tdf#69539 UI rename CONVERT to CONVERT_OOO, CONVERT_ADD to CONVERTEike Rathke
... with same syntax but different semantics that was even more confusing. Change-Id: Ibe1efcd5c4e82c9ce8d9fe8ed0f85e86dac327f7
2016-08-03UI rename DURATION to PDURATION, DURATION_ADD to DURATION, tdf#50488 relatedEike Rathke
Change-Id: I7ba783b59a711fc9c9d6bbe68dcf8c3c1a0d409d
2016-07-29Make Calc Add-In function RECEIVED behave like Excel and Gnumeric.Winfried Donkers
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-12tdf100766 : ODDLPRICE apply constraints to comply with ODFF1.2Winfried Donkers
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-12tdf#100729 ODDLYIELD : apply constraints in compliance with ODFF1.2Winfried Donkers
(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-12tdf#100528 follow up; filter nonsense results.Winfried Donkers
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-11tdf#100843 LCM_EXCEL2003 fix incorrect handling of non-integer values.Winfried Donkers
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-11tdf#100811 Add extra conversion units to ODFF function CONVERTWinfried Donkers
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-06-30Resolves: tdf#100440 check mode to be 0 or 1 for MONTHS(), YEARS() and WEEKS()Eike Rathke
Needed to adapt the WEEKS and YEARS test documents to cope with the change. Change-Id: Ia52505418f4fed684bd04290c608e2a65eee2fbc
2016-06-28tdf#100528 Add constraints for AMORLINC functionWinfried Donkers
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-28tdf#100523 Add constraints for AMORDEGRC function.Winfried Donkers
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-10o3tl::tryGet on a temporary is dangerousStephan Bergmann
...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-06Use o3tl/any.hxx in scaddinsStephan Bergmann
Change-Id: Ifb19d216a00db90d6a267099077f90e6c54cd942
2016-05-10clang-tidy modernize-loop-convert scaddins to sdextNoel Grandin
Change-Id: I63ccc56df1a1de8bc443abb95e520246c457912f Reviewed-on: https://gerrit.libreoffice.org/24798 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-12Avoid reserved identifiersStephan Bergmann
Change-Id: I41a490832c9dd312775f420807e4bed93557a24e
2016-03-24loplugin:constantparam in scNoel Grandin
Change-Id: I8608a6cb47972e9b838cc5ea431863348758ded0
2016-03-02loplugin:unuseddefaultparam in scaddinsNoel Grandin
Change-Id: I47f7ead34832c19d5194c1e4ccf190384262f436
2016-02-09Remove excess newlinesChris Sherlock
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09Formatting changes across all modulesChris Sherlock
+ Removed comment cruft + Tab formatting in number of files + Some commented out code removed + Tab characters replaced with spaces + Newline cleanup in quite a few files + Tweak header guard #endifs Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc Reviewed-on: https://gerrit.libreoffice.org/22221 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-05Fix typosAndrea Gelmini
Change-Id: Ice72f8d9971e15dd6ef365e64cd567b8581a92d3 Reviewed-on: https://gerrit.libreoffice.org/21797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-04loplugin:fpcomparison in scaddins/Noel Grandin
Change-Id: I9a303a92f5531d549faf6d86ea0ce6360e115567 Reviewed-on: https://gerrit.libreoffice.org/21865 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-11new loplugin: memoryvarNoel Grandin
detect when we can convert a new/delete sequence on a local variable to use std::unique_ptr Change-Id: Iecae4e4197eccdfacfce2eed39aa4a69e4a660bc Reviewed-on: https://gerrit.libreoffice.org/19884 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: Id275f54b08da54c356db052b949d7a1f9154b22c
2015-11-04yyyyyNoel Grandin
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-02cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: I06186e8f0bbc8522f538e8639a68e816093becc2
2015-10-28com::sun::star->css in scaddins,sccomp,scriptingNoel Grandin
Change-Id: Id9167341940bac65f055e1e33ff0670f6fa0f6c4 Reviewed-on: https://gerrit.libreoffice.org/19629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-27loplugin:unusedmethodsNoel Grandin
Change-Id: I161cd52606c11b6008f5d8b1d8ee391692f91861 Reviewed-on: https://gerrit.libreoffice.org/19231 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-19loplugin:defaultparamsStephan Bergmann
Change-Id: I511b95a62f43f9f726fbe5253c7ffc6b510b0346
2015-10-13cppcheck:variableScopeNoel Grandin
Change-Id: I7cbd5a9e9bb5417f754d4e2445df309140fd40af Reviewed-on: https://gerrit.libreoffice.org/19329 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>