Commit Graph
3812 Commits
Author SHA1 Message Date
Andrea Gelmini 0f1ca9e3c5 Fix typos
Change-Id: Ifed6fa039466e580d911af91288c4a37bce08aae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132560
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2022-04-05 21:46:05 +02:00
Tomaž Vajngerl cf4d5ed026 add tools::Guid class to generate, parse GUID values
Change-Id: Ie4d8fad4d8f22c8277c22c21b7a9eb3e7c9e4f1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132513
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-05 01:57:21 +02:00
Gabor Kelemen 52ef78f492 Recheck modules t* with IWYU
See tdf#42949 for motivation

Change-Id: I109fa07d52721fd10354de07a2ed995ffa2f27c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132369
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-04-02 23:32:08 +02:00
Mike Kaganski 50add7c97e tdf#148253: fix matching algorithm
Using 'flag' as a "continue the loop" marker allowed to continue
processing wildcard after its last character - not crashing because
it was a subview of a larger string with separators, but failing
the match.

Change-Id: I308058b68c59d5719f3c8b5f5656998a95a9ba09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132336
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-31 17:01:05 +02:00
Rene Engelhard 90babff284 add system-libfixmath
Change-Id: Ia0bd884d6fefde77c75889bf2ea831ebf1b401cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131876
Tested-by: Jenkins
Tested-by: René Engelhard <rene@debian.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: René Engelhard <rene@debian.org>
2022-03-20 22:26:29 +01:00
Caolán McNamara 59a7c40255 reduce down to the part and config we are using and move to tools
Change-Id: Ifaddc59c3c7834808d368c138a5ec7c0b80db14c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131850
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-19 22:56:05 +01:00
Caolán McNamara 841788923c ofz#45527 detect too many points earlier
Change-Id: I7716ca8b9de9312bcaabf1d16e60dbac7ae87e52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131492
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-13 14:51:53 +01:00
Caolán McNamara f7151c8ab4 pass reference to the target vector instead
no logic change intended here

Change-Id: I680914a6a41cceab41f68456e98de5f3b4a8a639
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131491
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-13 14:51:40 +01:00
Noel Grandin 3d48db236e no need to temporary OUString here
Change-Id: Iffd95fcf4fd1f9aac0ba77effc3c63eedce69adf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131412
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-12 11:16:40 +01:00
Noel Grandin a378ac93e1 tdf#147921 Filesave DOC: wrong layout and then all missing from 7.3
regression from
    commit 990b2cb056
    Author: Noel Grandin <noel@peralex.com>
    Date:   Mon Jun 21 13:00:07 2021 +0200
    simplify and improve Wildcard

Cannot pass a string_view into something expecting a char* because
then it gets the length wrong.

Change-Id: I638660a1e9a8a0d17e4d2f77500b3f01365a43d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131396
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-12 08:41:25 +01:00
Bartosz Kosiorek 7b28920382 tdf#113066 tdf#142204 EMF Implement SETARCDIRECTION
Change-Id: I30206c68ecf1829ba0094e6259b8ed7dc05f2e9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131103
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2022-03-10 21:19:59 +01:00
Caolán McNamara 08bbd27e1c ofz: Use-of-uninitialized-value
Change-Id: I41554dec3819efcd8e28f82bb732141c85414e9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131074
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-06 15:23:19 +01:00
Caolán McNamara 80d99a387f ofz: Use-of-uninitialized-value
Change-Id: If75e11dc26aae51d658dddd464135dd8a4f965ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131054
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-05 14:51:31 +01:00
Caolán McNamara a0b6883f06 cid#1500555 try +taint_sanitize instead of -taint_source
Change-Id: I2a0f9ef243c3f17717afed8809b1e3fbc033c6f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130706
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-28 16:25:13 +01:00
Caolán McNamara 50fa3055ad cid#1500555 try -taint_source function annotation tag on function body
Change-Id: Iecc87e118e5c5a85ae40e1ae79348883ea328d8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130482
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-24 13:06:40 +01:00
Caolán McNamara d4ec94c90a cid#1500555 try -taint_source function annotation tag
Change-Id: I237a22968024814d578d387e99ae96b748382e00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130433
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-23 14:56:32 +01:00
Caolán McNamara 587f3f98e1 cid#1500555 silence Untrusted loop bound
and others, we're not bothered that the contents of the string might
have been constructed using byte swapping

Change-Id: I0d0c2e0667bf270e2c15624c59312f3f203bb83c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130246
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-21 14:45:32 +01:00
Mike Kaganski 9003593c9e Simplify SvGlobalName::GetHexName
Use a single sprintf instead of ten, and don't use interim OStringBuffer
to convert to OUString in the end.

Change-Id: I5dcbec85d64af3a30b4bb64f12090e5320421013
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129734
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-09 20:41:39 +01:00
Mike Kaganski a3e8bacbdb Flatten SvGlobalName::MakeId
Change-Id: I5b592162d0fad3e57cfe9ad6d4b2252e7f7596d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129709
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-09 15:24:21 +01:00
Mike Kaganski 4e0ba699ab Simplify SvGlobalName
Its data only takes 16 bytes, the same as std::string_view on 64-bit
platforms, which is considered trivial. No need to use cow_wrapper
that would itself take 8 bytes, and have the performance penalty.

Also reuse the conversion to sequence from comphelper.

Change-Id: I3e3177ea759bf22d099aaa5402559196c5934ee0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129679
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-09 06:11:39 +01:00
Caolán McNamara 297f000c49 cid#1497939 Division or modulo by zero
and

cid#1497937 Division or modulo by zero

Change-Id: I24f939e19791d811845a476c68125f40bb78f9c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129400
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-03 15:54:51 +01:00
Szymon Kłos 496fcccfa6 jsonwriter: ensure correct number of bytes is available
In some functions author forgot that addCommaBeforeField()
can add additional two characters.

I didn't change cases where more bytes than needed are requested.

Additional change is that in debug mode there is a marker at the
end of allocated buffer - we check that after every write to
detect overflow. No need to request more space for a marker as
we always allocate "needed size * 2".

Change-Id: I28066797b0ba833e408b0a731abc01b7fd989da3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126535
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129163
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2022-01-31 17:01:33 +01:00
Stephan Bergmann 162017cd9a Improve DBG_UNHANDLED_EXCEPTION output a bit
For example, in de3898aecb "Add missing test
dependency" it would have output

> warn:svx:680849:680849:svx/source/unodraw/unoshape.cxx:1779: DBG_UNHANDLED_EXCEPTION in setPropertyValues exception: com.sun.star.beans.UnknownPropertyException message: "URL at svx/source/unodraw/unoshape.cxx:1600"

rather than

> warn:svx:680849:680849:svx/source/unodraw/unoshape.cxx:1779: DBG_UNHANDLED_EXCEPTION in setPropertyValues exception: com.sun.star.beans.UnknownPropertyException message: URL svx/source/unodraw/unoshape.cxx:1600

making it slightly clearer that what follows "URL" is not the value of that URL
but rather the source location where the exception was thrown.

Change-Id: Ia3abd232fce3d95a8b66ff4ed5bab2fcc248df2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128788
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-01-23 09:50:33 +01:00
Mike Kaganski 6b973753d4 tdf#146754: consider xyz:123 as host:port when parsing URLs smart
... rather than scheme: and path.

Change-Id: I9a48310b585b8fa3e31635f877a91f1560b065f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128457
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-15 10:52:56 +01:00
Noel Grandin 17950f4d20 use less SvStream::Flush()
Flush() turns into a sync() on the device, which is pretty slow.
Most of the time all we actually want to do is to flush the internal
buffers from the SvStream.

So expose the FlushBuffer method and use that where possible.

And also means we don't need the mbDontFlushOnClose flag on SvStream
any more.

Change-Id: Ibe089b88b325f0fdc565200a97ce72cd26b7fcfb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128214
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-10 17:59:45 +01:00
Mike Kaganski 9f4aad493c Introduce OUString::unacquired(const OUStringBuffer&)
... and avoid OUStringBuffer::toString when the temporary is used
for checking current buffer content

Change-Id: I114178f3e74ca3e4a3e517763f9eaab4797b7deb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127478
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-02 09:03:32 +01:00
Noel Grandin 64aa0e462f osl::Mutex->std::mutex in lockFile
Change-Id: I5ebd56741568ecd25677af57e8c91389c69ddaad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127596
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-27 20:21:41 +01:00
Mike Kaganski a23a7eea5c Avoid OUStringBuffer::toString where possible
Change-Id: I99abbe97a48b2077e28d6221fb70036e5e412657
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127479
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-26 20:36:26 +01:00
Mike Kaganski be5f70e2b8 Simplify INetURLObject::parseHostOrNetBiosName a bit more
Change-Id: Ie22e7a142aabd2c0f12c34945ad0858f5bd868a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127451
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-25 18:44:09 +01:00
Mike Kaganski 132d652ad1 Simplify INetURLObject::parseHostOrNetBiosName
Change-Id: I18818e89b2e6f0ef203caa51ba554c281753d3f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127383
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-24 23:09:14 +01:00
Mike Kaganski 8b333c7694 Use rtl functions instead of own surrogate checking/combining
Change-Id: I3eb05d8f5b0761bc3b672d4c855eb469f8cc1a29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127375
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-24 21:42:08 +01:00
Noel Grandin 15bc492281 tdf#146382 cant open file from Explorer-attached remote location
problem spotted by mikekaganski

regression from
    commit 0b46361ef8
    Author: Noel Grandin <noel@peralex.com>
    Date:   Sat Nov 20 08:03:49 2021 +0200
    tdf#133835 speedup calc autofilter (4)

where I changed the behaviour of parseHostOrNetBiosName from overwriting
the destination buffer to appending to it.

Change-Id: I1bd3c7eade035a867c026364f5e114c1e652ca32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127352
Tested-by: Gabor Kelemen <kelemeng@ubuntu.com>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-24 11:27:39 +01:00
Mike Kaganski 1f1ce06a18 Make BOM detection slightly more straightforward
Without taking system endianness and current stream endianness
into account - just read and check single bytes.

Change-Id: I9273d8f403caad7adb5e11cecc04e326919dad1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126595
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-10 14:18:30 +01:00
Urja Rannikko 7fa9b09bc2 tdf#128715 fix tools::Time::GetMonotonicTicks() on 32-bit linux
Since time_t and thus tv_sec is (still, for now) 32-bit on these
architechtures, the multiplication of seconds to microseconds
happened in 32-bit thus causing a rollover roughly every 4295 seconds.
Fix by casting tv_sec to sal_uInt64 before the multiplication.

Also fixes tdf#144975.

Change-Id: I829d3406208545a816979cb58daaeb99ec2d5294
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126379
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-06 11:58:09 +01:00
Andrea Gelmini 0ce6e166a4 Fix typos
Change-Id: I5e41be3f7e650db0019bcd42a3c1c2cb3bc5dd0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126155
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-01 06:03:13 +01:00
Miklos Vajna 8662293d17 tools Color: implement MSO-style luminance modulation/offset filter
To be used when a filtered theme color will be applied on the UI, and
not at PPTX import time.

Change-Id: Ifb56e38e59b529ef436063c407ee156d76a77f9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126011
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2021-11-29 09:51:16 +01:00
Noel Grandin 05766922e7 speed up Fraction::operator*= a little
for my test spreadsheet this reduced the time spent
in Fraction by 30%

Change-Id: Ib14a93284dbd6c6ea2349c1754979135463ca61b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125878
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-26 17:30:10 +01:00
Noel Grandin 0600affd91 tdf#133835 speedup calc autofilter (10)
Remove more temporary buffers in INetURLObject::setAbsURIRef

Change-Id: I3c5430937e3365a15b396504226d3bbdd39c4cc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125668
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-26 09:14:48 +01:00
Andrea Gelmini ec5788d893 Fix typos and translations
Change-Id: Ic358f008e09718b6f726a55edfe3a3f78bba2942
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125728
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2021-11-24 18:08:38 +01:00
Stephan Bergmann a884f0596c Use proper type for OUString length variables
Change-Id: Id116ed42c553bb6524876288ca0066be4a4a1820
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125694
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
2021-11-23 16:07:15 +01:00
Stephan Bergmann 792cd48783 Add test for INetURLObject::changeScheme
Change-Id: I84497ee93e30b639199bbbb958ac1b2c758db50c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125693
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-23 14:16:28 +01:00
Noel Grandin ec1c4c4930 O[U]String::replaceAt overloads that take string_view
which results in lots of nice string_view improvements picked up by the
plugins

Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23 14:00:08 +01:00
Noel Grandin da6ac377c6 avoid OUString temporary in INetURLObject::changeScheme
Change-Id: I8a97c1d89770fe2c0ba0d3f75ce9f3fec0df2e53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125692
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23 13:47:16 +01:00
Michael Stahl 6c9d853edc tools: fix INetURLObject::changeScheme()
(regression from dc2010964f
 which broke JunitTest_ucb_unoapi)

Change-Id: I14a79c3b7d1161234da64822186bcf97d4022264
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125671
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23 07:40:04 +01:00
Noel Grandin 1b327e4a33 tdf#133835 speedup calc autofilter (9)
Remove the temporary buffer in INetURLObject::setAbsURIRef,
and just write directly to the main buffer.

This is a behaviour change since we are "committing" bad data to the
buffer if the URL is incorrect, but since it that case we set the
whole object to be invalid, that should not matter.

Change-Id: Ic8e7d4027bcb927005edd7de4098f4f525412869
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125648
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-22 12:20:18 +01:00
Noel Grandin a70bd820da tdf#133835 speedup calc autofilter (8)
Add move operator to OUStringBuffer to avoid copy

Change-Id: Ifef326449d87aac79f4b1142db7a53faad427580
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125626
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-22 12:19:59 +01:00
Noel Grandin 7805a224b9 tdf#133835 speedup calc autofilter (6)
INetURLObject::SetPort Avoid allocating temporary string on heap,
saves 20%

Change-Id: I61ba4bd80c561266341143e35650b54b9d70f1d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125624
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-22 07:50:59 +01:00
Noel Grandin dc2010964f tdf#133835 speedup calc autofilter (5)
Tweak INetURLObject to reduce the number of
OUString and OUStringBuffer we create,
saves 5%

And add a asView() method to OUStringConstExpr,
to make it easier to pass to OUStringBuffer::insert

Change-Id: I115ec2398cfc8df39bd1efbbd5f0d5cc9712dba7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125600
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-21 15:47:25 +01:00
Noel Grandin 0b46361ef8 tdf#133835 speedup calc autofilter (4)
Tweak INetURLObject::parseHost so it doesn't need its own
OUStringBuffer, and can just use the callers'
Saves 5%

Change-Id: I481fabd4272bc9f172dd751a7019090b95a65e2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125599
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-21 10:26:52 +01:00
Noel Grandin 2aa7aa564f tdf#133835 speedup calc autofilter (3)
Tweak INetURLObject::parsePath to avoid an OUStringBuffer copy,
saves 5%

Change-Id: I49eff3443f34971b8ce15f4c1ab6c9395ee0690f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125565
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-20 08:10:25 +01:00