Age | Commit message (Collapse) | Author | Files | Lines |
|
...that was apparently meant to guard the following
&context_values[0]
that got changed to
context_values.data()
in c18e2ea2a52fc171c50fcb22d431e94c6aececc5 "New loplugin:data"
Change-Id: Ic63d8e775f3b75cca7df2b08665cccc0b4c3ec3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99316
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I75602277a5a26b012a12f2c4f4b7ff5bb663b0b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98474
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Background and motivation:
https://tools.ietf.org/html/draft-knodel-terminology-02
Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: Ic61c1d5829b510a71b8d444f29ffed36ee540ea8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94717
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
to look for the
x.get() != null
pattern, which can be simplified to
x
I'll do the
x.get() == nullptr
pattern in a separate patch, to reduce the chances of a mistake
Change-Id: I45e0d178e75359857cdf50d712039cb526016555
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95354
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I482d48e29ddc9690d9c671cde2f6b0c611ec378d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94550
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7bd0c2a55b936896fcfe7e1a374871008a18618f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93706
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I814a109b7822d7a6cd23b5aa4220d496a4da2fb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92425
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id14fed7e5c0f588ad3c927f12251432d12c1a7c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92190
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id3fe1d66cb1d3cb57f8aa5e652bf1c9ad6346091
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90286
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
This basically extends what commit
eb15ac837e06087fb8148330e9171d6697d89ee6 ("android: Avoid
throwing exceptions through the bridges.", 2019-11-29), amended
by f2f8a2ec10d87ffb23949338a9e4da1e1d704644 ("android:
Actually let's avoid the exceptions via bridges only on aarch4.",
2019-12-02) did for the online-based Android app to cover the Android
Viewer case as well.
This makes Android Viewer work on aarch64, which previously crashed
whenever trying to load a document.
Change-Id: Id8b30e1dced583159cc4d81aaa18f4c25b901cff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90047
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: Id2830f09ca6afd11f6f866565f37bdb7ba45bfb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84205
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
|
|
With --enable-pch=full there's not much difference between a "public"
header in <module>/inc and a private one in <module>/src/somewhere/inc .
And since the script searches recursively, this apparently helps to
find even more headers for lower pch levels.
Change-Id: I8483d0aa5b4fea5a59107c20a8aa5f1ef694af0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87799
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
"Find explicit casts from signed to unsigned integer in comparison against
unsigned integer, where the cast is presumably used to avoid warnings about
signed vs. unsigned comparisons, and could thus be replaced with
o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx)
o3tl::make_unsigned requires its argument to be non-negative, and there is a
chance that some original code like
static_cast<sal_uInt32>(n) >= c
used the explicit cast to actually force a (potentially negative) value of
sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the
cast to avoid a false "signed vs. unsigned comparison" warning in a case where
n is known to be non-negative. It appears that restricting this plugin to non-
equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=)
is a useful heuristic to avoid such false positives. The only remainging false
positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast
from sal_Int32 to sal_uInt32".
But which of course does not mean that there were no further false positivies
that I missed. So this commit may accidentally introduce some false hits of the
assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan
--enable-dbgutil) `make check && make screenshot`.
It is by design that o3tl::make_unsigned only accepts signed integer parameter
types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses
which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in
include/oox/helper/helper.hxx is used with both signed and unsigned types, so
needs a little oox::detail::make_unsigned helper function for now. (The
ultimate fix being to get rid of the macro in the first place.)
Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
instead of relying on side-effects from instantiating an iterator
Change-Id: Ie66b9e7ceeb3c4a0f4243fdd0a5ac37af77e98ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87412
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id8064e961a64bb03bc0fb61e375cdcf769b340cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87276
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
instead of fighting the fact that Sequence is intended to be immutable
getSequence() will become a little slower, but since getSequence()
is called 5k times during 'make check', while add/remove are called
3M times, I think it's safe to say mutation is dominant.
Change-Id: I23d127c93c589050d6c06c0da47871e1ebe7b52d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86929
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
this fixes commit 3a0c4574449fc2313306c4e0e39bb7416cc20657, by
converting the assert in removeInterface() to SAL_WARN_IF, and similarly
for the related addInterface() method
Comment from sberg on the original commit:
This leaves OInterfaceContainerHelper::add-/removeInterface in somewhat
inconsistent state (as addInterface OSL_ASSERTs non-null but then also
explicitly checks for null, i.e., effectively supports null).
css.lang.XComponent::add-/removeEventListener do not explicitly specify
whether or not their arg may be null. I /think/ we traditionally
supported null; asserting non-null thus might cause issues for 3rd-party
code.
Change-Id: I1e28cc03aa7dfe662125c573d60b447309009448
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86827
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and fix the one place triggering it
Change-Id: I87ec57c6a92ed89fdacfcb0d650525eaeaa266b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86822
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0bb4ea91288a15fb590d077fb390c53be8b50400
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86801
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
It got introduced with b6cebf4a3e2997e6489bba77b358b306f8f435ce "Allow UNO
component libraries to have each implementation in its own function", then
ae3a0c8da50b36db395984637f5ad74d3b4887bc "Add .component <implementation
constructor='...' feature" removed all of its uses and noted: "[...] (which had
previously been adapted to use the prefix="direct" feature, which may become
unnecessary again in the end, depending on how to handle single-instance
services/singletons)." Handling of single-instance services/singletons has been
added with 997d21183322a0a94b96868073808841d2773902 "Support for singleton
constructor functions" and the feature has really become unnecessary again.
Change-Id: I1ab910805d61421f892a244313c8778cd453f98c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86765
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
found using 'git grep', I tried using clang-tidy, but it only
successfully found a tiny fraction of these
Change-Id: I61c7d85105ff7a911722750e759d6641d578da33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86526
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...and rename constructor members to constructorName/constructorFn for
disambiguation.
"Splitting ImplementationInfo out of Implementation has become necessary to
avoid circular references" in c16d0dd846e25df56feffe868a15eb33bb55e42a
"fdo#49291 Postpone actual factory instantiation as long as possible", but was
no longer necessary since 997d21183322a0a94b96868073808841d2773902 "Support for
singleton constructor functions" (which also removed the need to hold
ImplemenationInfo by shared_ptr, which has already been cleaned up with
fc11bce4917aae7e8324f2c721ce50a88d231b0c "ImplementationInfo can be inlined").
Change-Id: I51467aa7b1fce56d6549738efd1f34f91925dac5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86013
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
no need to hold by shared_ptr, it is never shared
Change-Id: I4818c08e4beab57d777e90d181d92a3edddffbf5
Reviewed-on: https://gerrit.libreoffice.org/85772
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7e9fa7011f1e0bf143f86055718c772caebf8ee6
Reviewed-on: https://gerrit.libreoffice.org/85397
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I3c8a0d5fb2b17ccef3c931f13230f99b1945a4bc
Reviewed-on: https://gerrit.libreoffice.org/84566
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
From some reason it does not work, so let's do the same we are doing on
iOS; at least for now.
Change-Id: I915f8683a112548fc3defc1114f9dce3aa7be30e
Reviewed-on: https://gerrit.libreoffice.org/84067
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/84204
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
|
|
which merely announce that the next declaration is a class
Change-Id: Ifdb1398bcd99816b13e0b3769b46d0562bfbc1dc
Reviewed-on: https://gerrit.libreoffice.org/84229
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend
loplugin:external to warn about enums".
Cases where free functions were moved into an unnamed namespace along with a
class, to not break ADL, are in:
filter/source/svg/svgexport.cxx
sc/source/filter/excel/xelink.cxx
sc/source/filter/excel/xilink.cxx
svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
All other free functions mentioning moved classes appear to be harmless and not
give rise to (silent, even) ADL breakage. (One remaining TODO in
compilerplugins/clang/external.cxx is that derived classes are not covered by
computeAffectedTypes, even though they could also be affected by ADL-breakage---
but don't seem to be in any acutal case across the code base.)
For friend declarations using elaborate type specifiers, like
class C1 {};
class C2 { friend class C1; };
* If C2 (but not C1) is moved into an unnamed namespace, the friend declaration
must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see
C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither
qualified nor a template-id and the declaration is a function or an
elaborated-type-specifier, the lookup to determine whether the entity has been
previously declared shall not consider any scopes outside the innermost
enclosing namespace.")
* If C1 (but not C2) is moved into an unnamed namespace, the friend declaration
must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882>
"elaborated-type-specifier friend not looked up in unnamed namespace".
Apart from that, to keep changes simple and mostly mechanical (which should help
avoid regressions), out-of-line definitions of class members have been left in
the enclosing (named) namespace. But explicit specializations of class
templates had to be moved into the unnamed namespace to appease
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of
template from unnamed namespace using unqualified-id in enclosing namespace".
Also, accompanying declarations (of e.g. typedefs or static variables) that
could arguably be moved into the unnamed namespace too have been left alone.
And in some cases, mention of affected types in blacklists in other loplugins
needed to be adapted.
And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which
is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is
not moved into an unnamed namespace (because it is declared in
sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about
such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler
doesn’t give this warning for types defined in the main .C file, as those are
unlikely to have multiple definitions."
(<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The
warned-about classes also don't have multiple definitions in the given test, so
disable the warning when including the .cxx.
Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4
Reviewed-on: https://gerrit.libreoffice.org/83239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Iafa89df6f724fa6b64712d970502091e38300dad
Reviewed-on: https://gerrit.libreoffice.org/83341
Tested-by: Jenkins
Reviewed-by: Aron Budea <aron.budea@collabora.com>
|
|
E.g. #ifdef LIBO_INTERNAL_ONLY is always true for code that builds
with our PCHs.
Change-Id: I3cf311ea3621b909105754cfea2cb0116b8b67f5
Reviewed-on: https://gerrit.libreoffice.org/80961
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
which defeat the *StringConcat optimisation.
Also make StringConcat conversions treat a nullptr as an empty string,
to match the O*String(char*) constructors.
Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b
Reviewed-on: https://gerrit.libreoffice.org/80724
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I17f06c9415b9d43b6d8896360e07216c2856367a
Reviewed-on: https://gerrit.libreoffice.org/79627
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7b3a22584bb2e4d501f509ffcd80929feed23a4c
Reviewed-on: https://gerrit.libreoffice.org/79360
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Where the problem was benign and the class was not extended, I marked
the class as final.
Where the problem was benign and the class was extended, I marked the
relevant callee methods as final.
Other cases were excluded in the plugin.
Change-Id: Idb762fb2206af4e8b534aa35ff77f8368c7909bc
Reviewed-on: https://gerrit.libreoffice.org/79089
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I3a51812bbd3fcdc6b11e47cb12962f0d4fa7a2ae
Reviewed-on: https://gerrit.libreoffice.org/78191
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iaf42114ab98875c4bc1545684f1893540b998ef2
Reviewed-on: https://gerrit.libreoffice.org/77723
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
in cppuhelper, desktop, drawinglayer, embeddedobj, extensions
Change-Id: I4c970f08c0723299f79c9e18bc71b7372a7092e4
Reviewed-on: https://gerrit.libreoffice.org/77636
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
... and standard algorithm instead of loop.
Change-Id: Ic90fa7e227807768f094b9fc231f3ba3d48e6139
Reviewed-on: https://gerrit.libreoffice.org/77350
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I6535fd0cf4f8b906c62fa51cb555da548c6e99ae
Reviewed-on: https://gerrit.libreoffice.org/76688
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I56a9bf698b60bd278c71cc632aacef2bd2f4c13f
Reviewed-on: https://gerrit.libreoffice.org/76501
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ib8a513d88575cef9c1479b91adff98170c9323e8
Reviewed-on: https://gerrit.libreoffice.org/75937
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
so not when pProperties[i-1].Name == pProperties[i].Name
and call getConstArray() only if there have been a sort
Found when testing tdf#125941 when editing table:
$8 = uno::Sequence of length 29 = {
{Name = "AutoIncrementCreation", Handle = 49, Type = uno::Type "string", Attributes = 0},
{Name = "CatalogName", Handle = 30, Type = uno::Type "string", Attributes = 0},
{Name = "CatalogName", Handle = 30, Type = uno::Type "string", Attributes = 0},
{Name = "DefaultValue", Handle = 20, Type = uno::Type "string", Attributes = 0},
{Name = "DefaultValue", Handle = 20, Type = uno::Type "string", Attributes = 0},
{Name = "Description", Handle = 19, Type = uno::Type "string", Attributes = 0},
{Name = "Description", Handle = 19, Type = uno::Type "string", Attributes = 0},
...
Change-Id: I645f7d24d552222cf520e346f4505f5a14979a30
Reviewed-on: https://gerrit.libreoffice.org/74124
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Similar to clang-tidy readability-container-size-empty
Change-Id: I81c0ff78d2ecc7d984e3ed5e5ce60efe327fc162
Reviewed-on: https://gerrit.libreoffice.org/71799
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "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>
|
|
Change-Id: I4894023e42cbfa32916ee3ddfb2cfb5426cfc69f
Reviewed-on: https://gerrit.libreoffice.org/72195
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Plus some build fixes triggered by this.
Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50
Reviewed-on: https://gerrit.libreoffice.org/71581
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I08d6e2cb30c54b9e7b11498850e5f5cd7de1a98d
Reviewed-on: https://gerrit.libreoffice.org/70994
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I249b81afe5ec2fab5e0aaf73a2cde62173fa803e
Reviewed-on: https://gerrit.libreoffice.org/69912
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Helps filter stupid stuff that makes no sense for online - eg.
reportbuilder or jdbc.
Change-Id: I40e06954c45fdefd21528202f4587ae83eb994c2
Reviewed-on: https://gerrit.libreoffice.org/69567
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|