summaryrefslogtreecommitdiff
path: root/scaddins
AgeCommit message (Collapse)AuthorFilesLines
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>
2018-09-10loplugin:simplifyconstruct in scaddins..sdNoel Grandin3-10/+2
Change-Id: Ia2c04ef9fe5113b8b04304d0f495b948b5371fb4 Reviewed-on: https://gerrit.libreoffice.org/60237 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen3-0/+3
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib420e9216b8313f5ed7634ec375e39ceb741fd45 Reviewed-on: https://gerrit.libreoffice.org/59297 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-02scaddins: Drop unused stuffTakeshi Abe1-3/+0
Change-Id: Icdbb297df55ed5984b4008e304a41df89a996334 Reviewed-on: https://gerrit.libreoffice.org/56523 Tested-by: Jenkins Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2018-06-22tdf#42949 Fix IWYU warnings in include/sal/Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I62758fd7c9d932c5a390739774b112356006a937 Reviewed-on: https://gerrit.libreoffice.org/56062 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-17New o3tl::temporary to simplify calls of std::modfStephan Bergmann1-2/+2
...that ignore the out-parameter integral part Change-Id: I05f07c1a8909023232f8aecf75ea5541d4eb81ca Reviewed-on: https://gerrit.libreoffice.org/54474 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-04-14Fix typosAndrea Gelmini1-1/+1
Change-Id: I28d9591517c324e995691139582c77b5cfdc9d77 Reviewed-on: https://gerrit.libreoffice.org/52211 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-01fix some openoffice bugzilla linksdennisroczek1-2/+2
* remove redirects * use https links * replace old attchment links with working ones Change-Id: Ic9a154f46e142138f0adea7d7b8be3b6cfe8af18 Reviewed-on: https://gerrit.libreoffice.org/52224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29loplugin:unnecessaryvirtualNoel Grandin1-1/+1
Change-Id: Ic044a6e4568e707022d87bc5712205fbdf084ba2 Reviewed-on: https://gerrit.libreoffice.org/52067 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-28loplugin:virtualdown in sc..sdNoel Grandin2-11/+4
Change-Id: If93dc12f484839e6d2b44d6568b506f0c15b4735 Reviewed-on: https://gerrit.libreoffice.org/51989 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-17loplugin:useuniqueptr in scaddinsNoel Grandin4-26/+13
Change-Id: I5c2c8301078d19824fb35966b158471ce6650c10 Reviewed-on: https://gerrit.libreoffice.org/49873 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-30Typ-o negativIlmari Lauhakangas1-1/+1
Fixed some typos and translated a couple of German words Change-Id: I24ae28dd537ba283a9480413659f85bd6711acad Reviewed-on: https://gerrit.libreoffice.org/48892 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-12More loplugin:cstylecast: scaddinsStephan Bergmann2-10/+10
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I67dffc144cd2dd8eebf29d3cfc27ef1599f955a4
2018-01-11convert (a>b?a:b) to std::max(a,b)Noel Grandin1-1/+1
with something like: git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2' Change-Id: I60b9a3a2a09162bc0de4c13fdde2c209696e5413 Reviewed-on: https://gerrit.libreoffice.org/47602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11loplugin:salcall fix functionsNoel Grandin4-7/+7
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-30loplugin:unnecessaryparen: signed numeric literalsStephan Bergmann1-2/+2
Change-Id: I75c8224452ca9c3711a2ccaca9ecf549fa59cb64 Reviewed-on: https://gerrit.libreoffice.org/45549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-05Translate German function names in Calc (financial)Johnny_M3-10/+10
This follows up with translation of function names, similarly to how it was earlier done for variable names. Change-Id: Icf784ad96db41d341ae39d2854c7df2844b66a91 Reviewed-on: https://gerrit.libreoffice.org/44286 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-11-02Correct German variable names translation in Calc (financial)Johnny_M2-12/+12
This aligns the translation of the "Zins" argument of the financial functions to "Rate", as used in the function documentation in English. The original translation was done by the same author recently in the commit 8ba9dfe27382626e97fb4ab705b7ad056725a800. Compare (as in MS Excel): German: https://help.libreoffice.org/Calc/Financial_Functions_Part_Two/de#RMZ English: https://help.libreoffice.org/Calc/Financial_Functions_Part_Two#PMT Change-Id: Ifa125d94a639c91c454d7b540f86feeecea250ff Reviewed-on: https://gerrit.libreoffice.org/44021 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-10-27loplugin:finalclasses in scNoel Grandin1-2/+1
Change-Id: I83438eaf2c1045a9212a63ed9fd8b3371e9b06aa Reviewed-on: https://gerrit.libreoffice.org/43896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: scaddinsStephan Bergmann4-7/+7
Change-Id: I7e825a2098e9d5fa2c57de5736d0b3ac5ec21347
2017-10-23Translate German variable names in Calc (financial)Johnny_M2-20/+20
These names of variables correspond to German function names in Calc and were translated to their English equivalents. For used translations, see, e.g., https://translations.documentfoundation.org/de/libo54_help/translate/#search=RMZ&sfields=target&soptions=exact,case Note: The translation here is equal to the translation of variables done on https://gerrit.libreoffice.org/43078 , etc. Change-Id: I1010a3ddf58a0d32e97bfb55090dc7aacc0b91b7 Reviewed-on: https://gerrit.libreoffice.org/43692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-10-18use std::vector<Complex> in ComplexListNoel Grandin3-17/+15
no need to use dynamic allocation here Change-Id: I49192a8ba5e20891572e9ce3bc4dec51fafba0dc Reviewed-on: https://gerrit.libreoffice.org/43474 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-02Translate German variable names in Calc (financial)Johnny_M1-16/+16
These names of variables correspond to German function names in Calc and were translated to their English equivalents. For used translations, see, e.g., https://translations.documentfoundation.org/de/libo54_help/translate/#search=kapz&sfields=target Change-Id: Ifffa1ae8394cafde6dd7a78626b957e07919d5c9 Reviewed-on: https://gerrit.libreoffice.org/42991 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-09-22loplugin:flatten in scaddins..sdNoel Grandin4-52/+39
Change-Id: I190323ce910224f883c4370b2c752644a5a35edd Reviewed-on: https://gerrit.libreoffice.org/42626 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17remove unnecessary use of OUString::getStrNoel Grandin1-4/+1
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4 Reviewed-on: https://gerrit.libreoffice.org/38114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02normalize resource locale ctor construction mechanismsCaolán McNamara1-1/+1
make them all the same and share std::locales more various OModuleClient, etc, classes go away Change-Id: I7e3ff01a69332eeacd22e3078f66a60318de62d5 Reviewed-on: https://gerrit.libreoffice.org/40634 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>