Age | Commit message (Collapse) | Author |
|
Change-Id: I3b4226a9d089ec9aedab95d96e50a068f57a76c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123991
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia9344c44a71be656a731ab8735dd8e959e520592
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123789
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
Change-Id: I298f762ac7f3298aa9cb9621ad1f8cae50527b24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123790
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
... to avoid hidden cost of multiple COW checks, because they
call getArray() internally.
This obsoletes [loplugin:sequenceloop].
Also rename toNonConstRange to asNonConstRange, to reflect that
the result is a view of the sequence, not an independent object.
TODO: also drop non-const operator[], but introduce operator[]
in SequenceRange.
Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
The scenarios are:
1. Calling sequence's begin() and end() in pairs to pass to algorithms
(both calls use getArray(), which does the COW checks)
2. In addition to #1, calling end() again when checking result of find
algorithms, and/or begin() to calculate result's distance
3. Using non-const sequences in range-based for loops, which internally
do #1
4. Assigning sequence to another sequence variable, and then modifying
one of them
In many cases, the sequences could be made const, or treated as const
for the purposes of the algorithms (using std::as_const, std::cbegin,
and std::cend). Where algorithm modifies the sequence, it was changed
to only call getArray() once. For that, css::uno::toNonConstRange was
introduced, which returns a struct (sublclass of std::pair) with two
iterators [begin, end], that are calculated using one call to begin()
and one call to getLength().
To handle #4, css::uno::Sequence::swap was introduced, that swaps the
internal pointer to uno_Sequence. So when a local Sequence variable
should be assigned to another variable, and the latter will be modified
further, it's now possible to use swap instead, so the two sequences
are kept independent.
The modified places were found by temporarily removing non-const end().
Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
...for LIBO_INTERNAL_ONLY, instead of having them as additional overloads. That
way, loplugin:bufferadd and loplugin:stringviewparam found many further
opportunities for simplification (all addressed here). Some notes:
* There is no longer an implicit conversion from O[U]String to O[U]StringBuffer
(as that goes via user-defined conversions through string_view now), which was
most noticeable in copy initializations like
OStringBuffer buf = someStr;
that had to be changed to direct initialization,
OStringBuffer buf(someStr);
But then again, it wasn't too many places that were affected and I think we can
live with that.
* I made the O[U]StringBuffer ctors taking string_view non-explicit, mainly to
get them in line with their counterparts taking O[U]String.
* I added an OUStringBuffer::lastIndexOf string_view overload that was missing
(relative to OUStringBuffer::indexOf).
* loplugin:stringconstant needed some addition to keep the
compilerplugins/clang/test/stringconstant.cxx checks related to
OStringBuffer::append and OStringBuffer::insert working.
* loplugin:stringviewparam no longer needs the special O[U]StringBuffer-related
code that had been introduced in 1250aecd71fabde4dba990bfceb61bbe8e06b8ea
"loplugin:stringviewparam extend to new.."
Change-Id: Ib1bb8c4632d99b744e742605a9fef6eae959fd72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122904
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Idd014c93e2e85d2ffc7a2535a9c65cffc8a9d403
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123348
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie8c73d187045d9def8f462ab7d37830331eabd4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122470
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
use OUStringLiteral to avoid cost of repeated OUString construction from
ascii literal
Change-Id: I4f8a4714c093e890adaa5524172bdc91231a561a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122379
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic6515a32c2bf2ed7d287c003df154727644598b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122239
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
by removing locking from CharClass, which means we need to make it an
immutable class
Since SharedStringPool in sc/ stores a pointer to the CharClass in
use, we have to tweak SvtSysLocale so that the object does not change
location.
Change-Id: I2c62d354fa542ebc04e755ce5b9b9e2ddff76a64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122185
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
we already have GetCharClass and we never return a nullptr
Change-Id: I3cb79bc60be614c0474ecfdaad17991f2ecb6368
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122208
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
workaround https://github.com/google/oss-fuzz/issues/6427 by
forcing use of the libc++.a in /usr/msan/lib when compiling the
msan version
Change-Id: I4e992cd7710b5929e74034db7a49c590349149fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122014
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ic7988757a5adc76335911f89d5de1e5a64ce7056
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122001
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
which seems to have started since...
https://github.com/google/oss-fuzz/commit/a2be91d3f10c54f20ae651375683ae4605543a63
e.g.
==3509==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0xa990506 in ~basic_string /usr/local/bin/../include/c++/v1/string:2267:9
#1 0xa990506 in ~pair /usr/local/bin/../include/c++/v1/__utility/pair.h:39:29
#2 0xa990506 in std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, boost::shared_ptr<boost::locale::localization_backend> > >::destroy(std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, boost::shared_ptr<boost::locale::localization_backend> >*) /usr/local/bin/../include/c++/v1/__memory/allocator.h:156:15
#3 0xa9899a5 in destroy<std::__1::pair<std::__1::string, boost::shared_ptr<boost::locale::localization_backend> >, void> /usr/local/bin/../include/c++/v1/__memory/allocator_traits.h:309:13
#4 0xa9899a5 in __destruct_at_end /usr/local/bin/../include/c++/v1/vector:450:9
#5 0xa9899a5 in clear /usr/local/bin/../include/c++/v1/vector:374:29
#6 0xa9899a5 in ~__vector_base /usr/local/bin/../include/c++/v1/vector:487:9
#7 0xa9899a5 in ~vector /usr/local/bin/../include/c++/v1/vector:579:5
#8 0xa9899a5 in ~impl workdir/UnpackedTarball/boost/libs/locale/src/shared/localization_backend.cpp:34:45
#9 0xa9899a5 in ~hold_ptr workdir/UnpackedTarball/boost/boost/locale/hold_ptr.hpp:36:13
#10 0xa9899a5 in boost::locale::localization_backend_manager::~localization_backend_manager() workdir/UnpackedTarball/boost/libs/locale/src/shared/localization_backend.cpp:168:9
#11 0x579edc in init workdir/UnpackedTarball/boost/libs/locale/src/shared/localization_backend.cpp:263:17
#12 0x579edc in __cxx_global_var_init workdir/UnpackedTarball/boost/libs/locale/src/shared/localization_backend.cpp:264:15
#13 0x579edc in _GLOBAL__sub_I_localization_backend.cpp workdir/UnpackedTarball/boost/libs/locale/src/shared/localization_backend.cpp
#14 0xbe861ac in __libc_csu_init (/tmp/not-out/psdfuzzer+0xbe861ac)
#15 0x7f1bcadc003f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2703f)
#16 0x57c40d in _start (/tmp/not-out/psdfuzzer+0x57c40d)
Change-Id: I14010df7c009b4c44943b0fd56688ed05569c1b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121999
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I8590d67f064dd74da42c0e3bf543f2aadbd2b893
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121693
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Implement it using comphelper::DirectoryHelper::deleteDirRecursively
Change-Id: I89d4e7c71b7556cb23d43fffa9b1e12df5ef8c3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121452
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I45395f2370474487dc11a0f634c581b30bdc9a61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121427
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I665d7eb66f04fd78b6345f22d5f5724e5778a211
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120653
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I4f01eb3842ef198f02af274f54afb2760c820a4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120655
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Fixes a regression from commit 429e6e6efbfbc65d36452cbf8b3a25740a1dc8bc
("osl::Mutex->std::mutex in OInputStreamHelper"), which results in
failed linking with some older toolchains:
/usr/bin/ld.gold: error: workdir/CxxObject/xmlsecurity/source/helper/UriBindingHelper.o:
requires dynamic R_X86_64_PC32 reloc against '_ZThn40_N3utl18OInputStreamHelper7acquireEv'
which may overflow at runtime; recompile with -fPIC
include/com/sun/star/uno/Reference.hxx:240: error: undefined reference to
'non-virtual thunk to utl::OInputStreamHelper::acquire()'
collect2: error: ld returned 1 exit status
xmlsecurity/Library_xmlsecurity.mk:10: recipe for target
'symbols/instdir/program/libxmlsecurity.so' failed
Known problematic setups are my Ubuntu 18.04 build schroot and
Caolán's Fedora 31 VM to run Coverity.
Change-Id: I40f0734a0cb9131193abf21ba95dc63816b5c1d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120426
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
because this is often on a hot path, and we can avoid the splitting and
joining of strings like this.
Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
as in commit 9376f65a26240441bf9dd6ae1f69886dc9fa60fa
Change-Id: I3ad9afd4d113582a214a4a4bc7eea55e38cd6ff9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119927
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
because this is often on a hot path, and we can avoid the splitting and
joining of strings like this.
Change-Id: I2a24a123a64b762fd0741c45eaca3ad4bdd5580d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119884
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
mostly by doing
$ git grep -l '#define.*\"' -- *.cxx
| xargs perl -pi -e
's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 =
u\2;/g'
Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I59dbb1d5d3aea9b94959d26e544eddfb600e9fa1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119724
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia6aa6541474e0e4c190ab805a931d74c8a598baf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119723
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I778450e986ec93f020ef594fe79bc65673ae78be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119714
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I8f8873edbbc3974c38fe51ea1c65f93c22570891
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119713
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I20baf32570eef64e8288bb82804c2530f2c6a96b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119712
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ib7f44b7bd4b500960f771210177bcfc9476f36be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119711
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id5075424867ae1017df9fa0cd2df802d529e32d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119666
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
in a handful cases, like a map or a vector, we don't need init on demand
at all, the default constructor can be laid out at compile time
Change-Id: I2d404584b5aa23db7b1f779e160e04e72dd2aa74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119656
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
because this is often on a hot path, and we can avoid the splitting and
joining of strings like this.
Create a new small index type TranslateId for some type-safety.
This change only updates accessibility to use the new API, other modules
will follow in stages.
Change-Id: I289245ad34fda775812302ca7ac1588710167b34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119632
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I8977c92897757bc62cdc93de98bfa05a00355f0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119555
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ib1f42d7322d105337554848bc40726be00533843
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119548
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I5cfd3a51bc4026ccb66ee23eb6f49a5dff5fe042
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119525
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
instead of converting back and forth
Change-Id: Iec913494ccad65ebff76bf7b6cf5b2440fbade42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119514
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie3e3b497cfeb8c9e9456fb86a04f409658116e1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119513
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I123efe9921716dda386d78bdbcf22f9299732b9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119505
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I9d91fd5b260b82e05aac6567143386742953ecf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119486
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I5241c21fa097c104f1131db61787191d019a5de4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119485
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I8892b8a51fcecd84ea1fedcd71b6d1a2febabee1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119484
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id54b98d978965e7ce304b83d5eff7d6c844a41d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119474
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I9680c02207ff2d21785a20061b784066ead07a8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119473
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic77555520f2451b12c01423179d3f201daad35b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119472
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I4aeb1224f0d42dadd5a69dd49b8df9ee2f776b04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119471
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie9c164fb9c95989035ef769d0dd539521400e38e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119463
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id7ca2ffa237cb8fda58af60ee5d296f492c5a47e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119462
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I003be64cc46d6e781ab03d83bae0a3114ab6d56e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119460
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|