Commit graph

247 commits

Author SHA1 Message Date
Stephan Bergmann
8075798b22 Fix check for further exotic protocols
...that were added in 59891cd398 "look at
'embedded' protocols for protocols that support them"

Change-Id: I42836d6fd27cd99e39ab07e626053f002a2651f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178047
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-12-07 22:22:23 +01:00
Rosh
71ec40df42 tdf#147021 - Use std::size() instead of SAL_N_ELEMENTS() macro
Change-Id: I2495fa1ad081ad75bd8e79a22bdeaa97217aa398
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177581
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2024-11-30 09:27:12 +01:00
Noel Grandin
08e566f0c9 add a couple of tests for tools::BigInt
because I might touch this area and I want to be sure I don't mess it up

Change-Id: I62c177031f690f4455a58f3280ed26186df94158
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176620
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-15 11:38:18 +01:00
Noel Grandin
5de73f04f3 new loplugin:staticconstexpr
Change-Id: Ida1996dfffa106bf95fd064e8191b8033b4002f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175336
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-04 08:51:00 +01:00
Mike Kaganski
7e5f69aa33 Make tools::Time ctor taking sal_Int64 private
This ctor is meant to set the value of nTime directly; and that value
is not nanoseconds, but an encoded value, using SEC_/MIN_/HOUR_MASK.
But in some places, this ctor was misused for setting of nanoseconds,
which would only accidentally work for values less than one second.
All places that initialized tools::Time with 0, now use EMPTY.

This makes the ctor private; and for the very few cases where really
the encoded value of nTime is stored / restored, fromEncodedTime is
introduced.

Change-Id: I1f1994bd9aab1b51a41b1de637619049fe820da4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175283
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-21 10:30:58 +02:00
Tomaž Vajngerl
02c91f82c2 move UniqueID to tools and rework to increase counter in constructor
In the tools module it can be used in more other modules.

Changed the instantiation to increase the counter already in the
constructor, so no need to check if the ID is 0.

Also test for UniqueID

Change-Id: I77c80461875c69496a7e218534d16d6550c168c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170061
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-07-07 09:41:02 +02:00
Noel Grandin
45f9627659 loplugin:ostr in tools
Change-Id: I0e601100b034eaa99b08c7cbf09e5f817e69b507
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167736
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-05-16 14:49:58 +02:00
Mike Kaganski
ea9904c896 Drop FRound, and use generalized basegfx::fround
Change-Id: I7447e649dc3ef4e51242f69c7486a3e84e103d2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166159
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-17 03:56:59 +02:00
Mike Kaganski
3234c4e35f Avoid MAX_PATH limitation in launcher
... and drop some manual memory management.

Change-Id: I4c60ce559ff185d4685a6b9799a97651438115b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162502
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-25 07:29:40 +01:00
Noel Grandin
4603aa2888 use more string_view in tools::JsonWriter
Change-Id: Ia3ac54a1164b99a806298a47115ea3bc570f3b0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163810
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-23 16:50:33 +01:00
Noel Grandin
8f53681856 return string_view from some XmlWalker methods
elides some OString temporaries

Change-Id: Ic07f18eb3c71637593e64128605c1ebfa8e68474
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163044
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-06 17:08:27 +01:00
Mike Kaganski
7413b4ad50 Simplify JsonWriter a bit
Change-Id: Ifa4278cfd62df4179dd3ae627369c077e31dbd00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161780
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-08 13:05:31 +01:00
Mike Kaganski
c684aa9cf3 Simplify and rename for clarity
Change-Id: Ic97a2b313c6f7d9da540a8867f01362c2fe7b0d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161052
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-20 20:29:51 +01:00
Caolán McNamara
b64f23b235 ofz#65165 Stack-buffer-overflow READ 4 test case
make VALGRIND=memcheck CppunitTest_tools_test

 Conditional jump or move depends on uninitialised value(s)
    at 0x13348ADA: BigInt::DivLong(BigInt const&, BigInt&, BigInt*) const (bigint.cxx:306)
    by 0x13349A0A: BigInt::operator/=(BigInt const&) (bigint.cxx:635)
    by 0x12A58F67: tools::BigIntTest::testLenB1() (test_bigint.cxx:103)
    by 0x12A5C6A8: void std::__invoke_impl<void, void (tools::BigIntTest::*&)(), tools::BigIntTest*&>(std::__invoke_memfun_deref, void (tools::BigIntTest::*&)(), tools::BigIntTest*&) (invoke.h:74)

if ( (static_cast<sal_uInt64>(aTmpB.nNum[nLenB1 - 1]) * nQ) >
                                         ^ nLenB1 is 0
    ((nTmp - static_cast<sal_uInt64>(aTmpB.nNum[nLenB1]) * nQ) << 32) + aTmpA.nNum[j - 2])

Since:

commit bcbc0857bf
Date:   Sun Dec 17 21:11:31 2023 +0300

    Simplify BigInt

Co-authored-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Id8dbff23f7b4312ba666e1443c41b7869713bfbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160953
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-20 05:49:41 +01:00
Mike Kaganski
247c64fa02 Drop incorrect conditional compilation
Since commit 396196d614 (BigInt's
non-big value type is currently sal_Int32, 2020-11-14), fixed-size
sal_Int32 is used in the unit test; so it must not depend on size
of unrelated long type.

Change-Id: Ida276e87b927381d093796f4137774a18acded82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160857
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-16 20:29:05 +01:00
Stephan Bergmann
db9104a366 Extended loplugin:ostr: tools
Change-Id: I70df74d005c7fca14b1bcb70f4870023bd3af4a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159668
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 17:29:09 +01:00
Mike Kaganski
9f1289f1e3 tdf#157820: handle \\?\ prefixes in INetURLObject
They are already handled in osl file URL functions.

Change-Id: Id0c224bdb79963e7ce52abde57bf05b0a6a81ff5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158741
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-01 10:24:21 +01:00
Stephan Bergmann
b4844c310b Repurpose loplugin:stringstatic for O[U]String vars that can be constexpr
...now that warning about O[U]String vars that could be O[U]StringLiteral is no
longer useful

Change-Id: I389e72038171f28482049b41f6224257dd11f452
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157992
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-15 21:15:49 +02:00
Stephan Bergmann
e0c33ec15f loplugin:ostr: automatic rewrite
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
2023-10-07 00:47:20 +02:00
Mike Kaganski
d205274a01 Drop MinMax in favor of std::clamp
Change-Id: I021f524b232ddbe091981444d859d35dd9cd05ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157582
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-05 13:58:12 +02:00
Eike Rathke
c968d89890 Introduce tools::Duration individual time values ctor
Change-Id: I516d3727cbcf6667b32dc963febbf4b753ef6a91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153497
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2023-06-23 18:32:17 +02:00
Eike Rathke
986c2d86a7 Introduce tools::Duration(sal_Int32 nDays, const Time& rTime) ctor
Change-Id: If002e04536149b49b2249103ac914d17dec3fae6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153409
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2023-06-22 01:40:00 +02:00
Eike Rathke
eac63ab120 Related: tdf#153517 Introduce class tools::Duration
Change-Id: I73ea6e162c73382ba470a306ce2852dbff3d1314
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153202
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2023-06-17 15:16:09 +02:00
Noel Grandin
5c1561561a loplugin:unnecessarygetstr extend to more std::string checking
suggested by mike kaganski

Change-Id: I5f5f254142767aca45a6101abdd84a0163ca6a34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150936
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-24 18:04:50 +02:00
Noel Grandin
e57d5daaea fix leaks when using tools::JsonWriter
Specifically in sd/source/core/annotations/Annotation.cxx

We seem to end up fixing leaks here often.
The current tools::JsonWriter API is just very hard to use correctly.

So rather return an OString, which is cheap to copy,
and push that down into the LOK code.

AFAIK that seems to end up requiring less code and less adhoc copying
of data (specifically the queueing code in init.cxx was creating
copies when converting to std::string).

Ideally, we could have some special API to avoid the new strdup()
calls in init.cxx, but not sure how to prevent other people
from accidentally using that.

Change-Id: Ia33437c1bfd9cc2d54dfb99914d1b72db20335f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149963
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-05 17:02:46 +02:00
Stephan Bergmann
96537cd465 Teach INetURLObject about RFC 7230 URLs with no path but query
While RFC 2616 "Hypertext Transfer Protocol -- HTTP/1.1" defined

> http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]

RFC 7230 "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing"
defines

> http-URI = "http:" "//" authority path-abempty [ "?" query ]
>            [ "#" fragment ]

Change-Id: I83b1baa404d28bf3b28b1db812f8930bbc1aaf90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148064
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-01 17:41:27 +00:00
Stephan Bergmann
df5995b0bf Only specialize CppUnit::assetion_traits<T>::toString member functions
...not the whole CppUnit::assetion_traits<T> classes (where applicable).  That
avoids spelling out the (identical) equals member functions, and also leaves
around the less and lessEqual member functions, in case they want to be used
after all.

Change-Id: I18f8d6cff0353921ced4952b33a0c85ff8292923
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147165
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-16 21:16:12 +00:00
Tomaž Vajngerl
eff28a8a17 tools: rearrange Rectangle test, add construction test case
Change-Id: I735600181665100e8540b6f5f14ffebfe6f33371
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146305
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-29 14:23:48 +00:00
Mike Kaganski
e7be4bb5a3 Fix StartWritingUnicodeText
Its comment in include/tools/stream.hxx tells:
  Switch to no endian swapping and write 0xfeff

It was introduced in commit 3c2105e07d
  Author Eike Rathke <er@openoffice.org>
  Date   Fri Dec 22 00:19:05 2000 +0000
    new: read/write Unicode or Bytecode

and included a call to SetEndianSwap( FALSE ). That call was dropped
in commit 8130714148
  Author Noel Grandin <noel@peralex.com>
  Date   Mon Jan 05 08:47:31 2015 +0200
    fdo#84938: replace NUMBERFORMAT_INT_ constants with 'enum class'

(likely by accident).

To simplify the fix, drop redundant m_nEndian: m_isSwap is enough.

Change-Id: Ia9a0fe2d55563e7ba21bd4cf17c4ca999c6feaf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141521
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-22 09:32:54 +02:00
Chris Sherlock
6c0bb0f9b8 tools: test Rectangle::Normalize()
Change-Id: Ia3fec45b2b6dd0011910c8db5819e161485336c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138713
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-24 10:55:29 +02:00
Chris Sherlock
57fddf3e64 tools: json writer test does not need to use test::BootstrapFixture
Change-Id: Iea7fa63ca7a3208d065ac2960998041672fc8d7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136231
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-09 15:28:30 +02:00
Luboš Luňák
52e1a6a3e4 use a read-only stream when reading graphic data
EmbeddedObjectRef::GetGraphicStream() creates a writable
SvMemoryStream, read the graphics data into it and then returns
the stream, which will be afterwards used to decode the graphics.
But if the data is broken, incorrect seeking may cause a seek
way past the buffer, and since the stream is writable, it would
be done and cause problems such as running out of memory.
The VersionCompatRead class is one such place that reads size
from the stream and then seeks based on the read data.

Add SvMemoryStream::MakeReadOnly() that will change the stream
to be read-only after the initial read of the data into it.

Change-Id: I1d44aabaf73071a691adafa489e65e4f5e3f021d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137002
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-07-12 18:45:14 +02:00
Chris Sherlock
934985becc tools: rename getHeight/Width() to GetOpenHeight/Width()
By default Rectangle uses closed interval, if we really want to use half
open intervals then we should specifically say as such in the name.

Change-Id: Id7a91120ba1a1a4bc330014216b73a692dbf03a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136575
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-11 11:06:53 +02:00
offtkp
de22386cec Add unit tests for ZCodec
Add unit tests that check compressing->decompressing a file should
result in the same file. This is done by comparing the CRC32
before and after. The same tests also implicitly test that
compression/decompression works by checking the return
value of ZCodec::EndCompression.

Cases added for both mbGzLib=true/false.

Change-Id: I5516760eba5f233c20331cef83fd0b1a1603373f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135233
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-06-15 10:21:36 +02:00
Miklos Vajna
c7d80d229a sw content controls, dropdown: add LOK API
- expose the available list items in a new "items" key of the
  LOK_CALLBACK_CONTENT_CONTROL callback

- add a new lok::Document::sendContentControlEvent() function to be able
  to select a list item from the current drop-down

- add a new listbox to the gtktiledviewer toolbar to select a content
  control list item when the cursor is inside a dropdown

- add tests for the array API of tools::JsonWriter

Change-Id: I47f1333a7815d67952f7c20a9cba1b248886f6dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134256
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-05-13 09:10:25 +02:00
Noel Grandin
d3849255b7 use more string_view in INetURLObject
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-29 08:53:22 +02:00
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
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
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
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
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
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
Stephan Bergmann
d9bc3affb5 -Werror,-Wunused-macros
(when e.g. building natively on macOS ARM64)

Change-Id: Ibff6f913a6251573058c52a8b4106233fad1d443
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124322
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-28 15:48:06 +02:00
Luboš Luňák
ed43620c00 CPU-specific files should not include templates or inlines
Otherwise the possible copy emitted compiled with CPU-specific
instructions might be chosen as the copy to keep and would be
used by generic code. See history for the Calc Kahan code.

Change-Id: Ifc1bbd8d9720d9effe05b8ff8ee5e804363939df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124257
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-27 18:36:59 +02:00
Mike Kaganski
03c474c640 Unify JsonWriter::put and putRaw a bit
In the process, it turned out that there was unnecessary conversion
of OStringBuffer to OString and back to OStringBuffer when using
putRaw, which is avoided now.

Change-Id: I1e3ee685679df0b025bee8f4430624ee5bc9ccb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123547
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-13 17:39:32 +02:00
Luboš Luňák
b22d478531 clean up ambiguous confusing rectangle APIs like IsInside()
Reading 'rectA.IsInside( rectB )' kind of suggests that the code
checks whether 'rectA is inside rectB', but it's actually the other
way around. Rename IsInside() -> Contains(), IsOver() -> Overlaps(),
which should make it clear which way the logic goes.

Change-Id: I9347450fe7dc34c96df6d636a4e3e660de1801ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122271
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Jenkins
2021-09-20 12:10:44 +02:00