summaryrefslogtreecommitdiff
path: root/unodevtools
AgeCommit message (Collapse)AuthorFilesLines
2020-08-23Fix typo in codeAndrea Gelmini1-2/+2
Change-Id: I186af7793c235cdd42c815049ee74543b705ffe1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101206 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-21Fix typosAndrea Gelmini1-1/+1
Change-Id: Iaf1d4aed07d1e6fcfe2392fb65cbd2fa196bcc1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101099 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-18Fix typosAndrea Gelmini1-1/+1
Change-Id: I85a91d24943430b42217ac91611f182059d8ec69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100919 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-07-23Silence GCC 11 trunk -Werror=nonnull involving dynamic_castStephan Bergmann2-6/+6
...where the compiler now warns that the implicit this pointer argument could be null in a member function call made via a dynamic_cast-converted pointer (and where the code apparently relies on the dynamic_cast not to fail) Change-Id: I79482f4a853b6b47c5f9dd099a4e8377a19f7b0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99219 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-02Upcoming improved loplugin:staticanonymous -> redundantstatic: unodevtoolsStephan Bergmann2-2/+2
Change-Id: I6768925fd5fb00cd4805b00cebaa0c37656591f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97728 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-10compact namespace in ucb..uuiNoel Grandin2-4/+4
Change-Id: I644d5e418028b4b4e66cf67b20a1155a689acab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93906 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-31clang-tidy modernize-concat-nested-namespaceNoel Grandin4-8/+8
Change-Id: Iab35a8b85b3ba1df791c774f40b037f9420a071a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-24sal_Char->char in unoxmlNoel Grandin2-4/+4
Change-Id: Ie14ea8349e5dc698a11b3447429b3ca7cbab9bb3 Reviewed-on: https://gerrit.libreoffice.org/85774 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08loplugin:redundantpointerops simplify *p.get()Noel Grandin1-1/+1
Change-Id: I12517651fb3f777fd08e384992bb3e84b340ad85 Reviewed-on: https://gerrit.libreoffice.org/80382 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-12Fix typosAndrea Gelmini1-2/+2
Change-Id: I151508c5d0b5d010f55d2324d36659ab5715a70c Reviewed-on: https://gerrit.libreoffice.org/77274 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-09Fix typosAndrea Gelmini1-2/+2
Change-Id: Ie63c7b2d8bf9579b7b41d7bae515818c8d5706dc Reviewed-on: https://gerrit.libreoffice.org/77217 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-10an uno -> a unoCaolán McNamara1-1/+1
Change-Id: I538db88f8477dd2d2ad25c372928fec6c11d979d Reviewed-on: https://gerrit.libreoffice.org/72105 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-28tdf#120703 PVS: fix cleanup checksMike Kaganski1-10/+12
pofs is guaranteed to be non-nullptr after getOutputStream, so no need to check that. is_open() only matters to decide if close() is needed. V595 The 'pofs' pointer was utilized before it was verified against nullptr. Check lines: 1033, 1057. Check lines: 1194, 1220. Change-Id: I2dd22d29c465889269f2496f0964bee030cb5964 Reviewed-on: https://gerrit.libreoffice.org/71456 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-19optimise find/insert patternNoel Grandin3-20/+8
if we're doing a find/insert on a set or a map, it is better to just do a conditional insert/emplace operation than triggering two lookups. Change-Id: I80da5097f5a89fe30fa348ce5b6e747c34287a8d Reviewed-on: https://gerrit.libreoffice.org/70937 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-05Revert "Get rid of b2u/u2b helpers; use OUString's toUtf8/fromUtf8 instead"Mike Kaganski5-71/+70
This reverts commit 84662e9030a855c8db7cd40d9ce354b773d78c16. Change-Id: I1cc98d3201390609ae3615baa8e92c926cdcde9a Reviewed-on: https://gerrit.libreoffice.org/70294 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-05tdf#120703: partially revert commit 85456fae54029edd26df2277a9eec5e2fe3d9739Mike Kaganski1-6/+6
... to take into account possible differences of results of dynamic_cast vs static_cast; the change casts dynamically, as before the commit, and only adds asserts on the result of the cast. Thanks to sberg for pointing my mistake out! Change-Id: Ib77d443e5a858e744f369f58542de603f948fd1c Reviewed-on: https://gerrit.libreoffice.org/70274 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-04Get rid of b2u/u2b helpers; use OUString's toUtf8/fromUtf8 insteadMike Kaganski5-70/+70
These helpers are used in code generator code; so any invalid UTF-8 or UTF-16 in the conversion is programmer's error which needs fixing. Thus, the behavior of toUtf8/fromUtf8 which asserts the validity is fine here. Change-Id: I3004e233c9de59f8e348455f1f04d23e8c51ed3d Reviewed-on: https://gerrit.libreoffice.org/70249 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-01tdf#120703 PVS: Silence V522 warningsMike Kaganski1-2/+4
V522 There might be dereferencing of a potential null pointer. Change-Id: Ie617b41a8f8d334022cf5313b242a236baedba48 Reviewed-on: https://gerrit.libreoffice.org/70017 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-01-27Take advantage of known index to avoid an OUString copyMatteo Casalin1-10/+4
Change-Id: I3cf7a10f5d27ddc626adea07697aa65e01f6f978 Reviewed-on: https://gerrit.libreoffice.org/66942 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-01-27Use optimized OUString concatenationMatteo Casalin1-5/+1
Change-Id: I8314d0e6a6ac922a88ff891af2f1071e7b5692e6 Reviewed-on: https://gerrit.libreoffice.org/66943 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2018-11-29remove unnecessary "if (!empty()" checks before loopsNoel Grandin1-11/+9
found with git grep -n -A4 'if.*!.*empty' | grep -B3 -P '(\bfor)|(\bwhile)|(\bdo)' Change-Id: I582235b7cf977a0f9fb4099eb306fdb4a07b5334 Reviewed-on: https://gerrit.libreoffice.org/64169 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin3-74/+74
which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24clang-tidy performance-unnecessary-copy-init in test..xmlscriptNoel Grandin1-2/+1
Change-Id: I1ae16467a8e58e8a50f59b7a140e9f8b68bde07e Reviewed-on: https://gerrit.libreoffice.org/62254 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17Simplify containers iterations in unodevtools, unoidlArkadiy Illarionov6-398/+246
Use range-based loop or replace with STL functions. Change-Id: I3089a4d4a94eea849cad442b04906908908e4c27 Reviewed-on: https://gerrit.libreoffice.org/61854 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann5-52/+52
...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-08-02Add missing sal/log.hxx headersGabor Kelemen1-0/+1
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from test to vbahelper Change-Id: Ia7f773511624099505d6a36a8d6e23c0cde4a737 Reviewed-on: https://gerrit.libreoffice.org/58225 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-15Fix typosAndrea Gelmini1-5/+5
Change-Id: Icb2d5f8bb9eb781d6a59384e1aac75abf6145774 Reviewed-on: https://gerrit.libreoffice.org/51337 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-27loplugin:unnecessaryparen: Warn about parentheses around literalsStephan Bergmann1-1/+1
...that are not composed of multiple tokens, like ("foo" "bar"). Also don't yet warn about Boolean literals, which are sometimes wrapped in parentheses to silence unreachable-code warnings. To avoid multiple warnings about code like f((0)) switch to generally using a set of ParenExpr to keep track of which occurrences have already been handled. Change-Id: I036a25a92836ec6ab6c56ea848f71bc6d63822bc Reviewed-on: https://gerrit.libreoffice.org/45317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-23loplugin:includeform: unodevtoolsStephan Bergmann11-40/+40
Change-Id: Iac0a22dd68a39cf5f71907c8f1e289fbd0c95249
2017-10-01Prefer prefix operatorJulien Nabet1-2/+2
Change-Id: I82f3f66bfc675dbc4a5d5b57d8715c3de01d9620 Reviewed-on: https://gerrit.libreoffice.org/42994 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-29loplugin:flatten check for throw in then clauseNoel Grandin2-6/+4
also make the plugin ignore the case where we have var decl's in the clause we want to flatten, which could lead to problematic extension of variable lifetime Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59 Reviewed-on: https://gerrit.libreoffice.org/42889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17remove unnecessary use of OUString::getStrNoel Grandin1-1/+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-11convert std::map::insert to std::map::emplaceNoel Grandin1-1/+1
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-14use more OUString::operator== in test..xmlsecurityNoel Grandin1-1/+1
Change-Id: If5bdd1532be44a47ff7cc3b769be3ea585aea562 Reviewed-on: https://gerrit.libreoffice.org/39685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin1-4/+2
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06use OString::operator== in preference to ::equalsNoel Grandin3-5/+5
Change-Id: Ib291521963a791a9c6175964571e9d9895072acf Reviewed-on: https://gerrit.libreoffice.org/39646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-13fix bug in skeletonmakerNoel Grandin1-1/+1
how this got missed for so long I don't know Change-Id: I5c4bbb880f364fdbb8c88e80c6329184c0bd48a5 Reviewed-on: https://gerrit.libreoffice.org/38725 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28remove unnecessary use of OString::getStrNoel Grandin3-10/+7
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28loplugin:checkunusedparams in configmgr and vclNoel Grandin1-2/+2
Change-Id: I7226d01f38e6edaf3868d7267d9b02dbdbc9e5ba Reviewed-on: https://gerrit.libreoffice.org/36975 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-10New loplugin:conststringvar: unodevtoolsStephan Bergmann2-3/+3
Change-Id: I7bbe7f78b8e62962f907a598e8405be7d4be03c9
2016-11-01Omit the default comparatorTakeshi Abe1-2/+1
Change-Id: Idea8ea8dab6a86d7be6394aef1cf7f25b75009e0 Reviewed-on: https://gerrit.libreoffice.org/30319 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-08-11loplugin:countusersofdefaultparams in svl..unodevtoolsNoel Grandin2-3/+3
Change-Id: Ie3d2cf29e99b8a51b80246aafa23a92e6c3404b2 Reviewed-on: https://gerrit.libreoffice.org/28017 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-27Get rid of unnecessary directory levels $D/inc/$DTor Lillqvist3-5/+5
Change-Id: Ibf313b8948a493043006ebf3a8281487c1f67b48 Reviewed-on: https://gerrit.libreoffice.org/25532 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2016-05-02Remove unused pbOpt parameterStephan Bergmann3-20/+18
Change-Id: I4c566a122d600d41d7d8049779628a08e68ca277
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann2-2/+2
Change-Id: Ife577280d5176d9f48bff719c7b52fc829ae49f1
2016-03-08Remove ornamental noiseStephan Bergmann1-3/+3
Change-Id: Ic8d33142b6bd7d271e94ec93661f0260bb2ea6e2
2016-03-08tdf#91794 Remove OSL_DEBUG_LEVEL > 1 conditionalsRohan Kumar1-26/+3
I removed the fprintf statements and replaced them with SAL_WARN statements. Change-Id: Id75e310e3a95b249fdf92a4dd5a9bcf1b7fb9be6 Reviewed-on: https://gerrit.libreoffice.org/22984 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-02-24convert codemaker::UnoType::Sort to scoped enumNoel Grandin4-132/+132
Change-Id: I70a84f777e714bcc20c2d7b06b918e3be0f3ce4a
2015-12-14Use emplace_backStephan Bergmann1-15/+13
Change-Id: I006e3c8f411b480917d9cfb9c4f3d082b79c833d
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann5-12/+12
Change-Id: Ic89c5fb56e1f11fa17f6014a8c9722592b144337