Age | Commit message (Collapse) | Author | Files | Lines |
|
...in include files. This is a mix of automatic rewriting in include files and
manual fixups (mostly addressing loplugin:redundantfcast) in source files that
include those.
Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Id94a89596bd473ed8c83d7be89ba673d8dc1bba1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150878
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
We'll eventually need to do something about the 32 bit TimeValue::Seconds, but
as it is unsigned we should be fine for another 80 years (until "06:28:15 UTC on
Sunday, 7 February 2106", according to
<https://en.wikipedia.org/wiki/Year_2038_problem#Solutions>).
Change-Id: I74e680be0b2f0ef8cd84d6bc0faef436efc8d3cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139859
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I641d05e360c3208845a2fa6721ac8ba1ad0f3309
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137667
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
+ replace getLength() by a call to isEmpty() since we're here
Change-Id: I77a318ea3e8ceeeddd6c64cee25aa6700cb3457b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136084
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Idcf537a838bb0e47cfa31db8bc09e477b277ee37
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133875
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
See tdf#42949 for motivation
Change-Id: If710445176681de8e0a0b6c65f58ecaca19dbccf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132768
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I3b2e01b482f7f4dbceea090b9586cdb4eee4e703
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125869
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I16f3de8398323a308e20d04643a11dd9c3ec59f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124404
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I7fa98e05261b6c1ff7c053b5f563ea97bd67ed00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123800
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Justin Luth <justin_luth@sil.org>
|
|
Change-Id: Ia5afdfb545791e143b8d34193de95e30b8f054b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123799
Tested-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
otherwise the next known property will appear at the skipped unknown
property, resulting in "true" for IsHidden getting used as "TargetURL"
Change-Id: I0797db9eab94c175b5cc32c66051a1aa35be99c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123804
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
It is always nice to know WHICH password you are being asked for.
When a remote open/save service exists (without a saved password)
then the password request immediately pops up and nowhere is there
any indication which service / username the password is for.
This still doesn't indicate which hostname/service this is for,
but better than nothing at all.
To avoid causing any regressions, this was done only when a
username was explicitly passed along. In the case where a
previous password was guessed, that is kept as _NA.
[aMessage provides "Enter password for <user> on <host>"
but that duplicates the label "Enter user name and password for:".
So we don't seem to have much to work with here.]
Change-Id: I0991c76ed1ce625ef354009fb416f1058cbeb313
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123746
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Idd38076a40b1177253719c01c1928da4c903151c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117017
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I31f91295e1e34efbd0e2b7d2c463f2ca19b512e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113429
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
ucb, uno*, uui
Change-Id: Ic4b6d541eb0df8bf7bceddf178ebb5177ad2b87b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112046
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
|
|
Change-Id: I221468d7030cf3ebf0425ede29e46febe8ffbe05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112763
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
... where the object is created in-place, and its type is known
Change-Id: Ifabfcf2f3ad0d60152f14e8d970c1faa42115288
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112256
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Id379a545017d1574e1253ef7c1a9dac49f87b043
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111105
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I7531ea30e8d141dce1d1bc27ffbca3fcf28d0ef5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110892
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I645c81c1454d3eeea6083387f1d343985b4b6d96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105722
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
|
|
Change-Id: I7eb38f0da1d88fd0f7ca4a1054546617b10a3502
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103843
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I473956d570feac508e52a3e52cc26cc154f4dc56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101627
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
|
|
Change-Id: I2dd10873be73256a3689233c7b1e37bde8f685ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100820
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ica7e5d3b5a5cec065f35f99d62b3b6604323601a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100009
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
See tdf#74608 for motivation.
Change-Id: I8e20d9800d9446a42e1e2baed51f650b324cc248
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99267
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
to make the ongoing convert-to-UNO-constructor work easier
Change-Id: I99596561832b10538505cf4dfdabaf11d6e4d7cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98664
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I644d5e418028b4b4e66cf67b20a1155a689acab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93906
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
we get a GError of G_IO_ERROR_FAILED_HANDLED which is documented
as "Operation failed and a helper program has already interacted with the user.
Do not display any error dialog." PENDING seems to describe this state
better than a generic error case and results in no error dialog.
Change-Id: Iee382e49edaa0a734526659971e0339991e2c03e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92187
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
This reverts commit d8f8b4375998b62431c8605004e7c7d5c921ccc9.
Change-Id: Iece88b16cfb2e4ff18dd82bbf6624dc64a33cebf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90519
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Of course, some lok apps may want the provider, but it creates
unwanted threads causing problems with forkit in some cases.
Change-Id: I7d19d629b3657780b52c3c753a4c8dcba6ae86b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87111
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: Ib8b14df44da17fb0ebb12f160b66573183f7a17e
Reviewed-on: https://gerrit.libreoffice.org/85745
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>
|
|
...checking for unnecessary uses of more "fake bool" types.
In the past, some of the checks involving the types of variables or data
members, or the return types of functions, issued warnings that required
surrounding code to be changed too (e.g., when changing the signature of a
function whose address was taken). These checks have been tightened now to not
warn in such cases (which avoids warnings that require changes to additional
code, or changes that might even be impossible to make, at the cost of being
less aggressive about removing all unnecessary uses of those "fake bool" types).
Change-Id: I70eb75039817cda34ed611387ee27dc5f36a3e2e
Reviewed-on: https://gerrit.libreoffice.org/82554
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
tweak the plugin to be more permissive, then validate by hand
afterwards
Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654
Reviewed-on: https://gerrit.libreoffice.org/81942
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Also recheck hxx files after recent changes in f-u-i
Note: to build ucb/source/ucp/webdav one needs to use the
--with-webdav=serf
configure option
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I69c3a869394b0667b4d51e18e5293000872227a5
Reviewed-on: https://gerrit.libreoffice.org/81496
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
See <https://gitlab.gnome.org/GNOME/glib/merge_requests/1170> "Avoid C++20
deprecated assignment to volatile" for a potential fix in GLib (but also see my
question at <https://github.com/llvm/llvm-project/commit/
4a6861a7e5b59be24a09b8b9782255d028e7aade#commitcomment-35540755> "[c++20]
P1152R4: warn on any simple-assignment to a volatile lvalue" whether that Clang
warning is actually wanted here).
With glib2-devel-2.62.1-1.fc31.x86_64, the suppressed warnings looked like
> libreofficekit/source/gtk/lokdocview.cxx:327:1: error: use of result of assignment to object of volatile-qualified type 'volatile gsize' (aka 'volatile unsigned long') is deprecated [-Werror,-Wdeprecated-volatile]
> G_DEFINE_TYPE_WITH_CODE (LOKDocView, lok_doc_view, GTK_TYPE_DRAWING_AREA,
> ^
> /usr/include/glib-2.0/gobject/gtype.h:1617:56: note: expanded from macro 'G_DEFINE_TYPE_WITH_CODE'
> #define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
> ^
> /usr/include/glib-2.0/gobject/gtype.h:2034:3: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN'
> _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PARENT, flags) \
> ^
> /usr/include/glib-2.0/gobject/gtype.h:2005:7: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER'
> g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
> ^
> /usr/include/glib-2.0/glib/gthread.h:257:17: note: expanded from macro 'g_once_init_leave'
> (void) (0 ? *(location) = (result) : 0); \
> ^
Change-Id: If67ad04f8fb242f50b43a1d98ad2b28c4bed55a4
Reviewed-on: https://gerrit.libreoffice.org/80937
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Note: to build ucb/source/ucp/webdav one needs to use the
--with-webdav=serf
configure option
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I6da50aeeea0c05d49b8b9eadf67ab91d3d250f41
Reviewed-on: https://gerrit.libreoffice.org/79577
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@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: Id9c3a97bdb3eaa69973d3742ce57257800fa21ae
Reviewed-on: https://gerrit.libreoffice.org/76634
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Use range-based loops or replace with STL functions
Change-Id: I755dec47aeeed879a032eecd50dee585c392ec59
Reviewed-on: https://gerrit.libreoffice.org/74915
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
|
|
Using g_main_loop_run here appears to be inherently necessary for the
g_file_mount_enclosing_volume/g_file_mount_enclosing_volume_finish protocol, but
has at least two problems: For one, it temporarily drops the SolarMutex (if it
was held by the current thread), causing the usual integrity issues caused by an
inner stack frame temporarily releasing the SolarMutex that is held by some
unsuspecting caller. This is an inherent problem of our broken SolarMutex
design, and this change can't do much about it.
But for another, at least with GTK-based VCL backends, it also means that the
current thread can start to execute VCL events at "unexpected" times from within
this g_main_loop_run (e.g., paint events, as in the backtraces linked from
tdf#124962). While handling of VCL events is necessary when a callback to
ooo_mount_operation_ask_password happens and it actually pops up a dialog
prompting the user for credentials, such handling of VCL events is completely
unwanted when no such dialog is popped up (e.g., when the given server is
unreachable anyway, as is the case in tdf#124962).
So, to shrink the problematic window of time in which VCL events may get handled
from within the gio MountOperation, use a dedicated GMainContext for the gio
GMainLoop (so that it only handles events related to the mount operation), and
only temporarily put back in place the original GMainContext during
ooo_mount_operation_ask_password (so that VCL events will get handled as
necessary when a dialog is actually popped up).
Change-Id: Ie410f23778045b1adf98579bb34ce38d0f8f3320
Reviewed-on: https://gerrit.libreoffice.org/72026
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...in preparation for another change using a top-level namespace ucb
Change-Id: I3a92d64806bc570bdfd4fe06e672cb6ce2049e7e
Reviewed-on: https://gerrit.libreoffice.org/71987
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Similar to clang-tidy readability-container-size-empty
Change-Id: Idefe55e37f5c837c889548ffe7c5711400012a4d
Reviewed-on: https://gerrit.libreoffice.org/71667
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...from Content::getPropertyValues. ca0308797df86ebece19260f3ca438a0cb437208
"tdf#121337: Fail on GIO error in GIO UCP getPropertyValue" had made
Content::getPropertyValues fail for every getGFileInfo failure. However, when
saving to a not-yet exisiting file, SfxMedium::Transfer_Impl
(sfx2/source/doc/docfile.cxx) requests the properties "Title" and "ObjectId"
from the Content representing the not-yet existing file, and apparently expects
those requests not to fail. So restructure Content::getPropertyValues to only
call getGFileInfo when actually needed (that covers not failing for the unknown-
anyway "ObjecdtId" property), and handle "Title" specially by not failing for
a non-existing file. (The documentation at offapi/com/sun/star/ucb/Content.idl
says for the "getPropertyValues" command that: "The execution will not be
aborted, if there are properties requested, that are unknown to the content."
But that leaves it somewhat unclear whether failure to obtain a known property
should be propagated. It apparently should be in the context of tfd#121337
fixed previously, but apparently not for "Title" here.)
Change-Id: I12a9a5bd93d661922ea3b7b19a84a7e73e7e4b50
Reviewed-on: https://gerrit.libreoffice.org/71515
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I7a36dd235a100b0d283eec86646dc167ac224ba7
Reviewed-on: https://gerrit.libreoffice.org/71133
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I0fff9ee06225d4ff2e9c0611b1b11f1d3b896be2
Reviewed-on: https://gerrit.libreoffice.org/70733
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ifa4b34065dacf9e144f076631c57f1d01aedaeeb
Reviewed-on: https://gerrit.libreoffice.org/67608
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|