Age | Commit message (Collapse) | Author |
|
Change-Id: Id3858365a54e6ae96bf9e6c3e27a777441ab56ae
Reviewed-on: https://gerrit.libreoffice.org/68133
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
largely based on the relevant portion of the unusedfields loplugin, but
adapted for local vars
Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1
Reviewed-on: https://gerrit.libreoffice.org/66835
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ibda157508e92ab5fb222daf79a38941c30a8057e
Reviewed-on: https://gerrit.libreoffice.org/67611
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one
Change-Id: Ib3201f865d43f372007cdf381c7e244e9cbeae26
Reviewed-on: https://gerrit.libreoffice.org/67474
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I3c1e0bfbba1a1849075500882133aac3899de5c8
Reviewed-on: https://gerrit.libreoffice.org/66834
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic49bb1bc6591735562b0b23d821202bab00ceba2
Reviewed-on: https://gerrit.libreoffice.org/65533
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I9fb8366634b31230b732dd38a98f800075529714
Reviewed-on: https://gerrit.libreoffice.org/64510
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia505df60f5758d40dd55bc5b24886fd8aec327ce
Reviewed-on: https://gerrit.libreoffice.org/64092
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie375f7fded2592cd1e926f14be0216608c2695d6
Reviewed-on: https://gerrit.libreoffice.org/63130
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I565f22594a371188c4a6eff5f405946ec1e04d95
Reviewed-on: https://gerrit.libreoffice.org/62061
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Patch by: me
(cherry picked from commit ae1f34be5c9a49fae1eacdb3c1e5267acea53441)
Change-Id: I0e5277b17243f6b8f5f4303206cf446b10dd0aef
Reviewed-on: https://gerrit.libreoffice.org/61597
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Tested-by: Michael Stahl <Michael.Stahl@cib.de>
|
|
...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>
|
|
Change-Id: I5d51df50a0c2279c52273254c451f3f21eaafbfb
Reviewed-on: https://gerrit.libreoffice.org/61112
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Idaf73fd5d12badbee58861c6ca3b087c16946b9c
Reviewed-on: https://gerrit.libreoffice.org/60615
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...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>
|
|
Use range-based loop or replace with functions from std algorithm.
Change-Id: I5b1859da37c2a6c6e5e70602287bfc2ada951893
Reviewed-on: https://gerrit.libreoffice.org/60463
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia8eda3075b0387ec3a5ed6267f1dfcfb3a8cf782
Reviewed-on: https://gerrit.libreoffice.org/60426
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I7bfeef47abaf94cfb355db95c0fdb928ce36c0a6
Reviewed-on: https://gerrit.libreoffice.org/60232
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: Ic2d901ca0dbc2d6fa96611d260c1572da8a783c0
Reviewed-on: https://gerrit.libreoffice.org/60398
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I8a407e0492adf61e1d815cadd5da0a1623c2b23b
Reviewed-on: https://gerrit.libreoffice.org/60191
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: If9ffa025ba0ce9a1c97c89ec50e71e7f90c5435b
Reviewed-on: https://gerrit.libreoffice.org/59436
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia400e67108e622ae63a8d59667eae96c858f22dc
Reviewed-on: https://gerrit.libreoffice.org/58463
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iaa00d65b518b3e638c2d31912e247cb91bdd0950
Reviewed-on: https://gerrit.libreoffice.org/58347
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
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 w* x*
Change-Id: I27bff44da3d34d24262031c7489e755311599bc5
Reviewed-on: https://gerrit.libreoffice.org/57307
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
There seems to be some confusion here. available() is actually the
number of bytes that can be read without blocking, but most
implementations seems to be just returning the number of bytes remaining
in the stream. Since we're doing that, let's do it properly.
(*) some of them were just casting, instead of clamping, which will
return wrong values sometimes.
(*) FileStreamWrapper_Impl/OInputStreamWrapper/OTempFileService were
doing unnecessary work, instead of just asking the underlying SvStream
for it's remaining size
Change-Id: I3ef26e0363e989ed3e00be0fdb993e1cdeb7819f
Reviewed-on: https://gerrit.libreoffice.org/57264
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ifec98748d55ff6aca64c425c50c2cf2650f61591
Reviewed-on: https://gerrit.libreoffice.org/56422
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic7e1cecaecadf3f9ebfa183727d61046dd87e473
Reviewed-on: https://gerrit.libreoffice.org/55260
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Change-Id: I5e909a8def86ce9ad150440e6c6ad304e855cc69
Reviewed-on: https://gerrit.libreoffice.org/54415
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I4324a290b826d76f89319f556aededb30d921f8d
Reviewed-on: https://gerrit.libreoffice.org/54166
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
Change-Id: I5f416c865dfe1c36018784246a8007452eb42008
Reviewed-on: https://gerrit.libreoffice.org/50996
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I6e8541837a07c8cf2e001289e0804d7e4e7ba3b1
Reviewed-on: https://gerrit.libreoffice.org/50658
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I211a6f95f7146d7ffaa0c44af786c4474abc73f4
Reviewed-on: https://gerrit.libreoffice.org/49058
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
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: Ieee6d6e7246ac03e06a10455c8ad0aaf7caa48a9
|
|
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>
|
|
fix the ReturnStmt check
Change-Id: I95076076bd1313d23798c4615ea12910c86ed9a8
Reviewed-on: https://gerrit.libreoffice.org/47309
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I57e235ecec733f1b5dd03f95f4e022769a369ae2
Reviewed-on: https://gerrit.libreoffice.org/47165
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The only effect SAL_CALL effectively has on LO-internal code is to change non-
static member functions from __thiscall to __cdecl in MSVC (where all other
functions are __cdecl by default, anyway). (For 3rd-party code, it could be
argued that SAL_CALL is useful on function declarations in the URE stable
interface other than non-static member functions, too, in case 3rd-party code
uses a compiler switch to change the default calling convention to something
other than __cdecl. But loplugin:salcall exempts the URE stable interface,
anyway.)
One could argue that SAL_CALL, even if today it effectively only affects non-
static member functions in MSVC, could be extended in the future to affect more
functions on more platforms. However, the current code would already not
support that. For example, 3af500580b1c82eabd60335c9ebc458a3f68850c
"loplugin:salcall fix functions" changed FrameControl_createInstance in
UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even
though its address (in ctl_component_getFacrory, in the same file) is passed to
cppuhelper::createSingleFactory as an argument of type
cppu::ComponentInstantiation, which is a pointer to SAL_CALL function.
Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6
Reviewed-on: https://gerrit.libreoffice.org/46436
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ic20cc65b7fa78729d432fbf5e15fabe0e25cf627
|
|
The ... idiomatic C++ code in TVChildTarget::Check() and
SearchAndInsert() handles ownership in non-obvious ways,
so it's not surprising that it took offense at the recent
conversion to std::unique_ptr. Let's at least try to
prevent it from crashing so quickly.
(regression from 4b69497e36b941d4db62ae8d5bad863d032fdc50)
Change-Id: I0981707a61aee1733e727b1c00346d8ec524362e
|
|
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>
|
|
Change-Id: Id6820abec4b8ca8bee26d62b333fd30b42a14aec
Reviewed-on: https://gerrit.libreoffice.org/46007
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
Change-Id: I885c202c64f43b89372d079659dd9b5b12677fbd
Reviewed-on: https://gerrit.libreoffice.org/44861
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0ae8533889742d314938b497d566a4bde722057a
|
|
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>
|
|
Change-Id: Ia23dafd07133779144965682df3b7125a3214235
Reviewed-on: https://gerrit.libreoffice.org/43046
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
We should only use generic foo function name when it takes params
that are also dependent on UNICODE define, like
LoadCursor( nullptr, IDC_ARROW )
where IDC_ARROW is defined in MSVC headers synchronised with
LoadCursor definition.
We should always use Unicode API for any file paths operations,
because otherwise we will get "?" for any character in path that
is not in current non-unicode codepage, which will result in failed
file operations.
Change-Id: I3a7f453ca0f893002d8a9764318919709fd8b633
Reviewed-on: https://gerrit.libreoffice.org/42935
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
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>
|
|
* Remove trailing spaces
* Use 4 spaces for indentation everywhere
See discussion at https://lists.freedesktop.org/archives/libreoffice/2017-September/078433.html
Change-Id: I0bb9a0b9b0502cdf0870529cea37ee9c4d1ffdf4
Reviewed-on: https://gerrit.libreoffice.org/41009
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|