Age | Commit message (Collapse) | Author |
|
simplify the initialisaion and make them thread-safe i.e. initialise
them using the runtime's local static locking.
Thanks to mike kaganski for pointing out the nice lambda approach that
makes this feasible.
Change-Id: I76391189a6d0a3d7eed2d0d88d28dfa6541eaff7
Reviewed-on: https://gerrit.libreoffice.org/63645
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: Iabe571aa8f00492902c499094bea8365a3e17fca
Reviewed-on: https://gerrit.libreoffice.org/63623
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I762eb7766a5cbe788c0a360c8a6f37b9b1106412
Reviewed-on: https://gerrit.libreoffice.org/63639
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
Change-Id: I42836dcd1ef3f95d90e6e8897efff9cab7cc23fd
Reviewed-on: https://gerrit.libreoffice.org/63276
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
Move the xmlsec helper methods to comphelper so that we can use them in cui
Change-Id: If9b10cfff5f5abd6b16e48f043af7959edbb1142
Reviewed-on: https://gerrit.libreoffice.org/63198
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
Splits gb_JunitTest_set_unoapi_test_class_and_jars into two
separate defines as:
- gb_JunitTest_use_unoapi_jars
- gb_JunitTest_use_unoapi_test_class
Then replaces many of the gb_JunitTest_use_jars lists with the
new gb_JunitTest_use_unoapi_jars to fix the JUH dependencies.
This probably adds some unneeded JUH dependencies to some Java
tests, but that shouldn't be a problem.
Change-Id: I0c4fce6b50f7c6eb8d62bfb2c50f056b97584794
Reviewed-on: https://gerrit.libreoffice.org/63119
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Change-Id: Iea1227a9f13a0a618d9bb6b0bbedaa5ce8d1a4f5
Reviewed-on: https://gerrit.libreoffice.org/62732
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
just use OUStringBuffer here, and consequently avoid re-implementing
such string-buffer handling code
Change-Id: I61e39dada6f46478b9d289f0310bb6846eb9868b
Reviewed-on: https://gerrit.libreoffice.org/62646
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
For uno commands
Change-Id: Ide7a30387b0ec354cd0d42ba11c78e115ec94989
Reviewed-on: https://gerrit.libreoffice.org/62693
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie968bedac6abb8f76705e30eaaebb74fed949883
Reviewed-on: https://gerrit.libreoffice.org/62655
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: I444c43b9d549977039f25bec2b5bf666c3e15e0e
Reviewed-on: https://gerrit.libreoffice.org/62041
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
which seem to have snuck back in since the great rounds of removals.
Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1
Reviewed-on: https://gerrit.libreoffice.org/62229
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I1ae16467a8e58e8a50f59b7a140e9f8b68bde07e
Reviewed-on: https://gerrit.libreoffice.org/62254
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Searching for something like (foo)|(bar) and replacing with $1$2 would fail
assertion in appendCopy in include/rtl/ustrbuf.hxx, because beginIndex is
negative (-1), because one of the references is always empty (SearchResult
at TextSearch::ReplaceBackReferences() has both startOffset and startOffset
equal to -1).
In this case, we should simply return an empty string.
Change-Id: Ibf91b1d17ab21c279cfcdc31e84d0c2eae567a53
Reviewed-on: https://gerrit.libreoffice.org/62248
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
looks for variables that can be declared const and static i.e. they can
be stored in the read-only linker segment and shared between different
processes
Change-Id: I8ddc6e5fa0f6b10d80c75d5952df8ddd311cf892
Reviewed-on: https://gerrit.libreoffice.org/61591
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422
Reviewed-on: https://gerrit.libreoffice.org/61967
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia25ac2e40f29e5b766a4c5c013fb53274196f656
Reviewed-on: https://gerrit.libreoffice.org/61934
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: I9dc920e9388f9e2aa4dcae1f0b3f7562d08f7f70
Reviewed-on: https://gerrit.libreoffice.org/61809
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: I708b0b486a233071f95592ccdb97f27fc35a23c4
Reviewed-on: https://gerrit.libreoffice.org/61783
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Use range-based loop or replace with STL functions.
Change-Id: I5a43f6fc62c81453dcef3820bb715f4da76915af
Reviewed-on: https://gerrit.libreoffice.org/61762
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and simplify callsites to use it instead of the current
"seek to end, find pos, seek back to original pos"
pattern
Change-Id: Ib5828868f73c341891efc759af8bd4695ae2f33c
Reviewed-on: https://gerrit.libreoffice.org/61738
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
To prevent further confusion which is which, dbaccess
UserInformation already got that wrong since ever.
/org.openoffice.Setup/L10N/ooLocale is the UI locale.
/org.openoffice.Setup/L10N/ooSetupSystemLocale is the work locale.
Confusingly due to legacy when the setup program was a separate
binary that picked the UI ooLocale and later set up the default
(system) work locale as well.
Change-Id: I9a05ad39f5fb65c54076ff5789ba7a2cc06ad23a
Reviewed-on: https://gerrit.libreoffice.org/61725
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
That folder typically is not inside the app sandbox, and the process
has access only to the one file that they have selected for editing
there. Trying to create other files in that folder is doomed to fail.
Change-Id: Ib4ff5c7c60aa372eb412e87dc8bbce48ec6d6b54
|
|
...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: Id3d41099a895ca5423be2ac3d497851bc65eaff7
Reviewed-on: https://gerrit.libreoffice.org/61426
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
The ctor was added with d1e47b1428abf1732ab4d5e219b210760d4152e0 "enhance
useuniqueptr loplugin" apparently because it was needed and the implicitly
declared one stareted to be defined as deleted, while the assignment op was
left implicitly defined as deleted (presumably because it wasn't needed anyway).
Adding a non-deleted definition of the assignment op probably is a good move
towards consistency, and was assumed it could help avoid new Clang trunk
-Werror,-Wdefaulted-function-deleted in derived ConfigItem
(include/unotools/configitem.hxx), but which appears not to be the case.
And ConfigurationBroadcaster can't easily switch from copy to move semantics, as
SdOptionsLayoutItem::Clone needs SdOptionsLayoutItem copy ctor needs
SdOptionsLayout copy ctor needs SdOptionsGeneric copy ctor needs
SdOptionsItem copy ctor needs utl::ConfigItem copy ctor needs
utl::ConfigurationBroadcaster copy ctor.
Change-Id: Ie1f4e72eacb9b6b776103c4cf04a959acfa6648f
Reviewed-on: https://gerrit.libreoffice.org/61208
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I9d9cfd107bea9556cbc505e977838fb13bd25e2a
Reviewed-on: https://gerrit.libreoffice.org/60573
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
look for collection-like fields that are never added to, and are
therefore effectively unused
Change-Id: Id52c5500ea5e3d2436fb5915aebb86278bf2d925
Reviewed-on: https://gerrit.libreoffice.org/60661
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>
|
|
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: Id435bb3289dcfd9a7aeca6a661e249085958cb7c
Reviewed-on: https://gerrit.libreoffice.org/60392
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Idd435b3a4d081f6d3af26ff8add69ad4af50db57
warning: calling a base constructor other than the copy constructor
Reviewed-on: https://gerrit.libreoffice.org/60239
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This reverts commit 3d604d1cd6cc70ef96782ef769f0479b509987a8.
comments from sberg:
I assume dropping the std::move from aCurSel(std::move(aSel)) is caused
by performance-move-const-arg's warning "if std::move() is called with
an argument of a trivially-copyable type"
(<https://clang.llvm.org/extra/clang-tidy/checks/performance-move-const-arg.html>).
For my taste, that approach is too tightly tied to a class's current
implementation details, something that may change over time. Imagine a
trivially copyable class C with a raw pointer member (where the
lifecycle of the pointed-to object is tracked by some higher-level,
likely broken protocol). Now, that protocol is fixed and the raw
pointer member is replaced with a std::shared_ptr. C is no longer
trivially copyable, and the dropped std::move would turn out to be
beneficial again.
(Also, if Clang and clang-tidy did implement the fixed rules for
trivially copyable classes from CWG1734/C++17, where a subset of a
trivially copyable class's copy/move members may be deleted, the above
rule to warn "if std::move() is called with an argument of a
trivially-copyable type" would no longer make sense as written; consider
a trivially copyable class whose copy ctor has been deleted.)
Change-Id: Icb91610e50ed98b8f55fe6323bdfa48c8cb9b4b9
Reviewed-on: https://gerrit.libreoffice.org/60166
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I607891e120688b746c8a4c577018d97147a79217
Reviewed-on: https://gerrit.libreoffice.org/60029
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iebcaea7b08c5284946d83b6b6b9ed26b218025d4
Reviewed-on: https://gerrit.libreoffice.org/59992
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Found with bin/find-unneeded-includes a few low hanging
boost/optional headers.
This gets us about 75M includebloat reduction; still much to go
Change-Id: I5c737631767970f9145609aad298a5d11e3fed65
Reviewed-on: https://gerrit.libreoffice.org/59840
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: Ifc47bb8e096c9a8563021b2fcb44199577740746
Reviewed-on: https://gerrit.libreoffice.org/59747
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
so we can avoid temporary copies when appending a substring of an
OUString to the buffer. I would have preferred to call the method just
"append" but that results in ambiguous method errors when the callsite
is something like
sal_Int32 n;
OUStringBuffer s;
s.append(n, 10);
I'm not sure why
Change-Id: I6b5b6641fcb5b26ce2269f89ef06e03c0b6aa76f
Reviewed-on: https://gerrit.libreoffice.org/58666
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ib82daad19185de3d271adee3cdb6d39a35e9c082
Reviewed-on: https://gerrit.libreoffice.org/58941
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
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 from test to vbahelper
Change-Id: Ia7f773511624099505d6a36a8d6e23c0cde4a737
Reviewed-on: https://gerrit.libreoffice.org/58225
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: I50545784c5412ab7767f401c6e40058a1d0bfab0
Reviewed-on: https://gerrit.libreoffice.org/58262
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
look for OUString being appended to in a loop, better to use
OUStringBuffer to accumulate the results.
Change-Id: Ia36e06e2781a7c546ce9cbad62727aa4c5f10c4b
Reviewed-on: https://gerrit.libreoffice.org/58092
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...by explicitly defaulting the copy/move functions (and, where needed in turn,
also a default ctor) for classes that have a user-declared dtor that does
nothing other than an implicitly-defined one would do, but needs to be user-
declared because it is virtual and potentially serves as a key function to
emit the vtable, or is non-public, etc.; and by removing explicitly user-
provided functions that do the same as their implicitly-defined counterparts,
but may prevent implicitly declared copy functions from being defined as non-
deleted in the future. (Even if such a user-provided function was declared
non-inline in an include file, the apparently-used implicitly-defined copy
functions are already include, so why bother with non-inline functions.)
Change-Id: Iaa08ef916a2d266e011a2cb66592b377cb1eb23c
Reviewed-on: https://gerrit.libreoffice.org/58095
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Iabc3c67b4cdcd0344a37c533bf92dd00cd4700d8
Reviewed-on: https://gerrit.libreoffice.org/57974
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@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>
|
|
and give utl::OStreamWrapper a new constructor so that it knows it is
taking ownership of the SvStream, which appears to fix several leaks
Change-Id: Idcbcca9b81a4f0345fd8b8c8a2f4e84213686a6b
Reviewed-on: https://gerrit.libreoffice.org/57187
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id295dc0db174a448ef73db9de34f2de07d47f09a
Reviewed-on: https://gerrit.libreoffice.org/57108
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I1b966b636f67a549718ca19c00c2820e8d168c7a
Reviewed-on: https://gerrit.libreoffice.org/56589
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
This allows using all the libnumbertext library functions.
[NatNum12] gives cardinal number names (one, two, three, ...)
[NatNum12 ordinal] gives ordinal number names (first, second, third, ...)
[NatNum12 ordinal-number] gives ordinal indicators (1st, 2nd, 3rd, ...)
[NatNum12 money USD][$-409] gives formal English (US) money text
... etc (see numbertext.org for syntax).
Change-Id: I16dbb44d8d4bdb82a1b950de6d438c8311b554ff
Reviewed-on: https://gerrit.libreoffice.org/54366
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
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>
|