summaryrefslogtreecommitdiff
path: root/scaddins/source/analysis
AgeCommit message (Collapse)Author
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-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-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-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-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>
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-08be consistent with suffixEike Rathke
Change-Id: I40af1526bd8155ad66303f8519c8a6c36a5aa57b
2015-10-08Number(s) makes no sense for one parameter, use Number insteadEike Rathke
Change-Id: Iaf15e4a2b7d29dbdecafcc8089d96c0d6bee6d35
2015-10-08Make clear to user that Calc add-in functions GCD and LCM only exist forWinfried Donkers
interoperability with Excel2003 and before. Follow up of commit 74010f1c502a4bd7eb1ef3ee3d0e8c45a1c9afee Change-Id: I824df2fc50200fc29f7de61881d867f53056edc9 Reviewed-on: https://gerrit.libreoffice.org/19241 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-10-07rename WEEKNUM_ADD to WEEKNUM_EXCEL2003 in UI, tdf#50950 follow-upEike Rathke
... and add description to clarify that it exists for interoperability and for new documents WEEKNUM should be used instead. Also NETWORKDAYS_ADD to NETWORKDAYS_XCL. Change-Id: I01e705d57f0b31983950ac0e47ecb894f657de88
2015-10-02loplugin:unusedmethodsNoel Grandin
Change-Id: Ie1603adf3908fd0668bcbe8f75c6bafa0d0bfd6c Reviewed-on: https://gerrit.libreoffice.org/19072 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-01remove old standalone Sun bug numbersNoel Grandin
Sun bug numbers without any accompanying text are completely useless. Fixed with git grep -lP '//\s*#\d+#\s*$' | xargs perl -i -ne'/\/\/\s*#\d+#\s*$/d or print' And then hand-checking the result to restore places where it deleted code. And then some more grepping and hand-editing to kill the others. Change-Id: Ia96ce4466db8bb8da363ebf41f0ae7f45f28bf29 Reviewed-on: https://gerrit.libreoffice.org/19023 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-15Resolves: tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe
with the variadic variants. Change-Id: I7154f9472f02fdf47d27ba715db55bb1ec669a8a Reviewed-on: https://gerrit.libreoffice.org/18580 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-13Removed another FuncDataList collectionIan
This time the existing collection used a vector internally and mapped operations onto its standard interface. Removing it in favour of a raw typedef'd vector and find_if reduces the volume of code and simplifies the lookup mechanism. Change-Id: I86fdb85773577019073803c2fc249d04196afe31 Reviewed-on: https://gerrit.libreoffice.org/17680 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-07-21loplugin:unusedmethods reportdesign,scaddinsNoel Grandin
Change-Id: I3e2ccdbc0dd97f276a96eae5c041c09e69cede91 Reviewed-on: https://gerrit.libreoffice.org/17235 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-10add a SAL_RAND_REPEATABLE for repeatable random numsCaolán McNamara
merge the formula and comphelper ones together Change-Id: I2e7e2cdb176afc6982e384fa1e007da5b914e6f0
2015-06-29coverity#1308576 Uncaught exceptionCaolán McNamara
Change-Id: Ic31670bd8999961dc9571c8d55817951a702d417
2015-06-29tdf#39468 Translate German Comments - scaddins/Phillip Sz
Change-Id: I95ea40b1b349f03e8ce45906a50e18f7a95ca5e9 Reviewed-on: https://gerrit.libreoffice.org/16525 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-06-29coverity#1308597 Uncaught exceptionCaolán McNamara
Change-Id: Ibcbdd39952a573e72edbe1813c9d8b73c5e32f78
2015-06-28coverity#1308529 Uncaught exceptionCaolán McNamara
Change-Id: I8a91a9016e198e7f27d5c0e92789ae458f98f713
2015-06-23Revert "Typo: iff->if"Julien Nabet
This reverts commit cf92da3d6e1de14756efe3f1ee79f393a2f3787d. iff can mean "if and only if" so not a typo
2015-06-23Typo: iff->ifJulien Nabet
Change-Id: I3fc60856b5a56e71d70b55c89323be074bdec3b3
2015-06-08loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann
Change-Id: Id1b618d9e0bfa69e3d118b6735fd421d0517c3d9
2015-06-02loplugin:loopvartoosmallNoel Grandin
Change-Id: I809e408c994222cfa95ba8f56e4db7bd96be7080
2015-05-05fdo#77985 make calc function NETWORKDAYS comply with ODFF1.2Winfried Donkers
Change-Id: I523b0c71bc0fed501a4d5fffd75c5a4704f6dd13 Reviewed-on: https://gerrit.libreoffice.org/9827 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-04-15remove unnecessary use of void in function declarationsNoel Grandin
ie. void f(void); becomes void f(); I used the following command to make the changes: git grep -lP '\(\s*void\s*\)' -- *.cxx \ | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;' and ran it for both .cxx and .hxx files. Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-04-06Resolves: #i95167# XIRR() function gives Err:502Regina Henschel
Patch by: Driss Ben Zoubeir <driss.zoubeir@gmail.com> Review by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit 85cd072198d9024c20b741c04a20ef99fc9b5910) Conflicts: scaddins/source/analysis/financial.cxx Change-Id: I385d5f9bfa840fe609cb5723f2d4d57d26fd0d6c
2015-03-31Reduce to static_cast any reinterpret_cast from void pointersStephan Bergmann
Change-Id: I47be8a3e4be0a19fb476ab551e8bf394244a66a4
2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann
Change-Id: I156cbb51efe9346af88fb82a648fa09715d299a5
2015-03-26const_cast: convert some C-style casts and remove some redundant onesStephan Bergmann
Change-Id: I67b37e64435a038d4ed5d9acdfde668c86859121
2015-03-03Improve previous commit to disambiguate FuncData typesStephan Bergmann
...by making more liberal use of already existing sca::analysis namespace instead. Change-Id: I17355b3aca3a5f415db1de718feba9153012bb2a
2015-03-03Avoid ASan confusion of different FuncData typesStephan Bergmann
...in sc/inc/callform.hxx and scaddins/source/analysis/analysishelper.hxx, where using -fvisiblity-ms-compat for Clang -fsanitize=* on Linux would make both _ZTS8FuncData externally visible and confuse -fsanitize=address. Change-Id: I216665ca8931dbe22a7f9eccd4fa7d73592ef0b5