Age | Commit message (Collapse) | Author |
|
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>
|
|
When calc_tests runs test_tdf53482_Range_contains_column_headings_file()
with Calc's threading enabled, it ends up calling ScInterpreter::ScProper()
from threads, which calls to CharClass. And while CharClass tries to be
thread-safe (guessing from the mutex usage), it forwards calls to i18npool's
CharacterClassificationImpl and cclass_Unicode, both of which aren't
thread-safe. Which makes thread safety of CharClass itself pointless.
Since CharClass already acquires the mutex anyway because of getMyLocale(),
just extend the duration for the entire call, which hopefully shouldn't
make that much of a difference.
Change-Id: I544b34d7e58c4a901f3b6e3a3ff52156b9e320a8
Reviewed-on: https://gerrit.libreoffice.org/54999
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I64df1f467986b3d70c058adff289a6dd8f00fb20
Reviewed-on: https://gerrit.libreoffice.org/54821
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
With this change, Database fields that expand to empty values behave
as if they are "Hidden Paragraph" fields.
A compatibility option to enable this behaviour is added. The option is
enabled by default, and for any non-native documents (for compatibility
with other office suites). For existing (F)ODT documents, the option is
disabled for those documents that don't have this setting set, to keep
the layout of legacy documents.
Change-Id: Ic5e8cb15a3a7d1a765a984eef4b0d97666df7dfd
Reviewed-on: https://gerrit.libreoffice.org/54552
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Icc8c073040bbbb0c481bb6de8c605f72b51b1f37
|
|
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>
|
|
With a newer C++ debug runtime (in an --enable-dbgutil build), passing
an invalid locale name causes an attempt to display an error
dialog. Which does not even show up, at least for me, but instead the
process (gengal, at least) just hangs. Which is far from ideal.
Passing a POSIX-style locale name to the std::locale constructor on
Windows is a bit odd, but apparently in the normal C++ runtime it
"just" causes an exception to be thrown, that boost catches (see the
loadable(std::string name) in boost's libs\locale\src\std\std_backend.cpp),
and then instead uses the Windows style locale name it knows how to
construct. (Why it even tries the POSIX style name on Windows I can't
understand.)
Actually it isn't just the locale name part "en_US" of a locale like
"en_US.UTF-8" that is problematic, but also the encoding part,
"UTF-8". The Microsoft C/C++ library does not support UTF-8
locales. The error message that our own report hook catches says:
"f:\dd\vctools\crt\crtw32\stdcpp\xmbtowc.c(89) : Assertion failed:
ploc->_Mbcurmax == 1 || ploc->_Mbcurmax == 2". Clearly in a UTF-8
locale (perhaps one that boost internally constructs?) the maximum
bytes per character will be more than 2.
With a debug C++ runtime, we need to avoid the error dialog, and just
ignore the error. So we install an own CRT error report hook that
ignores the error for the duration of the locale construcion.
Change-Id: Ia2ca994f03d1ce94ce7e9d7607f204c320ab8f2d
Reviewed-on: https://gerrit.libreoffice.org/54110
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
in page number, chapter and outline numbering
in ~30 languages by integrating libnumbertext library.
- offapi: add linguistic2::NumberText
New NumberingType constants:
- ordinal indicators (1st, 2nd, 3rd...)
- cardinal number names (One, Two, Three...)
- ordinal number names (First, Second, Third...)
Note: these numberings are parts of OOXML, too.
Plain text files of Libnumbertext's language data
are installed in share/numbertext (similar to
share/fingerprint), allowing further customization.
Change-Id: I4034da0a40a8c926f14a3f591749a89a8d807d5a
Reviewed-on: https://gerrit.libreoffice.org/53313
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
Change-Id: Id66f8ff62ed08724702572f457b9fc857d567e89
Reviewed-on: https://gerrit.libreoffice.org/53465
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
This reverts commit eeefb8c440b514cefdc4e82cc06843da9eabeb13.
this was pushed in error
|
|
Change-Id: I408f9193680ea73c61fcfb2bd1e860152219702c
|
|
collection of heuristics to look for local variables that are never read
from i.e. do not contribute to the surrounding logic
This is an expensive plugin, since it walks up the parent tree,
so it is off by default.
Change-Id: Ib8ba292241bd16adf299e8bba4502cb473513a06
Reviewed-on: https://gerrit.libreoffice.org/52450
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
so we get nice logs of the exception dynamic type for UNO exceptions.
Change-Id: Ic0b10dc14d354a2c9a0591b3a51d2f1640d54bdb
Reviewed-on: https://gerrit.libreoffice.org/52465
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and update sallogareas plugin to enforce this
Change-Id: Id0782c8a1f619372e10d931aec3c6a4743a4c86a
Reviewed-on: https://gerrit.libreoffice.org/52249
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I74dd0142562cb8698f19b2715fa1d514f82bd749
Reviewed-on: https://gerrit.libreoffice.org/52262
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
|
|
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>
|
|
...that had been added with f0215dcc9e5ba47d4b7d5b9759f1bd774942d388 "unotools:
assert if TempFile::GetURL() fails due to missing file UCP". But when SRCDIR is
a read-only tree, JunitTest_sc_unoapi_2 fails with that assert firing when
TempFile::GetURL is called from SfxMedium::CreateTempFile
(sfx2/source/doc/docfile.cxx), which in turn is prepared to handle an empty
return value from GetURL, and the test succeeds after removing the assert. So
it looks like that assert was not precise enough to only fire in the scenarios
where it was intended to fire.
Change-Id: I333e9026ee14e9d1140b1b475793a5b15ededd70
Reviewed-on: https://gerrit.libreoffice.org/52085
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Sentence case added at position #2 in the sequence
Change-Id: I99b5afb44260b1a40c7ceb906f729e339aaefd13
Reviewed-on: https://gerrit.libreoffice.org/51696
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
|
|
and a few vclunohelper includes
Change-Id: I4803605766d155fe5044c2a65c0444631146831c
Reviewed-on: https://gerrit.libreoffice.org/51496
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
- give priority to IPA P Gothic and Noto Sans CJK JP
- for Windows, try Yu Gothic UI first, then Meiryo UI
- look for Hiragino Kaku Gothic ProN/Pro on macOS
Thanks to Jun Nogata and AWASHIRO Ikuya for their suggestions.
This addresses only part of the issue; another incoming change
will take care of the rest.
Change-Id: I1491ba63e1447d3b9086dfcfdf3981bee6282661
Reviewed-on: https://gerrit.libreoffice.org/50515
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
|
|
Change-Id: I6e72fbe44dcb65ee5162448e9a72e6437d56b044
Reviewed-on: https://gerrit.libreoffice.org/50948
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I005023337dbe593e0ac1d76f7b10848d24f314a5
Reviewed-on: https://gerrit.libreoffice.org/50785
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
Change-Id: Ic1ad524d533d3e27d59dacc3f1233de3e4e3e0dc
|
|
Change-Id: Ic8490fcea37221f580734e7764e90bb21c9cc28f
|
|
Change-Id: I24c7e32b3dc63f3b5043e186f6af0ffa4d310198
|
|
Change-Id: Ie5ca8882c8e4c41a8ee41379edc37c4c07e18033
Reviewed-on: https://gerrit.libreoffice.org/50581
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|