summaryrefslogtreecommitdiff
path: root/scaddins
AgeCommit message (Collapse)AuthorFilesLines
2020-10-02Use the new single-instance="true" attribute in scaddinsStephan Bergmann4-10/+6
Change-Id: Ic20da5a128b9225e688011b556f7927901f344f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103847 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-01Use the new single-instance="true" attribute in scaddinsStephan Bergmann3-26/+3
Change-Id: I0d45a760276a4855c03c84f5a3a6fbbc98ddf840 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103737 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-30Fix typoAndrea Gelmini1-3/+3
Change-Id: I7fbf7d2c832b3e88b9ea82872c24450c33edc8aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101649 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-07-30terminate XDesktop properly in unit testsNoel Grandin3-4/+29
So that the UNO constructor work can continue - where we need the desktop to be disposed properly so that all UNO constructors objects have their dispose() called, and they can clean up their global state. We detect this case by changing a SAL_WARN to an assert in Desktop::disposing() (*) in ~ScTabViewShell, don't call EnterHandler, because that tries to create EditEngine's and other stuff, which crashes (*) Need a fake singleton so that the servicemanager calls dispose() on the AnalysAddIn and we can clear the global variable there. Change-Id: Id13b51e17afc16fcbbc65d64281cdf847e4a58cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99640 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-25don't need prefix here anymoreNoel Grandin1-1/+1
Change-Id: Ie3b6681cb4ae8c1138766db7b19cc473367bfbd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99422 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-23scaddins: create instances with uno constructorsNoel Grandin9-149/+38
See tdf#74608 for motivation. Change-Id: I678bc7fb73b5863b1656dc7f8b12c5b903c33b3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99225 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-20compact namespace declNoel Grandin2-8/+4
used git grep -lw namespace | xargs perl -i -p0e 's/(\w+)\s*.\{.\s*namespace\s*(\w+)/\1::\2/smg;' to do the initial replace, then compiled and fixed. Change-Id: If69904d75940c851aeffab0e78c4ba02cc968d44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens1-1/+1
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-01Upcoming improved loplugin:staticanonymous -> redundantstatic: scaddinsStephan Bergmann3-4/+4
Change-Id: Ib3e2cdac213e59b8906aa42c90a7665b73c10b93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97653 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-10compact namespace in sal..svgioNoel Grandin1-2/+2
Change-Id: I7e70614ea5a1cb1a1dc0ef8e9fb6fd48e85c3562 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93904 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-15loplugin:buriedassign in scaddins..sdextNoel Grandin1-3/+12
Change-Id: I72acfdac5879aa251a1074ea850758f66072b46e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92311 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-02loplugin:flatten in scaddinsNoel Grandin1-16/+16
Change-Id: I7a973de06d36fb10e9dd7f6826991ff9d503076d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91550 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-14tdf#130975 replace `rtl::math::isNan` with `std::isnan`.Yukio Siraichi1-2/+2
Change-Id: I5d53e6369d35093445b2efd8936bbf8c6775ff47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90451 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-03-12tdf#130976 replace `rtl::math::isInf` with `std::inf`.Yukio Siraichi1-2/+2
Change-Id: Id0f0e07b324230d2d69cbf4ab07b0fff5b24474d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90377 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-03-12Revert "loplugin:constfields in scaddins,sccomp"Noel Grandin3-32/+32
This reverts commit 1ab27f9ae6f32c7502884c02c2217bbdcf035c48. Change-Id: Iaf9b011201ee763aaf4d08ceedd6074bafad1c3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90409 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-12tdf#130977 replace `rtl::math::isFinite` with `std::isfinite`.Yukio Siraichi2-3/+3
- make all calls look like `std::isfinite`. - change the comments referring `rtl::math::isFinite`. Change-Id: I0cde9ceb9f20150467b454cddde5e62003cfde1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90234 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-02-24tdf#42982: improve UNO API error reportingsMesut Çifci1-1/+1
Change-Id: I5a5df811562da1aafecb0057bcfe888f92f7b887 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87652 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-01-31clang-tidy modernize-concat-nested-namespaceNoel Grandin3-13/+5
Change-Id: Iab35a8b85b3ba1df791c774f40b037f9420a071a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-08Make OPT_ functions string more meaningful.Olivier Hallot1-39/+39
Help pages on OPT_ functions have more descriptive arguments lists and the change here is to make the Functions Wizard param's compatible with the Help pages. Change-Id: I0d90b0279ce24f773923935a7212fe7ab1c2c45b PS2: remove underscores and slashes in variable names Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85157 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-12-22sal_Char->char in scaddins..sdextNoel Grandin7-20/+20
Change-Id: If2456800ace3696c2582e19a4c8612fee7d77f90 Reviewed-on: https://gerrit.libreoffice.org/85700 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-12Remove some redundant user-provided dtorsStephan Bergmann6-15/+0
...which silences various -Wdeprecated-copy-dtor warnings from Clang 10 trunk about copy functions being implicitly defined as non-deleted even though the class has a user-declared dtor Change-Id: I3409d403c3c709de4ad94eccbc2d7869e41847cc Reviewed-on: https://gerrit.libreoffice.org/85032 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-29tdf#129098: parameters mixed in OPT_PROB_INMONEY (scaddins)Julien Nabet1-3/+3
Here's getOptProbInMoney signature according to XPricingFunctions.idl: 66 /// OPT_PROB_INMONEY(), probability of ending up in-the-money. 67 double getOptProbInMoney( [in] double spot, [in] double vol, 68 [in] double mu, [in] double maturity, 69 [in] double barrierLow, [in] double barrierUp, 70 [in] any strike, [in] any putCall ) 71 raises( com::sun::star::lang::IllegalArgumentException ); So "putCall" should be at the end. It's been like this since initial commit: https://cgit.freedesktop.org/libreoffice/core/commit/?id=e9f31eaa49f9494113e72deaf0fe079701844ea4 Change-Id: I186348fe7470633abd32598954b7032102770a8a Reviewed-on: https://gerrit.libreoffice.org/84078 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-03loplugin:stringaddNoel Grandin1-3/+1
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann1-1/+1
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-04add gbuild function for a common PCH and use it in sc/ and sax/Luboš Luňák3-0/+6
And make it simple to disable the whole feature by setting gb_DISABLE_PCH_REUSE=1, just in case. Also work around a possible BOOST_ALL_NO_LIB mismatch when using the common PCH. Change-Id: I96fd507edf1ada6242ac225026250e5a588d0193 Reviewed-on: https://gerrit.libreoffice.org/79365 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-01loplugin:stringadd in scNoel Grandin2-4/+2
Change-Id: Idab16f785ca5e8954f8e50132938f6329106c927 Reviewed-on: https://gerrit.libreoffice.org/79891 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-27Deduplicate O(U)StringNumber definitions; add toAsciiUpperCaseMike Kaganski1-1/+1
Change-Id: I00e7ce62940907b5f4efc2b7f23f355c3e43ed6b Reviewed-on: https://gerrit.libreoffice.org/79686 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-09-24support O(U)String::number() for fast string concatenationLuboš Luňák1-1/+1
When I did the fast string concatenation, I didn't add any support for number(), which simply returned a O(U)String, and so it did the extra allocation/deallocation, although that could be avoided. In order to support this, number() now returns a special temporary return type, similarly to O(U)StringConcat, which allows delaying the concatenation the same way. Also similarly, the change of the return type in some cases requires explicit cast to the actual string type. Usage of OString::getStr() is so extensive in the codebase that I actually added it to the helper class, after that it's only relatively few cases. Change-Id: Iba6e158010e1e458089698c426803052b6f46031 Reviewed-on: https://gerrit.libreoffice.org/78873 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-08-17tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet3-15/+3
in scaddins, scripting Change-Id: I92e6380f535aec12c1f1c5c51d8b544c8a7d9611 Reviewed-on: https://gerrit.libreoffice.org/77650 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-15loplugin:sequenceloop in scaddins..scriptingNoel Grandin1-2/+2
Change-Id: I25044332e107b630b257e48d95ee9272145ed344 Reviewed-on: https://gerrit.libreoffice.org/77524 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-12Fix typosAndrea Gelmini1-1/+1
Change-Id: I3e6b96f4ea341130e98ee54ed8c124209b05d343 Reviewed-on: https://gerrit.libreoffice.org/77291 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): scaddinsStephan Bergmann3-6/+6
Change-Id: Ie55e961e3ee95ff73c99fda2ad44ae1b38d553bd Reviewed-on: https://gerrit.libreoffice.org/76653 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-30Simplify Sequence iterations in scaddins, sccomp, scriptingArkadiy Illarionov2-55/+21
Use range-based loops, STL and comphelper functions Change-Id: I836422a1c81a3dc9585687ed2e506eb59bb4ec91 Reviewed-on: https://gerrit.libreoffice.org/76484 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-07-24Fix typosAndrea Gelmini1-1/+1
Change-Id: Ib778a6598f3797fe871a25b56b7b4b7761889296 Reviewed-on: https://gerrit.libreoffice.org/76269 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-05-24tdf#42949 Fix IWYU warnings in scaddins/Gabor Kelemen12-34/+44
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I6b39bd25e243ab0f39847f6feb0b767d7358bf0f Reviewed-on: https://gerrit.libreoffice.org/72635 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin1-1/+1
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04Revert "new loplugin typedefparam"Noel Grandin1-1/+1
This reverts commit 9865440d217d975206a3f91612f0666312bc8fd8. This is not ready to land yet, seems like the latest update of the logic reveals a bunch more places I need to fix before it can land.
2019-03-04new loplugin typedefparamNoel Grandin1-1/+1
verify that parameters use the exact same typedef-names (if any) in definition and declaration Change-Id: I55d2817f599b0253904dce2d35a1a93967e15a77 Reviewed-on: https://gerrit.libreoffice.org/68439 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-09loplugin:indentation in sdNoel Grandin1-4/+4
Change-Id: I8ce307b8c467ac1e3f19faca1df15a079bc14169 Reviewed-on: https://gerrit.libreoffice.org/67563 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-20Simplify containers iterations in scaddins, sccomp, scriptingArkadiy Illarionov1-4/+4
Use range-based loop or replace with STL functions Change-Id: I21ec2eea8f322e2792097d352fc352dc6099c7b7 Reviewed-on: https://gerrit.libreoffice.org/65461 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-12tdf#69569 implement proposed change to ODF1.2 part 2 §4.11.7.7Winfried Donkers1-51/+27
Calculating the number of days in a year in AddIn function GetDaysInYear() for basis 1 (actual/actual) gave wrong results. Now the results are correct and the same as in Excel. Extended the unit test document for function YEARFRAC and corrected the unit test document for function AMORDEGRC (verified the results with Excel). Change-Id: Ic68f108496f41dec71b3616095dff80512a64c31 Reviewed-on: https://gerrit.libreoffice.org/64837 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-11-25tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski1-2/+2
Change-Id: If173f42302553b164267909a0a3156bb25a6d558 Reviewed-on: https://gerrit.libreoffice.org/63957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-24drop ComplListAppendHandl enumNoel Grandin3-29/+9
we only use one value all the time, so it is unnecessary Change-Id: I37b596f9c9330ad5f35d6b112dcca14851626995 Reviewed-on: https://gerrit.libreoffice.org/63936 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-17Adapt to C++2a char_tStephan Bergmann5-206/+206
u8 literals incompatibly change their type (as implemented by recent Clang trunk) Change-Id: Ia4f7b91f5d86656a056303d2754981ab2093a739 Reviewed-on: https://gerrit.libreoffice.org/63494 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-01clang-tidy: (WIP) bugprone-too-small-loop-variable findingsTamás Zolnai1-1/+1
Change-Id: Iaa255b39928ac45dec1ed37e368c149d6027f561 Reviewed-on: https://gerrit.libreoffice.org/62701 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-10-26tdf#42949 Fix IWYU warnings in include/unotools/*Gabor Kelemen3-0/+3
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444c43b9d549977039f25bec2b5bf666c3e15e0e Reviewed-on: https://gerrit.libreoffice.org/62041 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann2-9/+9
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-09loplugin:constfields in scaddins,sccompNoel Grandin3-32/+32
Change-Id: I4d21cfcc65c099fbddbe5146fc1b8a6257971e32 Reviewed-on: https://gerrit.libreoffice.org/61555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-01loplugin:useuniqueptr in scaddins::ConvertDataLinearNoel Grandin2-9/+8
Change-Id: I071e7b072ea6b96a527ccbac91e122f0253eb448 Reviewed-on: https://gerrit.libreoffice.org/61117 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann5-24/+24
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>