Commit graph

495388 commits

Author SHA1 Message Date
Caolán McNamara
ff27aa2ca0 cid#1596694 COPY_INSTEAD_OF_MOVE
and

cid#1596695 COPY_INSTEAD_OF_MOVE

Change-Id: Id90f4da2edf45f7de324fdc9d910cfc3931fa60f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166889
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-30 12:17:03 +02:00
Caolán McNamara
87132f2cea cid#1596696 COPY_INSTEAD_OF_MOVE
Change-Id: I6e8473a569b14591d2b83284d37a672c1ade35cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166887
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-30 12:16:55 +02:00
Caolán McNamara
54404c2c20 cid#1596697 Dereference after null check
Change-Id: I93c9401144fbe5a83ee461ff3fe4334326f6f05b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166886
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-30 12:16:38 +02:00
Caolán McNamara
b2ab2c862c SwModify::Add/Remove always derefs arg
an effort to remove C6011 Dereferencing NULL pointer 'pDepend'

Change-Id: If9e7b7be25ece3df60ada09e5c83d03aebe9c535
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166865
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-30 11:16:34 +02:00
Noel Grandin
a7f8882e49 convert HeapAlloc to make_unique
which means we don't have to explicitly handle OOM, and the resulting
code is much cleaner

Change-Id: I958d6678bb2d6878dda9de6bf82c5314f168db17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166855
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-30 11:11:38 +02:00
Caolán McNamara
1a471e674f WaE: C6011 Dereferencing NULL pointer warnings from unchecked malloc
Change-Id: I14892e3d0badb4a46b82624b86d78eb9bcb8eed7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166700
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-30 11:08:26 +02:00
Noel Grandin
26166ad838 loplugin:ostr in package
Change-Id: I0acc6261ab2ab2b6de52907feeaa0944f708e410
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166852
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-30 10:40:22 +02:00
Noel Grandin
10d2f2ebf1 loplugin:ostr in comphelper
Change-Id: Ide07689bf1a68973cb176554e44e9a809d633def
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166851
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-30 10:40:14 +02:00
Mike Kaganski
41e5b9d32f Remove some syntactic noise
Use of auto num(0) together with decltype<num>(1) is overkill,
when the language explicitly specifies these literals to be int.

Also, change static_casts on literals into function-style cast.

And make some comparisong use CPPUNIT_ASSERT_GREATEREQUAL.

Change-Id: I3af7231a997a4611b564b38facd15a3a6bb76cdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166893
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-04-30 10:37:02 +02:00
Miklos Vajna
06aeb9c61d tdf#159683 sw content controls, plain text: fix crash with the clipboard doc
Regression from commit c804c53548 (sw
content control: fix lost properties on copy&paste, 2023-03-10), select
a plain text content control, copy it to the clipboard, quit: assertion
fails during shutdown because the doc's "placeholder text" char style is
still referenced by a client.

What happens here is that the SwContentControl copy ctor copies the
plain text flag, and that flag is only read in SwTextNode::InsertHint(),
so that causes the problem. Note how that code is inconsistent: we avoid
the creation of dummy characters in the copy case, but we still try to
adjust the start/end of the content control attribute in the copy case,
which makes not much sense.

Fix the problem by not adjusting the content control attribute
boundaries in the copy case, since the original intention was to do
thees corrections only at a UI level, during interactive edit.

It's not clear why this inconsistency had an influence on the clients of
the char style, though.

Change-Id: I86b0516464f24fc453dcd97588dafb8afd010a9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166882
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-04-30 10:12:13 +02:00
Caolán McNamara
8b145fc3f8 line break "Preloading breakiterator: Preload icons"
so "Preloading breakiterator" is on its own line

Change-Id: If2dfb6e9c636346b8b425187c4faab311cf32131
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166589
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit e2cbe31915)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166866
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-30 09:51:18 +02:00
Miklos Vajna
016b2f2f91 tdf#160833 sw DoNotMirrorRtlDrawObjs: add layout
In case this flag is active (intended for DOCX files), then don't
automatically mirror the position of drawing objects, just because they
are anchored in an RTL text node.

Change-Id: Ie743d94ecb511d7de89e8e1e8303896370ce58c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166883
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-04-30 09:45:40 +02:00
Xisco Fauli
bb55430412 tdf#160827: sw_ooxmlexport20: Add unittest
Change-Id: I6fb58ef5e2336a1dcf9c8bc805a494fd4dd8e4bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166871
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-04-30 09:37:01 +02:00
Noel Grandin
efc8ce2c4e use more concrete UNO classes in writerfilter (SwXFootnote)
Change-Id: I9d212348edfa1897ad139fbb9f633fbd5a09566d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166808
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-30 09:34:29 +02:00
Heiko Tietze
9e7d702302 Related tdf#143733 - Cell focus must not cover content
This patch moves the cell focus rectangle outside the active cell,
relative to the zoom factor

Change-Id: I9df98125d5c0e571af841442d4db8f02d3c05487
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166870
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2024-04-30 09:21:45 +02:00
Justin Luth
a50b2d11ed xlsx import: parse short-hand version of address
Since I did this for the range, I might as well
try to entirely remove parseOoxAddress2d.

This allows me to remove parseOoxAddress2d.
No point in having duplicate functions to turn a string
into an ScAddress.
[I assume this was a left-over from when this code
was in /oox and didn't have access to sc methods.]

Earlier patchsets checked that the new method and the old method
returned the same values for all existing unit tests.

Change-Id: Ic45eaf53417b0d8afad7b49959014162549653ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166606
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-04-30 08:48:11 +02:00
Nima Mahanloo
d04b6c775d tdf#145614 Convert #define to enum
Change-Id: I0a360a93775d2c46b7e02009879d7a18315497b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166168
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2024-04-30 08:39:15 +02:00
Stephan Bergmann
735ea444f2 Embind: Fix out-param handling
...by using UnoInOutParam in all cases.  Some types whose Embind mappings don't
employ any smart pointers (like any and sequence) would have worked directly
with pointers, but others (like string and type) would have caused Embind errors
at runtime.  So consistently use UnoInOutParam in all cases (and generate
bindings for all the used cases in embindmaker).

Change-Id: If26551bf4e99d10748aec1597d6e99f994dfd86e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166854
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-30 07:53:11 +02:00
Michael Weghorn
621cfc0e41 qt: Guard clipboard mime data with SolarMutex
Most of the access to the QtClipboardTransferable
mime data happens exclusively on the main thread,
with the solar mutex held.

However, `mimeData()`, called from `QtClipboard::getContents`
didn't ensure that yet, so as Michael Stahl pointed out in [1],

    commit 1db5b87fe6
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Feb 13 13:23:17 2024 +0100

        tdf#156562 qt: Sync with system clipboard content if necessary

introduced a data race by allowing to set new mime data.

Introduce a new
`QtClipboardTransferable::hasMimeData(const QMimeData* pMimeData)`
that guards access to the mime data with the solar mutext as well
and use that instead, so all access to the `QtClipboardTransferable`
mime data is now guarded by the solar mutex.

Also add an explicit note for the mime data getter/setter in the
`QtTransferable` base class that subclasses allowing to update
mime data are responsible for preventing data races.

[1] https://gerrit.libreoffice.org/c/core/+/166141/comment/fe75f418_40c1b622

Change-Id: I01dbbb0b37a4c6ad06b4d3001ecce8b0260eb32e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166750
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-04-30 06:53:19 +02:00
Michael Weghorn
8939999dee qt: Avoid race on QtTransferable member
As Michael Stahl pointed out in [1], there is a data
race on `QtTransferable::m_bProvideUTF16FromOtherEncoding`.

Adjust the code a bit to no longer make use of the
member and drop it.

The QtClipboard case was fine because both methods making
use of the member always run in the main thread with the
SolarMutex held.

For anything else, the `m_pMimeData` doesn't change
don't change, so access to that member doesn't need
to be guarded by a mutex and thus dropping
`QtTransferable::m_bProvideUTF16FromOtherEncoding`
should be sufficient to address that race at least.
(Another one will be addressed separately.)

[1] https://gerrit.libreoffice.org/c/core/+/166140/comment/bc1c9f11_6ad630b7

Change-Id: Iaf2fb460b129493f5627c95b6968aa57da368b4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166749
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-04-30 06:53:11 +02:00
Mike Kaganski
ea93670372 Drop some uses of css::uno::Sequence::getConstArray ...
where it was obsoleted by commits 2484de6728
(Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and
fb3c04bd19 (Drop non-const Sequence::operator[]
in internal code 2021-11-05).

Change-Id: I4ccc647bb794515c8c11f8dfd9a26563f4aa094b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166819
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-04-30 06:20:50 +02:00
Tomaž Vajngerl
e82c9633e4 svx: use o3tl::convert instead of 847 (mm100) when we want 24pt
Change-Id: I1d1c4a0e12c0443e7021c8aedcd386814a1647be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166823
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-04-30 04:55:09 +02:00
Patrick Luby
f4ef5435df tdf#130678 draw SVG icons at Retina resolution on macOS
Also, change the default icon theme on macOS to SVG now that SVG icons
support Retina display resolution and the existing PNG icon themes do not.

Change-Id: I8c86c316b0db005661759c132ecf7e8667cf30bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166867
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Tested-by: Jenkins
2024-04-30 01:24:29 +02:00
Mike Kaganski
af5a1b5925 Drop uses of css::uno::Sequence::getConstArray in dbaccess
where it was obsoleted by commits 2484de6728
(Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and
fb3c04bd19 (Drop non-const Sequence::operator[]
in internal code 2021-11-05).

Change-Id: I4f8dc4f430dc49fa29012b8f064094daceb5e1b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166818
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-04-29 23:15:48 +02:00
Mike Kaganski
00e2762c66 Drop uses of css::uno::Sequence::getConstArray in cppuhelper .. cui
where it was obsoleted by commits 2484de6728
(Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and
fb3c04bd19 (Drop non-const Sequence::operator[]
in internal code 2021-11-05).

Change-Id: Ia2b60af973183bbe79656e67b5e37d7efa39a308
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166817
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-29 23:15:40 +02:00
Mike Kaganski
8755c80018 Drop uses of css::uno::Sequence::getConstArray in canvas .. connectivity
where it was obsoleted by commits 2484de6728
(Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and
fb3c04bd19 (Drop non-const Sequence::operator[]
in internal code 2021-11-05).

Change-Id: I9467028fd1a7eeafad7f0dd776a91a9a40770b48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166816
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-29 23:15:33 +02:00
Mike Kaganski
20070d12c8 Drop uses of css::uno::Sequence::getConstArray in accessibility .. basegfx
where it was obsoleted by commits 2484de6728
(Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and
fb3c04bd19 (Drop non-const Sequence::operator[]
in internal code 2021-11-05).

Change-Id: I14e3634d8e8dd294b673dcda4dde13f01c3e5112
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166813
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-04-29 23:15:24 +02:00
Caolán McNamara
2bad222409 futile to null check here if we deref afterwards anyway
Change-Id: I994b276ad39b09547cb1dbd3710daf519c5f5c66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166864
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-29 21:23:07 +02:00
Olivier Hallot
9bc04a3800 Update git submodules
* Update helpcontent2 from branch 'master'
  to 0d4e0c0452346d797ae5eda7e3c1c61d73f6eb3c
  - Fix indexer="include" in  Help files.
    
    + refactor
    
    Change-Id: Ia0dfdc0f88f40776042ca0b745e26dc9e0cd479f
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/166874
    Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
    Tested-by: Jenkins
2024-04-29 20:51:44 +02:00
Olivier Hallot
6818bf2638 Update git submodules
* Update helpcontent2 from branch 'master'
  to 3fa70de3d05c43e190a2d2718a43667bda3ff5f1
  - Fix indexer="include" in database Help files.
    
    + refactor
    
    Change-Id: Iacaffc96aac85e7b06348372da16449c1206e2de
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/166873
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2024-04-29 20:51:32 +02:00
Christian Lohmaier
e729fec8a9 update credits
Change-Id: I92481956d041c4a5077aa7a56af2df3ab72fd9bf
2024-04-29 20:38:43 +02:00
Miklos Vajna
c675eaf923 tdf#160833 sw: add a DoNotMirrorRtlDrawObjs compat flag
The DOCX bugdoc has a circle shape anchored inside an RTL paragraph:
this shows up on the right hand side in Word, but on the left hand side
in Writer.

What happens is that Writer implicitly mirrors draw objects anchored in
RTL paragraphs, while Word doesn't do this.

Start fixing the problem by adding a new layout compatibility flag that
can be used by the DOCX import in the future, to leave the behavior
unchanged for new & existing ODT documents.

An alternative would be to do something similar to the DOC import's
SwWW8ImplReader::MiserableRTLGraphicsHack(), but 1) we don't have the
page margins by the time we import the shape and 2) as its name says, it
doesn't feel like a clean solution, it's better to handle this
difference at a layout level.

Change-Id: I2ec067d86c7fbdbe57e4cd9547015fe25a9a56b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166820
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-04-29 20:30:43 +02:00
Noel Grandin
c60d246e7a fix macos build
after
    commit cfb913db1b
    Author: Justin Luth <justin.luth@collabora.com>
    Date:   Tue Apr 23 20:15:27 2024 -0400
    xlsx import: parse short-hand version of range address

Change-Id: Ia75b2bd90ac02b682f1c86865a07ac5e2557b555
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166875
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-29 19:38:09 +02:00
Noel Grandin
34b66eac03 fix Windows build
after
    commit a7094c8156
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Mon Feb 26 15:36:48 2024 +0200
    make more symbols private in calc

Seems different jenkins boxes compile slightly differently

Change-Id: I7a439e236e8c3c753ce358b8d5f6e06ccf181768
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166869
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-29 19:37:53 +02:00
Arnaud VERSINI
190156976d tdf#147021 : use std::size instead of SAL_N_ELEMENTS in generated code too
Change-Id: Ib11a703c0250b1f80b7e79fe24e3bda915e7198b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166385
Tested-by: Jenkins
Reviewed-by: Arnaud Versini <arnaud.versini@pm.me>
2024-04-29 18:45:26 +02:00
Caolán McNamara
716706d6ba WaE: C6054: String 'baseDrive' might not be zero-terminated
Change-Id: I0d3192dbac5ca73cd93051bcdf812bbe34a77c8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166828
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-29 16:04:36 +02:00
Justin Luth
cfb913db1b xlsx import: parse short-hand version of range address
In order to indicate the entire row or column
(for the benefit of a spreadsheet program that may eventually
increase the supported number of rows or columns it supports)
a short-handed form of the range can be used
like "B:B" for the entire column,
or "1:10" for the first 10 rows of all columns.

Shorthand is nicer for humans
and allows for future expansion of row/column space

This reverts 24.8 commit a29d91ac40
    xlsx export: never export short-hand version of range address
which reduced the likelihood that we will ever see
such a range, because Excel seems to always
write out the full address.
However, the shorthand version is definitely valid for Excel.

Earlier patchsets checked that the new method and the old method
returned the same values for all existing unit tests.

Change-Id: I7677dfc207771a32222095416f728f7cd34a4f75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166570
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-04-29 15:59:45 +02:00
Andreas Heinisch
7e30434655 tdf#160765 - Paste Special Dialog: Remember comments checkbox
After the change of tdf#139858 the comments checkbox was not remembered anymore after closing the dialog. In order to fix this issue, additionally check not only the NOTE flag but also for the ADDNOTES one.

Change-Id: I8b24d231313b57a05b7e527c0865686762e5a2b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166762
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
2024-04-29 15:57:20 +02:00
Xisco Fauli
0627386e92 Fix UBSan failure
Introduced by 495b5db74f
"sw: check GetUserCall"

https://ci.libreoffice.org/job/lo_ubsan/3154/consoleFull#-1571115798d893063f-7f3d-4b7e-b56f-4e0f225817cd
Change-Id: Ifc80312890f2e6b82dcc9419b5b7e8bfcd5340a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166824
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-04-29 15:42:25 +02:00
Todor Balabanov
763149e2f4 Double values comparison changed to compare method.
Using the Double.compare() method is often preferred over the == comparison
operator for comparing double values due to several reasons:

Handling NaN (Not-a-Number) values: The Double.compare() method correctly
handles NaN values, while the == operator does not. If either of the operands
is NaN, the == operator will always return false, regardless of the other
operand. In contrast, Double.compare() will correctly evaluate NaN values
according to the IEEE 754 floating-point standard.

Handling positive and negative zero: The == operator treats positive zero and
negative zero as equal, whereas they are distinct values in IEEE 754
floating-point representation. Double.compare() correctly distinguishes
between positive and negative zero.

Robustness against rounding errors: Floating-point arithmetic can introduce
rounding errors, causing two double values that should be equal to differ
slightly. Directly comparing them with the == operator might yield unexpected
results due to these small differences. Double.compare() allows you to define
a tolerance level if necessary, providing more control over how equality is
determined.

Consistent behavior: The behavior of Double.compare() is consistent and
predictable across different platforms and JVM implementations, as it follows
the IEEE 754 standard. On the other hand, the behavior of the == operator
might vary depending on the platform and compiler optimizations.

Suitability for sorting: Double.compare() returns an integer value that can
be directly used for sorting double values in ascending or descending order.
This makes it convenient for sorting arrays or collections of double values.

Overall, while the == operator might work in some cases, using
Double.compare() provides more robust and predictable behavior, especially
when dealing with floating-point numbers in Java.

Change-Id: I5756936a0d2b4fe11b9113ddd33b6ae691f5103f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166796
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-29 15:40:27 +02:00
Noel Grandin
27ed452ae6 use more concrete UNO classes in writerfilter (SwXContentControl)
Change-Id: I84a4c82176681eb55e90240a2db7001123605c1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166807
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-29 15:36:11 +02:00
Arnaud VERSINI
b6c2ff2f05 i18npool : remove useless stdio include generation
Change-Id: Ib37f2c7553de2045496a090cda7006257fcf5e20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166386
Reviewed-by: Arnaud Versini <arnaud.versini@pm.me>
Tested-by: Jenkins
2024-04-29 14:21:32 +02:00
Caolán McNamara
f9fb7afe13 ofz#68265 fix oss-fuzz build failure
Change-Id: I73087235d87253f4c8375fa0c0492c6258701571
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166827
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-04-29 14:17:30 +02:00
Stephan Bergmann
a6d41c61da UBSan needs SwXBookmark RTTI now
...presumably since 6a11bf9f7b "use more concrete
UNO classes in writerfilter (SwXBookmark)", failing sw_writerfilter_misc with

> DynamicLibraryManagerException: "Failed to load dynamic library: workdir/LinkTarget/CppunitTest/libtest_sw_writerfilter_misc.so
> instdir/program/libsw_writerfilterlo.so: undefined symbol: _ZTI11SwXBookmark"

Change-Id: I9f839ca0f6986723cd2c4add5eaef3ac8ab8d841
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166821
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-29 13:15:18 +02:00
Noel Grandin
51cfdfd7d4 reduce symbol visibility
Change-Id: Ibc850eb12c38f2985015f06e330585b02d6bf15f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166822
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-04-29 12:54:43 +02:00
Vasily Melenchuk
084882a66c sw: fixed crash on GetCreateView() returning nullptr
Change-Id: Id0cb44ac7d805a1736fa8170aaffb97b54211707
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166617
Tested-by: Jenkins
Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
2024-04-29 12:06:00 +02:00
Miklos Vajna
5a61b590ae svx: prefix members of SdrLayerAdmin
See tdf#94879 for motivation.

Change-Id: I8ea80a3f2121c5c29168aa185e6278d924874c72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166815
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-04-29 10:10:37 +02:00
Hubert Figuière
9648f81f98 cool#8066: calc: enable .uno:ToggleSheetGrid
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Ibe5bca4d0622c4015030a21d4ecccd41d5e9f483
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166529
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-29 09:31:06 +02:00
Caolán McNamara
e5c988821d WaE: C6011 Derefencing NULL pointer 'pMF'
Change-Id: I76e85e8671623f7cdf994dce779c3944b8761acf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166731
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-29 09:30:48 +02:00
Caolán McNamara
a70a8f5597 Unchecked HeapAlloc
Change-Id: Icd49d0b5f996d57d8e9518cb08fd3c3fc54fa779
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166732
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-29 09:30:26 +02:00