summaryrefslogtreecommitdiff
path: root/scripting/source/stringresource
AgeCommit message (Collapse)AuthorFilesLines
2019-02-19More loplugin:simplifyboolStephan Bergmann1-3/+3
...found with GCC 9, where the standard library iterator implementations are apparently sufficiently different to older versions of GCC to find more cases of !(... == ...) vs. ... != ... Change-Id: Ibe7c5140049a69d2c5318b4b2371f2e66bd05028 Reviewed-on: https://gerrit.libreoffice.org/68012 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-28o3tl::make_unique -> std::make_unique in sax...svtools (except sc)Gabor Kelemen1-3/+2
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: I6eea0877eaa1886b64c0cce06a43b8088cbccd8e Reviewed-on: https://gerrit.libreoffice.org/66751 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-20Simplify containers iterations in scaddins, sccomp, scriptingArkadiy Illarionov1-44/+32
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-19use unique_ptr in StringResourceImplNoel Grandin2-26/+20
Change-Id: Id7a44c4ac5643aae96cb707d2cca217f8535ee63 Reviewed-on: https://gerrit.libreoffice.org/65404 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-07loplugin:singlevalfields extend to all static varsNoel Grandin1-1/+1
Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528 Reviewed-on: https://gerrit.libreoffice.org/64710 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann1-4/+4
...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 scriptingNoel Grandin1-1/+1
Change-Id: I1484d920649817680f70de4ca00a3d46e1faf42a Reviewed-on: https://gerrit.libreoffice.org/61554 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-08replace double-checked locking patterns with thread safe ...Jochen Nitschke1-11/+3
local statics. Change-Id: Iab4963a04d15f06e9b1a36079a36d32453e09c8f Reviewed-on: https://gerrit.libreoffice.org/61538 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-24tdf#42949 Fix IWYU warnings in include/comphelper/[a-l]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I22ba2c8aec235e34cd7835b8a0a716bf3057db7a Reviewed-on: https://gerrit.libreoffice.org/60837 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann1-10/+10
...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:useuniqueptr in StringResourcePersistenceImplNoel Grandin1-6/+4
Change-Id: Ie3a516adeed9a2cec7b187368bc047461a33dc87 Reviewed-on: https://gerrit.libreoffice.org/60113 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-22loplugin:useuniqueptr in StringResourceImplNoel Grandin2-34/+28
Change-Id: I399836e9177038dde03ec7435e549094e4d3dd04 Reviewed-on: https://gerrit.libreoffice.org/59437 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-20Simplify containers iterations, tdf#96099 follow-upArkadiy Illarionov1-41/+18
Use range-based loop or replace with std::any_of, std::find and std::find_if where applicable. Change-Id: I2f80788c49d56094c29b102eb96a7a7c079567c6 Reviewed-on: https://gerrit.libreoffice.org/59143 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-15tdf#96099 Remove some trivial std::vector iterator typedefsArkadiy Illarionov2-18/+16
Change-Id: Iced10ed59c475dff4d33ff06151b2015a27a860b Reviewed-on: https://gerrit.libreoffice.org/55715 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-01-12More loplugin:cstylecast: scriptingStephan Bergmann1-3/+3
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: I52e58aa38c600faf677e932cb3caad07547ccbb7
2017-12-11loplugin:salcall fix functionsNoel Grandin1-4/+4
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-12-05loplugin:salcall fix non-virtual methodsNoel Grandin1-2/+2
first, since those are safer to change than virtual methods Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe Reviewed-on: https://gerrit.libreoffice.org/45798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-06loplugin:constparams in various(2)Noel Grandin2-2/+2
Change-Id: I533a7eb724b15e168a28dc92cd5962a39bc96e7c Reviewed-on: https://gerrit.libreoffice.org/44313 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23overload std::hash for OUString and OStringNoel Grandin1-4/+2
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-07-31loplugin:constparams in extensions,scripting,sdextNoel Grandin2-4/+4
Change-Id: I3d47e144db17358bf6e2e5e3f4ad29de888c01b1 Reviewed-on: https://gerrit.libreoffice.org/40583 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31loplugin:oncevarNoel Grandin1-18/+9
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11simplify some OUString::concat usageNoel Grandin1-6/+2
Change-Id: Ifa150dc9d694981ffe03c254ea8c3fd820c99795 Reviewed-on: https://gerrit.libreoffice.org/39812 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05new loplugin unnecessaryparenNoel Grandin1-1/+1
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-02loplugin:casttovoid: scriptingStephan Bergmann1-9/+2
Change-Id: I9f77eca5a80ad4e9d3cee8f7400a245f5fa78bbb
2017-06-26loplugin:oncevar in scaddins..sotNoel Grandin1-32/+13
Change-Id: I657a131374b9f1153135e00ed429889518b91427 Reviewed-on: https://gerrit.libreoffice.org/39258 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock1-0/+1
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-21remove unnecessary explicit linefeeds from end of SAL and OSL log callsNoel Grandin1-1/+1
Change-Id: I3fa363c8e76e6cfb297f4ec346e3f031c09d6fbf Reviewed-on: https://gerrit.libreoffice.org/36727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06Add missing #includesStephan Bergmann1-0/+3
...and remove some unncessary using directives/declarations, in preparation of removing now-unnecessary #includes from cppumaker-generated files, post e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception specifications". Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-01loplugin:useuniqueptr extend to check local varsNoel Grandin1-6/+2
just the simple and obvious case for now, of a local var being allocated and deleted inside a single local block, and the delete happening at the end of the block Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625 Reviewed-on: https://gerrit.libreoffice.org/33749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann2-436/+146
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-19New loplugin:dynexcspec: Add @throws documentation, scriptingStephan Bergmann1-0/+16
Change-Id: I3a3f8ad12bad448f0ea2beb698cf4e6636d4595a
2016-12-05convert DecodeMechanism to scoped enumNoel Grandin1-1/+1
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05convert INetURLObject::EncodeMechanism to scoped enumNoel Grandin1-1/+1
Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2016-11-01loplugin:oncevar in sal..scriptingNoel Grandin1-5/+2
Change-Id: Id9ab12f3a61eb83a2288b2fd4d99ab77f5833e1b Reviewed-on: https://gerrit.libreoffice.org/30461 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann1-4/+4
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann1-5/+5
Change-Id: I678e89d9ff562446e7bbe8542a616c1b083dfcd1
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann1-1/+1
Change-Id: Ic3e7658ccfd23fa29af46eac971deac5a0373377
2016-04-14clang-tidy performance-unnecessary-value-param in variousNoel Grandin1-1/+1
Change-Id: I7168d44dab8e6a8e37bb7920d744ff32f5e52907 Reviewed-on: https://gerrit.libreoffice.org/24019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14loplugin:passstuffbyref in variousNoel Grandin1-1/+1
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
2016-03-17loplugin:constantparam in toolsNoel Grandin1-1/+1
Change-Id: I3774661799c074561c694515baba42a375d0a077 Reviewed-on: https://gerrit.libreoffice.org/23301 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-09Remove excess newlinesChris Sherlock2-31/+0
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-01-25InterfaceContainer2 with vector instead of SequenceNoel Grandin2-3/+3
create an InterfaceContainer2 class to replace InterfaceContainer. It uses a std::vector instead of a Sequence for the mutable listener list, which provides far better performance. Switch all our internal use-sites to the new class. Change-Id: I6b56cfa511ded2395faa22e68fab3b2f16c3cb88
2016-01-18loplugin:unusedfieldsNoel Grandin1-1/+0
Change-Id: I321b594f1190cdd997b4769161e1c02d31f46213 Reviewed-on: https://gerrit.libreoffice.org/21566 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-14loplugin:unusedmethods unused return value in scriptingNoel Grandin2-23/+0
Change-Id: I9b203e255eddce59c37df1a94884e459df034459
2015-12-29cppcheck: noExplicitConstructorCaolán McNamara1-1/+1
Change-Id: Ib43e53d5b6c9c130adb765ac9b769f58060ac640
2015-12-22loplugin:unusedfields in scriptingNoel Grandin1-18/+8
Change-Id: Ida8fb31bd85f4807d74daab3d022d8e6340a774d
2015-11-26mark UNO structs as SAL_WARN_UNUSED, where possibleNoel Grandin1-3/+0
Change-Id: Ie3de518f60c9f1313c68df54dbdc1fb2804f1f0d
2015-11-15use initialiser syntax for Sequence<OUString>Noel Grandin1-6/+3
replaced using the script: git grep -lP 'Sequence.*OUString.*\(1\)' | xargs perl -0777 -pi -e "s/Sequence< OUString > (\w+)\(1\); .*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g" Change-Id: I23688a91562051a8eed11fc2a85599545c285c34 Reviewed-on: https://gerrit.libreoffice.org/19967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-45/+45
Change-Id: I9b7d8de65780325175d24965057596b88d3c0f05
2015-11-06loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)Stephan Bergmann1-2/+2
Change-Id: If0f1446a25f423b8cbfe6346f7a691f4f2618ad0