summaryrefslogtreecommitdiff
path: root/idl
AgeCommit message (Collapse)AuthorFilesLines
2019-11-06loplugin:indentation find broken if statementsNoel Grandin1-1/+1
so I don't read the "then" block as being a sequential statements Change-Id: Ib2004acd3518bd4ebd2246f02a26c2c0a8bbab4c Reviewed-on: https://gerrit.libreoffice.org/82069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-24Introduce OStringCharStephan Bergmann2-2/+2
...similar to OUStringChar, to be used in string concatenation expressions. And enable the corresponding loplugin:stringadd check, and fix its findings. Change-Id: I35ebb2253ba82bda6c98ae6ebd2ad4f27cf9abf9 Reviewed-on: https://gerrit.libreoffice.org/81456 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-21size some stringbuffer to prevent re-allocNoel Grandin4-5/+6
found by the simple expidient of putting asserts in the resize routine. Where an explicit const size is used, I started with 32 and kept doubling until that site did not need resizing anymore. Change-Id: I998787edc940d0a3ba23b5ac37131ab9ecd300f4 Reviewed-on: https://gerrit.libreoffice.org/81138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann1-2/+2
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-15new loplugin:bufferaddNoel Grandin2-16/+14
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08loplugin:redundantpointerops simplify *p.get()Noel Grandin1-3/+3
Change-Id: I12517651fb3f777fd08e384992bb3e84b340ad85 Reviewed-on: https://gerrit.libreoffice.org/80382 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-06Fixing '....'Andrea Gelmini1-1/+1
Change-Id: Icf2a34500acc18b28f113c85366bf24edc6d20b9 Reviewed-on: https://gerrit.libreoffice.org/78695 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-18cid#1448323 Unchecked return valueCaolán McNamara1-2/+2
Change-Id: I2d1d3d2ce7302fa895820981e0c15b59d491ddc4 Reviewed-on: https://gerrit.libreoffice.org/75876 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-27loplugin:unusedfields look for classes where we can make all the..Noel Grandin1-2/+1
fields private Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27 Reviewed-on: https://gerrit.libreoffice.org/68302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-09loplugin:indentation in helpcompiler..ioNoel Grandin1-1/+1
Change-Id: Ia3f05662cc9542feeac3096d29e9dec6d1858620 Reviewed-on: https://gerrit.libreoffice.org/67558 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-22o3tl::make_unique -> std::make_unique in i18npool...reportdesignGabor Kelemen1-2/+1
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: I8bee1344f7df82536f31bc5e4ec4fd379cac1d04 Reviewed-on: https://gerrit.libreoffice.org/66704 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-06loplugin:collapseif in dbaccess..lotuswordproNoel Grandin1-6/+3
Change-Id: Ia2a0d25c3833dfde0cd28337361f3cbd2aa29662 Reviewed-on: https://gerrit.libreoffice.org/62934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-23clang-tidy performance-unnecessary-copy-init in idl..reportdesignNoel Grandin1-1/+1
Change-Id: I4b2eda375bbfe1ba35a45168515d885935adcb76 Reviewed-on: https://gerrit.libreoffice.org/62217 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22pvs-studio: V560 A part of conditional expression is always trueCaolán McNamara1-2/+2
Change-Id: Iff61dda72f304c335a1ac6d6b56e5fce2644ee81 Reviewed-on: https://gerrit.libreoffice.org/62191 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-17tdf#42949 Fix IWYU warnings in include/tools/*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9dc920e9388f9e2aa4dcae1f0b3f7562d08f7f70 Reviewed-on: https://gerrit.libreoffice.org/61809 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-2/+2
...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-09-18loplugin:useuniqueptr in SvMetaSlotNoel Grandin4-11/+9
no need to store ref-counted object like OString on the heap Change-Id: Ifd031ae68dfd615e99f54414cb2dc32aac60daa8 Reviewed-on: https://gerrit.libreoffice.org/60623 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann2-3/+3
...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-09loplugin:simplifyconstruct in helpcompiler..ioNoel Grandin2-4/+0
Change-Id: Ibdc1933b5d8d6be1fe42a7df93bd7e1c903bb39b Reviewed-on: https://gerrit.libreoffice.org/60202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-30Add 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 filter to jvmfwk Change-Id: I2a73d63f2aaef5f26d7d08957daaa8a30b412ac5 Reviewed-on: https://gerrit.libreoffice.org/58204 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-26idl: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann1-7/+0
...by removing explicitly user-provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non-deleted in the future Change-Id: I75e356ee9e12bb2d88ed9db6c60c49b3f4ac5d58 Reviewed-on: https://gerrit.libreoffice.org/58056 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-16SvPersistBase no longer necessaryNoel Grandin3-2/+1
Change-Id: I928c0898d77d30bd6ca755d07acac6f78b20563b Reviewed-on: https://gerrit.libreoffice.org/57436 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11tdf#96099 Remove some trivial std::vector typedefsArkadiy Illarionov7-12/+9
Change-Id: I0e60ec7a3edae42b25ff0917828d0a893ed39a38 Reviewed-on: https://gerrit.libreoffice.org/55245 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-30loplugin:virtualdown in variousNoel Grandin3-7/+1
Change-Id: I4db71fda953ea1d20712ae8033f6fc09b3b2855d Reviewed-on: https://gerrit.libreoffice.org/52068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-18Use for-range loops in hwpfilter, i18n*, idl* and ioJulien Nabet1-6/+6
Change-Id: I980464162b73ed9ee0a09acbca1b9050af8d1027 Reviewed-on: https://gerrit.libreoffice.org/51492 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-13SDI: don't #define/#undef names of actual classes for slot headersMike Kaganski1-2/+2
Visual Studio 2015/2017 cannot handle that correctly, and emits a lot of intellisense errors. So, just prepend the define with "ShellClass_" Change-Id: I473ceb7e0a88e114b92e6342fd4ae63015cafd3e Reviewed-on: https://gerrit.libreoffice.org/51135 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-27tdf#114441 sal_uLong to better integer typesShubham Verma2-5/+5
Change-Id: I55b45821cf67a99f97ba067a3d4923d76c19696e Reviewed-on: https://gerrit.libreoffice.org/50204 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-19loplugin:unusedmethods also check for functions returning boolNoel Grandin5-12/+8
we were previously excluding them Change-Id: I48a68799b0de60b4995fae541eb363e043d4dd11 Reviewed-on: https://gerrit.libreoffice.org/48167 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-19loplugin:useuniqueptr in idlNoel Grandin5-11/+8
Change-Id: I3681d119dda85400dbb33c96fab736c262f7ce8a
2018-01-12More loplugin:cstylecast: idlStephan Bergmann1-8/+8
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: Ic4fb1f34902fc637989a348aaea5539ddc006e38
2017-12-21TypedWhichId in svx part 1Noel Grandin1-73/+88
and teach the idl compiler how to ignore the TypeWhichId<T1> part of the define Change-Id: I030f54080924d51e9f0ac09b19e14106648024db Reviewed-on: https://gerrit.libreoffice.org/46849 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-22drop duplicate methodCaolán McNamara1-1/+1
Change-Id: Idadd0a64e41cd02f5167b275081c3576a6224b12 Reviewed-on: https://gerrit.libreoffice.org/45075 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-21Fix typosAndrea Gelmini1-1/+1
Change-Id: Ifd95ada4477d7d21ffbadd355226f91f2a2371e1 Reviewed-on: https://gerrit.libreoffice.org/45004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2017-10-30loplugin:constmethod in idl,helpcompilerNoel Grandin6-8/+9
Change-Id: I9b328fc0a3ebdd15a646ee6dab800ffbadb1aaef Reviewed-on: https://gerrit.libreoffice.org/44050 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: idlStephan Bergmann9-14/+14
Change-Id: I9631129331ef4b858ed3dd7b0e617002e6d461fb
2017-10-23Fix typosAndrea Gelmini1-2/+2
Change-Id: Ia30f466d08a9366b527225bbc0965f85881c7431 Reviewed-on: https://gerrit.libreoffice.org/43714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-23overload std::hash for OUString and OStringNoel Grandin1-1/+1
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-08SvPersistStream deadNoel Grandin1-1/+1
since commit 1e4b1e4a1aca3b333820b0a865997e6f62e80064 "Removing unused SfxItemPool serialisation from editeng" Change-Id: I8a3cd36a13b7d2322047c2035e0f23c70ca9cdf0 Reviewed-on: https://gerrit.libreoffice.org/40880 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02remove unnecessary use of 'this->'Noel Grandin1-1/+1
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4 Reviewed-on: https://gerrit.libreoffice.org/40671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28loplugin:constparams handle constructorsNoel Grandin2-4/+4
had to change the structure of the plugin considerably, was too messy to structure it to do the calculations on a per-function basis Change-Id: I4edee7735f726101105c607368124a08dba21086 Reviewed-on: https://gerrit.libreoffice.org/40516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-26convert SfxGroupId to scoped enumNoel Grandin3-3/+3
in the process I had to teach the idl compiler to cope with identifiers like SfxGroupID::Math, which has the side effect of requiring a space before a ':' in some of the .sdi files. Change-Id: If256599cb8aa1dfc0a33642c5070c5560702f3ba Reviewed-on: https://gerrit.libreoffice.org/40441 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-18loplugin:constparams codemaker,idl,idlcNoel Grandin10-20/+20
Change-Id: Ic72b7525cfbfbd3c5afb12fe9ea814176e6c8c9d Reviewed-on: https://gerrit.libreoffice.org/40126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06use OString::operator== in preference to ::equalsNoel Grandin3-6/+6
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-07-04loplugin:unusedfields in cui..idlNoel Grandin1-2/+0
Change-Id: Icb393cc0b2f79ded154e186ab6975b95e5126903 Reviewed-on: https://gerrit.libreoffice.org/39496 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-06tdf#39468 Translate German comments and dbg strings (leftovers in h.. to i..)Johnny_M1-1/+1
Translates all (leftovers) found using a custom regex, in directories not shown by /bin/find-german-comments and beginning with "h" to "i". Additionally: - Fixed a few spellings Change-Id: I54ea06f8e0cf1bd4bd6c84b171bec1bd342a8df8 Reviewed-on: https://gerrit.libreoffice.org/38390 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-06-06tdf#39674 Translate some German variable/function namesJohnny_M1-2/+2
No functional change is intended. Change-Id: Ib693d5f15bb279e8fe6771e3a64a976b53c6d13d Reviewed-on: https://gerrit.libreoffice.org/38391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-06-06replace SVSTREAM_OK with ERRCODE_NONENoel Grandin5-11/+11
since the first is #define'd to the second, and offers no extra value Change-Id: I2c67e09ea3aa5361b8e7dfe7a20858c6ae054450 Reviewed-on: https://gerrit.libreoffice.org/38406 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28remove unnecessary use of OString::getStrNoel Grandin1-2/+1
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-05-12coverity#1403731 Explicit null dereferencedCaolán McNamara1-1/+1
Change-Id: Ia8d183fbf1c80964eabc10f1e363333133a4181c
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke1-1/+0
with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>