Age | Commit message (Collapse) | Author |
|
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1423r3.html> "char8_t
backward compatibility remediation", as implemented now by <https://gcc.gnu.org/
git/?p=gcc.git;a=commit;h=0c5b35933e5b150df0ab487efb2f11ef5685f713> "libstdc++:
P1423R3 char8_t remediation (2/4)" for -std=c++2a, deletes operator << overloads
that would print an integer rather than a (presumably expected) character.
But in these cases printing an integer is as expected, so add explicit casts.
Change-Id: I7c2f1afaa2982b284aef8af183b71466c37142c2
Reviewed-on: https://gerrit.libreoffice.org/84339
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit e8cb5f2e11838060f85e7940540b5f7096d9eeb7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87745
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
When I did the fast string concatenation, I didn't add any support
for number(), which simply returned a O(U)String, and so it did
the extra allocation/deallocation, although that could be avoided.
In order to support this, number() now returns a special temporary
return type, similarly to O(U)StringConcat, which allows delaying
the concatenation the same way.
Also similarly, the change of the return type in some cases requires
explicit cast to the actual string type. Usage of OString::getStr()
is so extensive in the codebase that I actually added it to the helper
class, after that it's only relatively few cases.
Change-Id: Iba6e158010e1e458089698c426803052b6f46031
Reviewed-on: https://gerrit.libreoffice.org/78873
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
but we needed to make moveAnyInternals noexcept, which is fine because
uno_any_construct is already noexcept
Change-Id: Iddbe7666d8649cde4e638099a17484193055f549
Reviewed-on: https://gerrit.libreoffice.org/78283
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
idea from mike kaganski
look for places where we can mark move operators as noexcept, which
makes some STL operations more efficient
Change-Id: Id732b89d1fcadd5ceb0ea2b9d159fed06136330f
Reviewed-on: https://gerrit.libreoffice.org/78251
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id0889a1b51449f3812ba875919595a241f4ec56f
Reviewed-on: https://gerrit.libreoffice.org/78139
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
... as second and following arguments.
Change-Id: I1c994ec234354805bc702632878fd67a54d271d6
Reviewed-on: https://gerrit.libreoffice.org/78092
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I227a88c566f981ace5e45d0e217a50abbc7f3023
Reviewed-on: https://gerrit.libreoffice.org/78072
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I4508cc601ac3351f54b0223b15a4705d8f339d7e
Reviewed-on: https://gerrit.libreoffice.org/74904
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I1b43e186bd6e9de7332513e60f3be1bbe9d8ff82
Reviewed-on: https://gerrit.libreoffice.org/74901
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I576da0e09f4a70361c0c5226ce80418680711f55
Reviewed-on: https://gerrit.libreoffice.org/74902
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I99dba9443d703d56f0cbe38cb32c7d6963a669cf
Reviewed-on: https://gerrit.libreoffice.org/74903
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I8477be28693f55bea857531707286437ea13d034
Reviewed-on: https://gerrit.libreoffice.org/73296
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
By creating deleted methods for the wrong calls.
Avoids the compiler needing to construct a temporary
Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a
Reviewed-on: https://gerrit.libreoffice.org/72103
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The declaration in BarChart.cxx is particularly suspicious, because it
was using a < for the KeyEqual template parameter.
Been there since:
commit b2c3233e5f267b5d244d722a94424a3b224b3314
Date: Thu Dec 21 20:08:33 2017 +0900
chart2: suspend/resume setting rects dirty for 3D shapes
comphelper::OInterfaceCompare is no longer necessary
Change-Id: I8278c4a3d9113a18570ca237cd05d553ec8f3975
Reviewed-on: https://gerrit.libreoffice.org/71537
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I924f5d8505f2c2132c79304e19cf89a8ef466ae4
Reviewed-on: https://gerrit.libreoffice.org/67771
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
|
|
like the other smart pointer types
Change-Id: I3ac1888c84fc1411cdfc3357b005afbb3b7d8bbe
Reviewed-on: https://gerrit.libreoffice.org/65926
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7c34dfb5a83b14afc740772cffe407d4773b07e5
Reviewed-on: https://gerrit.libreoffice.org/64818
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...which required some lax placements of SAL_WARN_UNUSED_RESULT to be fixed.
Also, Clang unfortunately is rather picky about the relative order of
SAL_WARN_UNUSED_RESULT expanding to [[nodiscard]] and uses of the DLLPUBLIC
macros (expanding to __attribute__(...) resp. __declspec(..) for clang-cl).
Change-Id: Iae6ca36bef97f1864873aefdb5f05c7f5e045ad3
Reviewed-on: https://gerrit.libreoffice.org/60274
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I728a40ab6ef4aa44fbe328abdf244e6b5fac9d04
|
|
Alongside Anys and other UNO data types, you can now also stream
out Sequences, e.g. in SAL_INFO or SAL_DEBUG statements.
Example code:
uno::Sequence<sal_Int8> aBuffer...
SAL_DEBUG("my buffer: " << aBuffer);
Would yield:
debug:<pid>: my buffer: 0xb6, 0x61, 0xa8, ...
Change-Id: I03b0789372c44a4dd057625824862f43b1b8dfdc
Reviewed-on: https://gerrit.libreoffice.org/47779
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
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: I8531b2dc474b257c63016c8ae80014c7322e5a71
|
|
...which had been like that ever since the code got introduced with
0fbe22a77289a624e1346ab457734c2f64f8e6fb "css::uno::Any move semantics (for
LIBO_INTERNAL_ONLY)"
Change-Id: Iacd93a4434a92f2ee8f83ba1d59b0ef0a6c38a42
|
|
...in code accidentally using auto like
> auto const aURL = uri->getUriReference() + "/"
> + INetURLObject::encode(
> m_sEmbeddedName, INetURLObject::PART_FPATH,
> INetURLObject::EncodeMechanism::All);
>
> uno::Reference<uno::XInterface> xDataSource(xDatabaseContext->getByName(aURL), uno::UNO_QUERY);
in <https://gerrit.libreoffice.org/#/c/44569/1> "Properly construct
vnd.sun.star.pkg URL" did (causing hard to debug test failures there).
So make functions taking O[U]StringConcat take those by rvalue reference.
Unfortunately, that also needed adaption of various functions that just forward
their arguments. And some code in sc/qa/unit/ucalc_formula.cxx used
CPPUNIT_ASSERT_EQUAL on OUStringConcat arguments in cases where that happened to
actually compile (because the structure of the two OUStringConcats was
identical), which needed adaption too (but which would arguably better use
CPPUNIT_ASSERT_EQUAL_MESSAGE, anyway).
Change-Id: I8994d932aaedb2a491c7c81c167e93379d4fb6e3
Reviewed-on: https://gerrit.libreoffice.org/44608
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change these back to consistently use the "..." form to include other UNO API
include files, for the benefit of external users of this API.
Change-Id: I9c9188e895eb3495e20a71ad44abfa2f6061fa94
|
|
Change-Id: I70d7e50f8c1e019524ccad915f0cca912c5035dc
Reviewed-on: https://gerrit.libreoffice.org/39899
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
to markup dtors that coverity warns might throw exceptions
which won't throw in practice, or where std::terminate is
an acceptable response if they do
Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4
Reviewed-on: https://gerrit.libreoffice.org/38318
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0
Reviewed-on: https://gerrit.libreoffice.org/37910
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This reverts commit 26a67002fcb9381b54de6cae1aaa37120d49066a. "Iff" is not a
typo, see 2a65bf32ec270484dcea4d22d3c93552dc0c24dd "Revert 'Typo: iff->if'".
|
|
Only replaced "iff" with "if"
Change-Id: Ib9dfa5c12b05500043147fe3b65f923b1b12a581
Reviewed-on: https://gerrit.libreoffice.org/37782
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
...as will be needed by some upcoming replacements of CPPUNIT_ASSERT with
CPPUNIT_ASSERT_EQUAL
Change-Id: Ie2b2b982b02f2bf48e2e8be7ba642198029c8698
|
|
...from function definitions occurring within class definitions. Done with
a rewriting Clang plugin (to be pushed later).
Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I91cfbe2646dcc55b98d2b809c49c9ea073f54f58
Reviewed-on: https://gerrit.libreoffice.org/33517
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
i.e., css::uno::Any function template specializations
Any::has<Any>() const
Any::get(Any const &) const
operator >>=(Any const &, Any &)
operator <<=(Any &, Any const &)
that don't make much sense (the first is always true, the rest can be replaced
with operator =, which additionally supports move semantics). For 3rd-party
compatibility, do this only for LIBO_INTERNAL_ONLY, however.
However, some generic template code did benefit from operator >>= working also
for Any, so make up for that with a new (LIBO_INTERNAL_ONLY, given that
operator >>= still covers if fine for !LIBO_INTERNAL_ONLY) fromAny,
complementing the existing toAny.
Change-Id: I8b1b5f803f0b909808159916366d53c948206a88
Reviewed-on: https://gerrit.libreoffice.org/30022
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
|
|
and fix a couple of usages that have crept in
Change-Id: Ia3e7fcc05dac6e0d205e69c0e0372c74653e7c5e
Reviewed-on: https://gerrit.libreoffice.org/26851
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: Ib582a744321e0f209395651ac2edffe30152ffba
|
|
These aren't used any more, and the C++11 std equivalents don't use
get_pointer() overloads.
Change-Id: Ib97a6a595863e21a1621c63709ea2b28f6550fde
Reviewed-on: https://gerrit.libreoffice.org/24982
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
|
|
Change-Id: I8437ec66b615754d71c726f715a6beeb4a0f7dda
|
|
Change-Id: Iaf6d668f65e31c60dba8140d789f6578ef461264
|
|
(at least for LIBO_INTERNAL_ONLY), to help further reduce the occurrences of
sal_Bool across the code base
Change-Id: I70654a0cb56655984c717b7b894f26c9ab47536e
|
|
...where sal_uInt16 no longer clashes with sal_Unicode after
e16fa715c43dcdf836ce8c400b6d54eae87b627d "Handle wchar_t as native C++11 type on
windows". This allows to consistently use Any ctor instead of makeAny,
regardless of argument type, in LIBO_INTERNAL_ONLY code.
Change-Id: I9acdcc48be71a90d17013959c8275454e8fa01a0
Reviewed-on: https://gerrit.libreoffice.org/24620
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Let the templated makeAny(v) just call Any(v), so that any special handling of
argument types needs to be only done for the Any ctor, not also for makeAny
(both the original makeAny implementation and the Any ctor implementation
internally use cppu::getTypeFavourUnsigned to determine the UNO type, so this
does not cause any difference in behavior):
* The specialization of makeAny for bool can be dropped.
* The overload of makeAny for OUStringConcat is replaced with an overloaded Any
ctor, so that
Any(s + "foo")
works now, too.
Curiously, only the Any ctor had been deleted for a sal_uInt16 argument (which
can conflict with sal_Unicode), but not makeAny. So introduce a specialization
of makeAny for sal_uInt16, so that that continues to work. (For backwards
compatiblity in the non-LIBO_INTERNAL_ONLY case; and in the LIBO_INIERNAL_ONLY
case we're moving away from the sal_uInt16/sal_Unicode clash anyway thanks to
C++11 char16_t, so it is arguably better to allow makeAny for sal_uIn16 than to
prohibit it.)
Change-Id: I7803703769730024863bb4e5b1b3416b81bd8960
|
|
...which only happens ot work in environments where sizeof (bool) == 1. The
simpler alternative is to use the operator <<= template without passing explicit
UNO type information, anyway.
The std::nullptr_t overloads are needed to disambiguate calls with a nullptr
argument. (Which can at least be meaningful for VOID, but for other types what
it happens to do is store a default value of the given type.) As std::nullptr_t
is only C++11, this all needs to be LIBO_INTERNAL_ONLY.
Change-Id: Iff06a6ba94250bd4ae4afc937c2a2bfa75f0888f
|
|
...which only happens to work in environments where sizeof (bool) == 1. The
simpler alternative is to use the Any ctor template without passing explicit UNO
type information, anyway.
The std::nullptr_t overloads are needed to disambiguate calls with a nullptr
argument. (Which can at least be meaningful for VOID, but for other types what
it happens to do is store a default value of the given type.) As std::nullptr_t
is only C++11, this all needs to be LIBO_INTERNAL_ONLY.
Change-Id: I0f72c73a088ef96e069c3ed8c78546b16d89b50a
|
|
Change-Id: I13683f971bf56f6c5e226d749e60ccb25af559a5
|
|
Change-Id: I8a886f752d2a16ec4c10656bcd0b3631647971b2
|
|
A ridiculously fast way of doing this is:
for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
--exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
perl -0777 -i -pe 's/^
{3,}/
/gm' $i
done
Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
Change-Id: I9bc06cfb5eeb38fd7ae7fb25f876ea9f96e4a65a
|
|
"perf stat" says:
Before 14,009,233,975,201 cycles
After 13,660,876,595,941 cycles
i.e. shaved roughly 2% of the cycles
Change-Id: If604a125a8a5040281abd699678d0c791d5bbb51
Reviewed-on: https://gerrit.libreoffice.org/20350
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: I22bf0f7024538ea7a6c2c328a6647d3aeb478141
Reviewed-on: https://gerrit.libreoffice.org/20000
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Id2359f6ff4bddb2afbc0b346e17cd858f00179e3
|