Caolán McNamara
4725db2575
cid#1659599 Variable copied when it could be moved
...
and
cid#1659624 Variable copied when it could be moved
cid#1659632 Variable copied when it could be moved
cid#1659637 Variable copied when it could be moved
cid#1659656 Variable copied when it could be moved
cid#1659662 Variable copied when it could be moved
Change-Id: I20179a4ff699af546694b8a4796ab2f0cfae1903
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188708
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com >
Tested-by: Jenkins
2025-08-01 17:29:00 +02:00
Mike Kaganski
56f3dbffdf
Simplify a bit
...
Change-Id: I618b0f8bcb2e8032ee12367c73e1136685f66b3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176183
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2024-11-08 05:34:20 +01:00
Noel Grandin
4f5f24a4a3
loplugin:ostr in framework
...
Change-Id: I2fdc32aa5de6a1315fe69997f9b531259aa78605
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167339
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2024-05-08 17:18:51 +02:00
Caolán McNamara
de4b3a135f
cid#1545970 COPY_INSTEAD_OF_MOVE
...
and
cid#1545957 COPY_INSTEAD_OF_MOVE
cid#1545944 COPY_INSTEAD_OF_MOVE
cid#1545939 COPY_INSTEAD_OF_MOVE
cid#1545931 COPY_INSTEAD_OF_MOVE
cid#1545926 COPY_INSTEAD_OF_MOVE
cid#1545909 COPY_INSTEAD_OF_MOVE
cid#1545899 COPY_INSTEAD_OF_MOVE
cid#1545896 COPY_INSTEAD_OF_MOVE
cid#1545894 COPY_INSTEAD_OF_MOVE
cid#1545858 COPY_INSTEAD_OF_MOVE
cid#1545823 COPY_INSTEAD_OF_MOVE
cid#1545820 COPY_INSTEAD_OF_MOVE
cid#1545819 COPY_INSTEAD_OF_MOVE
cid#1545772 COPY_INSTEAD_OF_MOVE
cid#1545749 COPY_INSTEAD_OF_MOVE
cid#1545743 COPY_INSTEAD_OF_MOVE
cid#1545739 COPY_INSTEAD_OF_MOVE
cid#1545635 COPY_INSTEAD_OF_MOVE
cid#1545603 COPY_INSTEAD_OF_MOVE
cid#1545602 COPY_INSTEAD_OF_MOVE
cid#1545592 COPY_INSTEAD_OF_MOVE
cid#1545544 COPY_INSTEAD_OF_MOVE
cid#1545532 COPY_INSTEAD_OF_MOVE
cid#1545520 COPY_INSTEAD_OF_MOVE
cid#1545512 COPY_INSTEAD_OF_MOVE
cid#1545490 COPY_INSTEAD_OF_MOVE
cid#1545483 COPY_INSTEAD_OF_MOVE
cid#1545467 COPY_INSTEAD_OF_MOVE
cid#1545461 COPY_INSTEAD_OF_MOVE
cid#1545458 COPY_INSTEAD_OF_MOVE
cid#1545428 COPY_INSTEAD_OF_MOVE
cid#1545394 COPY_INSTEAD_OF_MOVE
cid#1545385 COPY_INSTEAD_OF_MOVE
cid#1545383 COPY_INSTEAD_OF_MOVE
cid#1545366 COPY_INSTEAD_OF_MOVE
cid#1545357 COPY_INSTEAD_OF_MOVE
Change-Id: I76224326977b4067b94ca3176cad1ca6de17930a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160847
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com >
2023-12-16 22:39:20 +01:00
Stephan Bergmann
64c47c92d0
Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: framework
...
Change-Id: I0f17c569eddcdc30bfca4cdcd25cb05cf783ec23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158200
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2023-10-20 07:06:17 +02:00
Noel Grandin
3a0c5b7820
loplugin:stringadd in editeng..framework
...
after my patch to merge the bufferadd loplugin into stringadd
Change-Id: Ieac16a01fde6467a2f6fe47864069304a3c44e47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149552
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2023-03-25 07:27:34 +00:00
Noel Grandin
faa40c022c
elide some makeStringAndClear() calls
...
Change-Id: I8636102554a76f2ba3f6297219b40761473a4489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137285
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2022-07-21 11:01:22 +02:00
Noel Grandin
ae29e471ca
convert #defines to OUStringLiteral
...
mostly by doing
$ git grep -l '#define.*\"' -- *.cxx
| xargs perl -pi -e
's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 =
u\2;/g'
Change-Id: I63a4b050f220f0a61749892cd47fb91813f7d088
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119844
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-08-02 12:57:28 +02:00
Noel Grandin
bfc1600c6a
loplugin:indentation improve checks for brace alignment
...
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-06-28 10:47:34 +02:00
Noel
1250aecd71
loplugin:stringviewparam extend to new..
...
O[U]StringBuffer methods
Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-01-29 09:25:12 +01:00
Gabor Kelemen
a5389cb5dd
tdf#42949 Fix new IWYU warnings in directories [e-f]*
...
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I963aa5fb892a0be36212fd0587b69f217f017947
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105469
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de >
2020-11-12 10:53:07 +01:00
Noel Grandin
c435ee5c9c
framework: create instances with uno constructors
...
See tdf#74608 for motivation
Change-Id: Ia2d9447b687f0792d9d3a98d30cd2b8fe54049ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98388
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2020-07-09 08:46:19 +02:00
Noel Grandin
6653107b83
clean up macro usage
...
Change-Id: I06669718f692cc5e9e209b4e490365f4f016afdb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98389
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2020-07-09 08:27:53 +02:00
Noel Grandin
1a90b1aa64
framework: create instances with uno constructors
...
See tdf#74608 for motivation
Change-Id: I6237016000dc05eacb14e59815b53cd44fbfce0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98384
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2020-07-08 21:12:50 +02:00
Gabor Kelemen
0f25e181c1
tdf#42949 Fix IWYU warnings in framework/*/*cxx
...
Also drop the now unused framework/inc/general.h
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I8e19036a507dbdcd178835b6ac4182719d27a654
Reviewed-on: https://gerrit.libreoffice.org/82744
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com >
2019-11-20 10:47:20 +01:00
Stephan Bergmann
c18e2ea2a5
New loplugin:data
...
...following up on 1453c2c8f1 "prefer vector::data
to &vector[0]"
Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01
Reviewed-on: https://gerrit.libreoffice.org/72765
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2019-05-22 16:35:20 +02:00
Noel Grandin
bf9f0b2973
loplugin:sequentialassign in framework
...
Change-Id: I98da731a0f6b72ea0cb890dae2f25992c75a0984
Reviewed-on: https://gerrit.libreoffice.org/70701
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2019-04-13 14:47:12 +02:00
Stephan Bergmann
206b5b2661
New loplugin:external
...
...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-17 09:05:38 +02:00
Noel Grandin
8dc6c96a80
loplugin:simplifyconstruct in filter..framework
...
Change-Id: Ida4307a92dfb1dbd14da5a30b6ee1f0fd6a9455e
Reviewed-on: https://gerrit.libreoffice.org/60194
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-09-08 19:28:19 +02:00
Jochen Nitschke
8ddca0648a
tdf#42949 remove unused compheler includes ..
...
and fix the fallout
Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e
Reviewed-on: https://gerrit.libreoffice.org/54882
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk >
2018-06-05 10:56:36 +02:00
Jochen Nitschke
9401c7c28a
remove unused processfactory.hxx includes
...
and fix fallout
Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee
Reviewed-on: https://gerrit.libreoffice.org/52206
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de >
2018-04-01 12:11:26 +02:00
Julien Nabet
823ef9ef32
Use for-range loops in framework
...
Change-Id: I72ea832848fd7c76863bcee70a3303de488c0b0f
Reviewed-on: https://gerrit.libreoffice.org/51471
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2018-03-17 23:08:48 +01:00
Stephan Bergmann
cf8b8cad05
More loplugin:cstylecast: framework
...
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: I8981ef6de675bf10c103e1af0afccd620762268d
2018-01-12 20:23:23 +01:00
Noel Grandin
9a06b99d2f
loplugin:salcall fix non-virtual methods
...
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-12-05 07:32:46 +01:00
Noel Grandin
9881bea8d4
remove unnecessary use of OUString::getStr
...
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-17 11:55:13 +02:00
Stephan Bergmann
48d8b2d468
loplugin:oncevar: empty strings: framework
...
Change-Id: I5e3387890e0d9bddaec82d7711e6aa52df3126cd
2017-07-13 11:46:06 +02:00
Noel Grandin
4b2262ab5b
new loplugin unnecessaryparen
...
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-05 11:08:48 +02:00
Stephan Bergmann
309115d8bb
loplugin:stringcopy: framework
...
Change-Id: Id63d99bc5048cfdffc834cf034f078d783ca95dc
2017-05-19 17:17:40 +02:00
Chris Sherlock
97eb00c75e
revert OSL_ASSERT changes
...
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07 17:03:35 +10:00
Chris Sherlock
ddce1e22fb
tdf#43157: convert framework module away from OSL_ASSERT to assert
...
Change-Id: Iac0093a2a69d53c91c827ebba01fcdb5353e9b96
2017-05-07 09:54:46 +10:00
Stephan Bergmann
6dce9c6757
Add missing #includes
...
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849 "Remove dynamic exception
specifications".
Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-06 17:21:16 +01:00
Stephan Bergmann
e57ca02849
Remove dynamic exception specifications
...
...(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-26 12:54:43 +00:00
Noel Grandin
0a840edcc1
includes should be at the top of the file
...
not randomly scattered through the code
found with something like:
git ls-files *.cpp | xargs grep -Pzl "(?s){.*#include"
Change-Id: I9c242fa4ef99e8677f2800d7ec9f16d16e488351
Reviewed-on: https://gerrit.libreoffice.org/30952
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2016-11-18 09:25:06 +00:00
Stephan Bergmann
7bf2f61ac7
Clean up uses of Any::getValue() in framework
...
Change-Id: I55982944bf2ee3d9aa6899bcc59e94f9342b4036
2016-06-10 18:55:07 +02:00
Stephan Bergmann
ed467869d8
loplugin:salbool: Automatic rewrite of sal_False/True
...
Change-Id: Idf27ee5370f1fa24adf22908d9e801c7d40db935
2016-04-20 17:25:42 +02:00
Noel Grandin
f045c536db
clang-tidy performance-unnecessary-value-param in framework
...
Change-Id: I80987ea1bfac7478574de46ee30fc58fcc17eb68
2016-04-12 11:56:07 +02:00
Stephan Bergmann
06c5c63020
loplugin:nullptr (automatic rewrite)
...
Change-Id: Ie178c474921c1695927a9b01a9972baf09fbb73d
2015-11-10 10:31:27 +01:00
Noel Grandin
d191d1f9b6
com::sun::star->css in framework
...
Change-Id: If5a77db83fcbef5ed436f2043ddeb7c515a840dc
Reviewed-on: https://gerrit.libreoffice.org/19356
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2015-10-14 06:37:16 +00:00
Andrea Gelmini
eab0904f0e
Fix typos
...
Change-Id: I81f6f356c1a6873fcc9a3bde487127b673fa9a61
Reviewed-on: https://gerrit.libreoffice.org/18952
Reviewed-by: Oliver Specht <oliver.specht@cib.de >
Tested-by: Oliver Specht <oliver.specht@cib.de >
2015-09-30 12:39:01 +00:00
Stephan Bergmann
e9b7506415
loplugin:stringconstant: OUStringBuffer: appendAscii -> append
...
Change-Id: Iadb6e16a7aca322a78a82ae1a52f5d085b300efc
2015-08-31 08:03:15 +02:00
Stephan Bergmann
e4c1c0829a
Replace remaining getCppuType et al with cppu::UnoType
...
Change-Id: I320895b73f101986e1aab95668c7b76e04315aab
2015-04-01 08:39:26 +02:00
Stephan Bergmann
5d950b3afd
Clean up C-style casts from pointers to void
...
Change-Id: Ide77480339e35a886f0d33c2a194244064c02488
2015-03-28 19:09:21 +01:00
Stephan Bergmann
d69fb68f30
Some more loplugin:cstylecast: framework
...
Change-Id: Iebd80b596bcc1f740ff9f3b0f168472144cacbed
2015-01-20 09:06:48 +01:00
Stephan Bergmann
b98352996c
framework: Use appropriate OUString functions on string constants
...
Change-Id: I5da5cd3254102c742021b3e7b4e1f907ca897ca5
2014-12-18 14:12:22 +01:00
Julien Nabet
037d03b9fa
Typo: (N|n)ormaly->(N|n)ormally
...
Change-Id: I96d081f394b0b62d99ec1034bf5e99da9aedd9d9
2014-09-10 22:35:39 +02:00
Takeshi Abe
9bac4d413e
typo: more then -> more than
...
Change-Id: I2e477d66f25bde7256938ccb1f95ab26add24922
2014-08-01 23:40:12 +09:00
Noel Grandin
0e507ae031
various: remove SAL_THROW macro
...
Change-Id: I9464179a736b91f5bc32eb5e5e89b3b4e3da3494
2014-06-05 08:17:52 +02:00
Noel Grandin
ebc0a15515
remove more unnecesary OUString constructor use
...
when throwing exceptions
Change-Id: I6edfb6b6745499f802b0e3c0e096a36fb7c32aac
2014-05-29 09:01:40 +02:00
Noel Grandin
e7bc3cab01
remove boilerplate in UNO Exception constructor calls
...
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.
Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
2014-05-23 15:06:00 +02:00
Julien Nabet
68741d0055
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part13
...
Change-Id: Ieecfd7ccb10c75ac639d0ba8e7cb588607097c2a
2014-05-15 22:52:22 +02:00