Commit graph

7443 commits

Author SHA1 Message Date
Mike Kaganski
259480c5e1 Simplify OABSPilotUno
Change-Id: Id722754aadecbb0cdb0a35fd8b3a7ac24e21b546
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178026
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-12-07 14:34:46 +01:00
Michael Weghorn
57d532057b weld: Rename weld::Treeview selection signal/connect
Rename weld::TreeView member + methods to clarify
that these are about selection changes:

* m_aChangeHdl to m_aSelectionChangedHdl,
* signal_changed to signal_selection_changed
* connect_changed to connect_selection_changed

In GtkInstanceTreeview, also rename the
related methods calling signal_selection_changed
accordingly for consistency.

Change-Id: I299d7930484677395a0bdd0ff105df18688f2e04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178023
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-07 11:15:03 +01:00
Mohamed Ali
c480e9ffb7 tdf#130924 use SAL_WARN instead of fprintf
Change-Id: Iefac2a4e58248c9fcead2bcf97817488097fb20d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177711
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-12-03 07:48:52 +01:00
Jim Raykowski
55e86edcb3 tdf#120658 - Reworking of dialogues Organize macros
(make from 5 existing only one)

Much of what makes up this patch is adapted from existing code that is
used to organize and select macros and to assign macros to shortcut
keys. Comments in the patch say where code is borrowed from.

Known issues:

+ Scripting framework library rename for BeanShell, Java, and JavaScript
always returns fail when there are no macro entries in the library even
though it actually succeeds. The same thing happens using
SvxScriptOrgDialog::renameEntry.

+ Deleting Basic macros from the Macro Manager dialog is not implemented
yet.

Change-Id: If4da04549f8b39675910cbbd1f94dd9a6b73c31a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176254
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-02 07:13:00 +01:00
Caolán McNamara
8c1dbd3188 cid#1607542 COPY_INSTEAD_OF_MOVE
and

cid#1606986 COPY_INSTEAD_OF_MOVE
cid#1557969 COPY_INSTEAD_OF_MOVE
cid#1557837 COPY_INSTEAD_OF_MOVE
cid#1557772 COPY_INSTEAD_OF_MOVE
cid#1557735 COPY_INSTEAD_OF_MOVE
cid#1557672 COPY_INSTEAD_OF_MOVE
cid#1557664 COPY_INSTEAD_OF_MOVE
cid#1557650 COPY_INSTEAD_OF_MOVE
cid#1557642 COPY_INSTEAD_OF_MOVE
cid#1557639 COPY_INSTEAD_OF_MOVE
cid#1557628 COPY_INSTEAD_OF_MOVE
cid#1557623 COPY_INSTEAD_OF_MOVE
cid#1557581 COPY_INSTEAD_OF_MOVE
cid#1557489 COPY_INSTEAD_OF_MOVE
cid#1557473 COPY_INSTEAD_OF_MOVE
cid#1557317 COPY_INSTEAD_OF_MOVE
cid#1557261 COPY_INSTEAD_OF_MOVE
cid#1557146 COPY_INSTEAD_OF_MOVE
cid#1557135 COPY_INSTEAD_OF_MOVE
cid#1557134 COPY_INSTEAD_OF_MOVE
cid#1557079 COPY_INSTEAD_OF_MOVE
cid#1557063 COPY_INSTEAD_OF_MOVE
cid#1557052 COPY_INSTEAD_OF_MOVE
cid#1556982 COPY_INSTEAD_OF_MOVE
cid#1556977 COPY_INSTEAD_OF_MOVE
cid#1556950 COPY_INSTEAD_OF_MOVE
cid#1556943 COPY_INSTEAD_OF_MOVE
cid#1556804 COPY_INSTEAD_OF_MOVE
cid#1556736 COPY_INSTEAD_OF_MOVE
cid#1556658 COPY_INSTEAD_OF_MOVE
cid#1556621 COPY_INSTEAD_OF_MOVE
cid#1556590 COPY_INSTEAD_OF_MOVE
cid#1556579 COPY_INSTEAD_OF_MOVE
cid#1556534 COPY_INSTEAD_OF_MOVE
cid#1556524 COPY_INSTEAD_OF_MOVE
cid#1556478 COPY_INSTEAD_OF_MOVE
cid#1556467 COPY_INSTEAD_OF_MOVE
cid#1556422 COPY_INSTEAD_OF_MOVE
cid#1556314 COPY_INSTEAD_OF_MOVE
cid#1556309 COPY_INSTEAD_OF_MOVE
cid#1556258 COPY_INSTEAD_OF_MOVE
cid#1556143 COPY_INSTEAD_OF_MOVE
cid#1556119 COPY_INSTEAD_OF_MOVE
cid#1556101 COPY_INSTEAD_OF_MOVE
cid#1556097 COPY_INSTEAD_OF_MOVE
cid#1556039 COPY_INSTEAD_OF_MOVE
cid#1555966 COPY_INSTEAD_OF_MOVE
cid#1555948 COPY_INSTEAD_OF_MOVE
cid#1555915 COPY_INSTEAD_OF_MOVE
cid#1555836 COPY_INSTEAD_OF_MOVE
cid#1555748 COPY_INSTEAD_OF_MOVE
cid#1555644 COPY_INSTEAD_OF_MOVE
cid#1555582 COPY_INSTEAD_OF_MOVE
cid#1555478 COPY_INSTEAD_OF_MOVE
cid#1555475 COPY_INSTEAD_OF_MOVE
cid#1555409 COPY_INSTEAD_OF_MOVE
cid#1555372 COPY_INSTEAD_OF_MOVE
cid#1555334 COPY_INSTEAD_OF_MOVE
cid#1555330 COPY_INSTEAD_OF_MOVE
cid#1555310 COPY_INSTEAD_OF_MOVE
cid#1555257 COPY_INSTEAD_OF_MOVE
cid#1555247 COPY_INSTEAD_OF_MOVE
cid#1555147 COPY_INSTEAD_OF_MOVE
cid#1555120 COPY_INSTEAD_OF_MOVE
cid#1555059 COPY_INSTEAD_OF_MOVE
cid#1555016 COPY_INSTEAD_OF_MOVE
cid#1554880 COPY_INSTEAD_OF_MOVE
cid#1554824 COPY_INSTEAD_OF_MOVE
cid#1554808 COPY_INSTEAD_OF_MOVE
cid#1546189 COPY_INSTEAD_OF_MOVE

Change-Id: I2d2f33c603f1596228c9ecb169472ba6751e7826
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177593
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-30 22:39:23 +01:00
Bogdan Buzea
9579907205 Spelling mistake in code
Change-Id: I9db111c16865a2b7514e62a21a66d5497cda91fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176966
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-11-23 13:17:13 +01:00
Mike Kaganski
fec1501374 Use specific SvtModuleOptions::Is*Installed for clarity
Change-Id: Ibe64b9fcccf33471d96bb0fb1aa896cb456657f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177069
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-23 09:45:38 +01:00
Oromidayo Owolabi
7a7ba9cbee tdf#145614 Convert #define to enum class
Converted #define to enum class

Change-Id: I16195a439643bcf0111c591a829272b5bf70179d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175027
Reviewed-by: Hossein   <hossein@libreoffice.org>
Tested-by: Jenkins
2024-11-12 15:27:34 +01:00
Noel Grandin
9ce6abe3d4 clang-tidy: performance-unnecessary-copy-initialization in extensions
Change-Id: I85e9c4f7e6d1b20e83929bcfdbbedee7129ce4e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176413
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-11 20:11:11 +01:00
Mike Kaganski
1180b3473a com::sun::star -> css
Change-Id: I890ec73e30d3cc6b210903ecee29431f3cb5f635
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175979
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-10 10:50:15 +01:00
Noel Grandin
ed0b12f4ea no need to take a copy of the getProcessComponentContext return value
we can just take a "const &".

(found by running clang-tidy with the
performance-unnecessary-copy-initialization warning)

Change-Id: I20fd208c65303da78170b1ac06c638fdf3aa094b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176267
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-08 15:23:52 +01:00
Mike Kaganski
56f3dbffdf Simplify a bit
Change-Id: I618b0f8bcb2e8032ee12367c73e1136685f66b3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176183
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-08 05:34:20 +01:00
Noel Grandin
5fdfc074c9 loplugin:passstuffbyref make some small improvements
Change-Id: Ib14a2e6b41165887fcf99c3d155850faa8564822
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176218
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-07 17:20:09 +01:00
Caolán McNamara
92f5913aef cid#1556442 COPY_INSTEAD_OF_MOVE
and

cid#1607753 COPY_INSTEAD_OF_MOVE
cid#1554790 COPY_INSTEAD_OF_MOVE
cid#1556463 COPY_INSTEAD_OF_MOVE
cid#1554838 COPY_INSTEAD_OF_MOVE
cid#1556231 COPY_INSTEAD_OF_MOVE
cid#1556878 COPY_INSTEAD_OF_MOVE
cid#1554913 COPY_INSTEAD_OF_MOVE
cid#1558064 COPY_INSTEAD_OF_MOVE
cid#1557043 COPY_INSTEAD_OF_MOVE
cid#1556985 COPY_INSTEAD_OF_MOVE
cid#1556766 COPY_INSTEAD_OF_MOVE
cid#1557351 COPY_INSTEAD_OF_MOVE
cid#1554863 COPY_INSTEAD_OF_MOVE
cid#1556764 COPY_INSTEAD_OF_MOVE
cid#1556279 COPY_INSTEAD_OF_MOVE
cid#1555970 COPY_INSTEAD_OF_MOVE
cid#1556942 COPY_INSTEAD_OF_MOVE
cid#1557964 COPY_INSTEAD_OF_MOVE
cid#1555166 COPY_INSTEAD_OF_MOVE
cid#1556496 COPY_INSTEAD_OF_MOVE
cid#1557175 COPY_INSTEAD_OF_MOVE
cid#1558054 COPY_INSTEAD_OF_MOVE
cid#1557392 COPY_INSTEAD_OF_MOVE
cid#1557850 COPY_INSTEAD_OF_MOVE
cid#1555118 COPY_INSTEAD_OF_MOVE
cid#1557131 COPY_INSTEAD_OF_MOVE
cid#1556614 COPY_INSTEAD_OF_MOVE
cid#1609650 COPY_INSTEAD_OF_MOVE
cid#1555114 COPY_INSTEAD_OF_MOVE
cid#1555241 COPY_INSTEAD_OF_MOVE
cid#1555442 COPY_INSTEAD_OF_MOVE
cid#1556473 COPY_INSTEAD_OF_MOVE
cid#1557654 COPY_INSTEAD_OF_MOVE
cid#1554689 COPY_INSTEAD_OF_MOVE
cid#1556316 COPY_INSTEAD_OF_MOVE
cid#1557929 COPY_INSTEAD_OF_MOVE
cid#1554807 COPY_INSTEAD_OF_MOVE
cid#1554858 COPY_INSTEAD_OF_MOVE
cid#1555103 COPY_INSTEAD_OF_MOVE
cid#1555517 COPY_INSTEAD_OF_MOVE
cid#1556424 COPY_INSTEAD_OF_MOVE
cid#1557252 COPY_INSTEAD_OF_MOVE
cid#1557566 COPY_INSTEAD_OF_MOVE
cid#1608020 COPY_INSTEAD_OF_MOVE
cid#1557742 COPY_INSTEAD_OF_MOVE
cid#1555884 COPY_INSTEAD_OF_MOVE
cid#1554809 COPY_INSTEAD_OF_MOVE
cid#1555336 COPY_INSTEAD_OF_MOVE
cid#1555173 COPY_INSTEAD_OF_MOVE
cid#1556067 COPY_INSTEAD_OF_MOVE
cid#1557040 COPY_INSTEAD_OF_MOVE
cid#1556235 COPY_INSTEAD_OF_MOVE
cid#1557366 COPY_INSTEAD_OF_MOVE
cid#1555910 COPY_INSTEAD_OF_MOVE
cid#1556716 COPY_INSTEAD_OF_MOVE
cid#1558022 COPY_INSTEAD_OF_MOVE
cid#1555769 COPY_INSTEAD_OF_MOVE
cid#1555940 COPY_INSTEAD_OF_MOVE
cid#1557077 COPY_INSTEAD_OF_MOVE
cid#1555270 COPY_INSTEAD_OF_MOVE
cid#1555660 COPY_INSTEAD_OF_MOVE
cid#1556302 COPY_INSTEAD_OF_MOVE
cid#1555678 COPY_INSTEAD_OF_MOVE
cid#1556538 COPY_INSTEAD_OF_MOVE
cid#1557689 COPY_INSTEAD_OF_MOVE
cid#1555009 COPY_INSTEAD_OF_MOVE
cid#1555433 COPY_INSTEAD_OF_MOVE
cid#1555671 COPY_INSTEAD_OF_MOVE
cid#1555255 COPY_INSTEAD_OF_MOVE
cid#1557681 COPY_INSTEAD_OF_MOVE
cid#1557512 COPY_INSTEAD_OF_MOVE
cid#1554958 COPY_INSTEAD_OF_MOVE
cid#1555758 COPY_INSTEAD_OF_MOVE
cid#1555597 COPY_INSTEAD_OF_MOVE
cid#1558040 COPY_INSTEAD_OF_MOVE
cid#1556476 COPY_INSTEAD_OF_MOVE
cid#1557646 COPY_INSTEAD_OF_MOVE
cid#1557950 COPY_INSTEAD_OF_MOVE
cid#1557019 COPY_INSTEAD_OF_MOVE
cid#1557885 COPY_INSTEAD_OF_MOVE
cid#1556402 COPY_INSTEAD_OF_MOVE
cid#1557906 COPY_INSTEAD_OF_MOVE
cid#1556619 COPY_INSTEAD_OF_MOVE
cid#1554683 COPY_INSTEAD_OF_MOVE
cid#1556549 COPY_INSTEAD_OF_MOVE
cid#1554747 COPY_INSTEAD_OF_MOVE
cid#1554929 COPY_INSTEAD_OF_MOVE
cid#1555362 COPY_INSTEAD_OF_MOVE
cid#1557053 COPY_INSTEAD_OF_MOVE
cid#1557891 COPY_INSTEAD_OF_MOVE
cid#1555043 COPY_INSTEAD_OF_MOVE
cid#1555107 COPY_INSTEAD_OF_MOVE
cid#1557203 COPY_INSTEAD_OF_MOVE
cid#1556728 COPY_INSTEAD_OF_MOVE
cid#1557773 COPY_INSTEAD_OF_MOVE
cid#1556845 COPY_INSTEAD_OF_MOVE

Change-Id: I001fb67e597b096e992fd8a0cd6f3ec577767c33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176098
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-06 13:58:54 +01:00
Caolán McNamara
7bbe74b2be cid#1555789 COPY_INSTEAD_OF_MOVE
and

cid#1556865 COPY_INSTEAD_OF_MOVE
cid#1556871 COPY_INSTEAD_OF_MOVE
cid#1556939 COPY_INSTEAD_OF_MOVE
cid#1556951 COPY_INSTEAD_OF_MOVE
cid#1556964 COPY_INSTEAD_OF_MOVE
cid#1556966 COPY_INSTEAD_OF_MOVE
cid#1556968 COPY_INSTEAD_OF_MOVE
cid#1556971 COPY_INSTEAD_OF_MOVE
cid#1556989 COPY_INSTEAD_OF_MOVE
cid#1557001 COPY_INSTEAD_OF_MOVE
cid#1557011 COPY_INSTEAD_OF_MOVE
cid#1557032 COPY_INSTEAD_OF_MOVE
cid#1557038 COPY_INSTEAD_OF_MOVE
cid#1557041 COPY_INSTEAD_OF_MOVE
cid#1557055 COPY_INSTEAD_OF_MOVE
cid#1557056 COPY_INSTEAD_OF_MOVE
cid#1557057 COPY_INSTEAD_OF_MOVE
cid#1557065 COPY_INSTEAD_OF_MOVE
cid#1557068 COPY_INSTEAD_OF_MOVE
cid#1557087 COPY_INSTEAD_OF_MOVE
cid#1557090 COPY_INSTEAD_OF_MOVE
cid#1557093 COPY_INSTEAD_OF_MOVE
cid#1557113 COPY_INSTEAD_OF_MOVE
cid#1557122 COPY_INSTEAD_OF_MOVE
cid#1557126 COPY_INSTEAD_OF_MOVE
cid#1557145 COPY_INSTEAD_OF_MOVE
cid#1557151 COPY_INSTEAD_OF_MOVE
cid#1557152 COPY_INSTEAD_OF_MOVE
cid#1557197 COPY_INSTEAD_OF_MOVE
cid#1557216 COPY_INSTEAD_OF_MOVE
cid#1557245 COPY_INSTEAD_OF_MOVE
cid#1557272 COPY_INSTEAD_OF_MOVE
cid#1557310 COPY_INSTEAD_OF_MOVE
cid#1557314 COPY_INSTEAD_OF_MOVE
cid#1557318 COPY_INSTEAD_OF_MOVE
cid#1557333 COPY_INSTEAD_OF_MOVE
cid#1557340 COPY_INSTEAD_OF_MOVE
cid#1557358 COPY_INSTEAD_OF_MOVE
cid#1557359 COPY_INSTEAD_OF_MOVE
cid#1557365 COPY_INSTEAD_OF_MOVE
cid#1557367 COPY_INSTEAD_OF_MOVE
cid#1557395 COPY_INSTEAD_OF_MOVE
cid#1557418 COPY_INSTEAD_OF_MOVE
cid#1557488 COPY_INSTEAD_OF_MOVE
cid#1557493 COPY_INSTEAD_OF_MOVE
cid#1557506 COPY_INSTEAD_OF_MOVE
cid#1557514 COPY_INSTEAD_OF_MOVE
cid#1557528 COPY_INSTEAD_OF_MOVE
cid#1557534 COPY_INSTEAD_OF_MOVE
cid#1557537 COPY_INSTEAD_OF_MOVE
cid#1557562 COPY_INSTEAD_OF_MOVE
cid#1557563 COPY_INSTEAD_OF_MOVE
cid#1557592 COPY_INSTEAD_OF_MOVE
cid#1557608 COPY_INSTEAD_OF_MOVE
cid#1557615 COPY_INSTEAD_OF_MOVE
cid#1557619 COPY_INSTEAD_OF_MOVE
cid#1557637 COPY_INSTEAD_OF_MOVE
cid#1557648 COPY_INSTEAD_OF_MOVE
cid#1557712 COPY_INSTEAD_OF_MOVE
cid#1557750 COPY_INSTEAD_OF_MOVE
cid#1557762 COPY_INSTEAD_OF_MOVE
cid#1557765 COPY_INSTEAD_OF_MOVE

Change-Id: I10db1910627e04a26e25836c05ad5c2707abd18b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175696
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-27 20:19:12 +01:00
Caolán McNamara
6f1508f4de cid#1555767 COPY_INSTEAD_OF_MOVE
and

cid#1555770 COPY_INSTEAD_OF_MOVE
cid#1555788 COPY_INSTEAD_OF_MOVE
cid#1555789 COPY_INSTEAD_OF_MOVE
cid#1555798 COPY_INSTEAD_OF_MOVE
cid#1555816 COPY_INSTEAD_OF_MOVE
cid#1555822 COPY_INSTEAD_OF_MOVE
cid#1555835 COPY_INSTEAD_OF_MOVE
cid#1555845 COPY_INSTEAD_OF_MOVE
cid#1555859 COPY_INSTEAD_OF_MOVE
cid#1555864 COPY_INSTEAD_OF_MOVE
cid#1555868 COPY_INSTEAD_OF_MOVE
cid#1555892 COPY_INSTEAD_OF_MOVE
cid#1555896 COPY_INSTEAD_OF_MOVE
cid#1555921 COPY_INSTEAD_OF_MOVE
cid#1555932 COPY_INSTEAD_OF_MOVE
cid#1555935 COPY_INSTEAD_OF_MOVE
cid#1555944 COPY_INSTEAD_OF_MOVE
cid#1555952 COPY_INSTEAD_OF_MOVE
cid#1555985 COPY_INSTEAD_OF_MOVE
cid#1556024 COPY_INSTEAD_OF_MOVE
cid#1556038 COPY_INSTEAD_OF_MOVE
cid#1556042 COPY_INSTEAD_OF_MOVE
cid#1556044 COPY_INSTEAD_OF_MOVE
cid#1556060 COPY_INSTEAD_OF_MOVE
cid#1556083 COPY_INSTEAD_OF_MOVE
cid#1556085 COPY_INSTEAD_OF_MOVE
cid#1556090 COPY_INSTEAD_OF_MOVE
cid#1556136 COPY_INSTEAD_OF_MOVE
cid#1556157 COPY_INSTEAD_OF_MOVE
cid#1556159 COPY_INSTEAD_OF_MOVE
cid#1556172 COPY_INSTEAD_OF_MOVE
cid#1556179 COPY_INSTEAD_OF_MOVE
cid#1556187 COPY_INSTEAD_OF_MOVE
cid#1556255 COPY_INSTEAD_OF_MOVE
cid#1556256 COPY_INSTEAD_OF_MOVE
cid#1556266 COPY_INSTEAD_OF_MOVE
cid#1556275 COPY_INSTEAD_OF_MOVE
cid#1556290 COPY_INSTEAD_OF_MOVE
cid#1556294 COPY_INSTEAD_OF_MOVE
cid#1556301 COPY_INSTEAD_OF_MOVE
cid#1556311 COPY_INSTEAD_OF_MOVE
cid#1556318 COPY_INSTEAD_OF_MOVE
cid#1556326 COPY_INSTEAD_OF_MOVE
cid#1556369 COPY_INSTEAD_OF_MOVE
cid#1556374 COPY_INSTEAD_OF_MOVE
cid#1556387 COPY_INSTEAD_OF_MOVE
cid#1556388 COPY_INSTEAD_OF_MOVE
cid#1556417 COPY_INSTEAD_OF_MOVE
cid#1556425 COPY_INSTEAD_OF_MOVE
cid#1556435 COPY_INSTEAD_OF_MOVE
cid#1556495 COPY_INSTEAD_OF_MOVE
cid#1556497 COPY_INSTEAD_OF_MOVE
cid#1556501 COPY_INSTEAD_OF_MOVE
cid#1556503 COPY_INSTEAD_OF_MOVE
cid#1556520 COPY_INSTEAD_OF_MOVE
cid#1556523 COPY_INSTEAD_OF_MOVE
cid#1556562 COPY_INSTEAD_OF_MOVE
cid#1556573 COPY_INSTEAD_OF_MOVE
cid#1556576 COPY_INSTEAD_OF_MOVE
cid#1556598 COPY_INSTEAD_OF_MOVE
cid#1556615 COPY_INSTEAD_OF_MOVE
cid#1556626 COPY_INSTEAD_OF_MOVE
cid#1556671 COPY_INSTEAD_OF_MOVE
cid#1556689 COPY_INSTEAD_OF_MOVE
cid#1556701 COPY_INSTEAD_OF_MOVE
cid#1556713 COPY_INSTEAD_OF_MOVE
cid#1556758 COPY_INSTEAD_OF_MOVE
cid#1556759 COPY_INSTEAD_OF_MOVE
cid#1556788 COPY_INSTEAD_OF_MOVE
cid#1556811 COPY_INSTEAD_OF_MOVE
cid#1556821 COPY_INSTEAD_OF_MOVE
cid#1556824 COPY_INSTEAD_OF_MOVE
cid#1556825 COPY_INSTEAD_OF_MOVE
cid#1556862 COPY_INSTEAD_OF_MOVE

Change-Id: I4925a79688a983bb07252600430039ec0bcb75b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175678
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-26 19:25:03 +02:00
Caolán McNamara
ee4554b0ac cid#1555259 COPY_INSTEAD_OF_MOVE
and

cid#1555264 COPY_INSTEAD_OF_MOVE
cid#1555280 COPY_INSTEAD_OF_MOVE
cid#1555303 COPY_INSTEAD_OF_MOVE
cid#1555313 COPY_INSTEAD_OF_MOVE
cid#1555314 COPY_INSTEAD_OF_MOVE
cid#1555323 COPY_INSTEAD_OF_MOVE
cid#1555333 COPY_INSTEAD_OF_MOVE
cid#1555338 COPY_INSTEAD_OF_MOVE
cid#1555349 COPY_INSTEAD_OF_MOVE
cid#1555364 COPY_INSTEAD_OF_MOVE
cid#1555379 COPY_INSTEAD_OF_MOVE
cid#1555398 COPY_INSTEAD_OF_MOVE
cid#1555410 COPY_INSTEAD_OF_MOVE
cid#1555411 COPY_INSTEAD_OF_MOVE
cid#1555416 COPY_INSTEAD_OF_MOVE
cid#1555429 COPY_INSTEAD_OF_MOVE
cid#1555434 COPY_INSTEAD_OF_MOVE
cid#1555441 COPY_INSTEAD_OF_MOVE
cid#1555446 COPY_INSTEAD_OF_MOVE
cid#1555480 COPY_INSTEAD_OF_MOVE
cid#1555490 COPY_INSTEAD_OF_MOVE
cid#1555524 COPY_INSTEAD_OF_MOVE
cid#1555527 COPY_INSTEAD_OF_MOVE
cid#1555531 COPY_INSTEAD_OF_MOVE
cid#1555578 COPY_INSTEAD_OF_MOVE
cid#1555581 COPY_INSTEAD_OF_MOVE
cid#1555591 COPY_INSTEAD_OF_MOVE
cid#1555614 COPY_INSTEAD_OF_MOVE
cid#1555619 COPY_INSTEAD_OF_MOVE
cid#1555633 COPY_INSTEAD_OF_MOVE
cid#1555654 COPY_INSTEAD_OF_MOVE
cid#1555707 COPY_INSTEAD_OF_MOVE
cid#1555712 COPY_INSTEAD_OF_MOVE
cid#1555746 COPY_INSTEAD_OF_MOVE
cid#1555763 COPY_INSTEAD_OF_MOVE

Change-Id: Ibcc1a3649c5663328e60474c06e51902aa74db52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175407
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-22 17:53:07 +02:00
Caolán McNamara
2bafc7384b cid#1545605 COPY_INSTEAD_OF_MOVE
and

cid#1545841 COPY_INSTEAD_OF_MOVE
cid#1554682 COPY_INSTEAD_OF_MOVE
cid#1554686 COPY_INSTEAD_OF_MOVE
cid#1554715 COPY_INSTEAD_OF_MOVE
cid#1554750 COPY_INSTEAD_OF_MOVE
cid#1554759 COPY_INSTEAD_OF_MOVE
cid#1554770 COPY_INSTEAD_OF_MOVE
cid#1554779 COPY_INSTEAD_OF_MOVE
cid#1554794 COPY_INSTEAD_OF_MOVE
cid#1554800 COPY_INSTEAD_OF_MOVE
cid#1554826 COPY_INSTEAD_OF_MOVE
cid#1554836 COPY_INSTEAD_OF_MOVE
cid#1554862 COPY_INSTEAD_OF_MOVE
cid#1554865 COPY_INSTEAD_OF_MOVE
cid#1554872 COPY_INSTEAD_OF_MOVE
cid#1554883 COPY_INSTEAD_OF_MOVE
cid#1554906 COPY_INSTEAD_OF_MOVE
cid#1554921 COPY_INSTEAD_OF_MOVE
cid#1554926 COPY_INSTEAD_OF_MOVE
cid#1554946 COPY_INSTEAD_OF_MOVE
cid#1554956 COPY_INSTEAD_OF_MOVE
cid#1554970 COPY_INSTEAD_OF_MOVE
cid#1554986 COPY_INSTEAD_OF_MOVE
cid#1554991 COPY_INSTEAD_OF_MOVE
cid#1555013 COPY_INSTEAD_OF_MOVE
cid#1555037 COPY_INSTEAD_OF_MOVE
cid#1555050 COPY_INSTEAD_OF_MOVE
cid#1555057 COPY_INSTEAD_OF_MOVE
cid#1555066 COPY_INSTEAD_OF_MOVE
cid#1555067 COPY_INSTEAD_OF_MOVE
cid#1555083 COPY_INSTEAD_OF_MOVE
cid#1555097 COPY_INSTEAD_OF_MOVE
cid#1555135 COPY_INSTEAD_OF_MOVE
cid#1555140 COPY_INSTEAD_OF_MOVE
cid#1555146 COPY_INSTEAD_OF_MOVE
cid#1555148 COPY_INSTEAD_OF_MOVE
cid#1555149 COPY_INSTEAD_OF_MOVE
cid#1555155 COPY_INSTEAD_OF_MOVE
cid#1555157 COPY_INSTEAD_OF_MOVE
cid#1555168 COPY_INSTEAD_OF_MOVE
cid#1555195 COPY_INSTEAD_OF_MOVE
cid#1555196 COPY_INSTEAD_OF_MOVE
cid#1555237 COPY_INSTEAD_OF_MOVE

Change-Id: I90531c19c28dca77fe99c72efdfc0972c311da98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175377
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-22 11:56:02 +02:00
Noel Grandin
7f445e42b6 use more concrete UNO in extensions
Change-Id: I67215b2b5ae03cf3c93915a7590b645914b505de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173582
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-18 12:40:04 +02:00
Noel Grandin
f9ff22db05 tsan:lock-order-inversion in forms
==================
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock)
(pid=14614)
Cycle in lock order graph: M0 (0x720c004ac190) => M1 (0x720c004a8200) =>
M0

Mutex M1 acquired here while holding mutex M0 in thread T43:
2 osl::Mutex::acquire() /home/noel/libo-tsan/include/osl/mutex.hxx:63
(libuno_cppuhelpergcc3.so.3+0x8fdd9)
3 osl::Guard<osl::Mutex>::Guard(osl::Mutex&)
/home/noel/libo-tsan/include/osl/mutex.hxx:144
(libuno_cppuhelpergcc3.so.3+0x8fdd9)
4 cppu::OBroadcastHelperVar<cppu::OMultiTypeInterfaceContainerHelper,
com::sun::uno::Type>::addListener(com::sun::uno::Type
const&, com::sun::uno::Reference<com::sun::uno::XInterface>
const&) /home/noel/libo-tsan/include/cppuhelper/interfacecontainer.h:468
(libuno_cppuhelpergcc3.so.3+0x8fdd9)
5
cppu::OPropertySetHelper::addPropertiesChangeListener(com::sun::uno::Sequence<rtl::OUString>
const&,
com::sun::uno::Reference<com::sun:🫘:XPropertiesChangeListener>
const&) /home/noel/libo-tsan/cppuhelper/source/propshlp.cxx:912
(libuno_cppuhelpergcc3.so.3+0x8fdd9)
6
comphelper::OPropertySetAggregationHelper::addPropertiesChangeListener(com::sun::uno::Sequence<rtl::OUString>
const&,
com::sun::uno::Reference<com::sun:🫘:XPropertiesChangeListener>
const&) /home/noel/libo-tsan/comphelper/source/property/propagg.cxx:495
(libcomphelper.so+0x1a1865)
7 comphelper::OPropertySetAggregationHelper::startListening()
/home/noel/libo-tsan/comphelper/source/property/propagg.cxx:466
(libcomphelper.so+0x1a1416)
^^^ Mutex M0 previously acquired by the same thread here:
8
comphelper::OPropertySetAggregationHelper::addPropertyChangeListener(rtl::OUString
const&,
com::sun::uno::Reference<com::sun:🫘:XPropertyChangeListener>
const&) /home/noel/libo-tsan/comphelper/source/property/propagg.cxx:488
(libcomphelper.so+0x1a181a)
9 non-virtual thunk to
comphelper::OPropertySetAggregationHelper::addPropertyChangeListener(rtl::OUString
const&,
com::sun::uno::Reference<com::sun:🫘:XPropertyChangeListener>
const&) /home/noel/libo-tsan/comphelper/source/property/propagg.cxx:?
(libcomphelper.so+0x1a181a)
10 frm::OInterfaceContainer::implInsert(int,
com::sun::uno::Reference<com::sun:🫘:XPropertySet>
const&, bool, frm::ElementDescription*, bool)
/home/noel/libo-tsan/forms/source/misc/InterfaceContainer.cxx:787
(libfrmlo.so+0x23e03c)
11 frm::OInterfaceContainer::insertByIndex(int, com::sun::uno::Any
const&)
/home/noel/libo-tsan/forms/source/misc/InterfaceContainer.cxx:904
(libfrmlo.so+0x240644)
12 non-virtual thunk to frm::OInterfaceContainer::insertByIndex(int,
com::sun::uno::Any const&)
/home/noel/libo-tsan/forms/source/misc/InterfaceContainer.cxx:?
(libfrmlo.so+0x240716)
13 FmXUndoEnvironment::Inserted(FmFormObj*)
/home/noel/libo-tsan/svx/source/form/fmundo.cxx:424
(libsvxcorelo.so+0x41b2a4)
14 FmXUndoEnvironment::Inserted(SdrObject*)
/home/noel/libo-tsan/svx/source/form/fmundo.cxx:336
(libsvxcorelo.so+0x41a982)
15 FmXUndoEnvironment::Notify(SfxBroadcaster&, SfxHint const&)
/home/noel/libo-tsan/svx/source/form/fmundo.cxx:292
(libsvxcorelo.so+0x41a8a0)
16 non-virtual thunk to FmXUndoEnvironment::Notify(SfxBroadcaster&,
SfxHint const&) /home/noel/libo-tsan/svx/source/form/fmundo.cxx:?
(libsvxcorelo.so+0x41acd2)
17 SfxBroadcaster::Broadcast(SfxHint const&)
/home/noel/libo-tsan/svl/source/notify/SfxBroadcaster.cxx:40
(libsvllo.so+0xe7c3d)
18 SdrObjList::InsertObject(SdrObject*, unsigned long)
/home/noel/libo-tsan/svx/source/svdraw/svdpage.cxx:351
(libsvxcorelo.so+0x6fdf3a)
19 FmFormPage::InsertObject(SdrObject*, unsigned long)
/home/noel/libo-tsan/svx/source/form/fmpage.cxx:79
(libsvxcorelo.so+0x3c1e05)
20
SvxDrawPage::add(com::sun::uno::Reference<com::sun::drawing::XShape>
const&) /home/noel/libo-tsan/svx/source/unodraw/unopage.cxx:191
(libsvxcorelo.so+0x850c7b)
21
SwFmDrawPage::add(com::sun::uno::Reference<com::sun::drawing::XShape>
const&) /home/noel/libo-tsan/sw/source/core/unocore/unodraw.cxx:649
(libswlo.so+0xc30712)
22 non-virtual thunk to
SwFmDrawPage::add(com::sun::uno::Reference<com::sun::drawing::XShape>
const&) /home/noel/libo-tsan/sw/source/core/unocore/unodraw.cxx:?
(libswlo.so+0xc31732)
23 gcc3::callVirtualMethod(void*, unsigned int, void*,
_typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int,
unsigned long*, double*)
/home/noel/libo-tsan/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:87
(libgcc3_uno.so+0xd92a)
24 cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*,
bridges::cpp_uno::shared::VtableSlot,
_typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*,
void*, void**, _uno_Any**)
/home/noel/libo-tsan/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:229
(libgcc3_uno.so+0xcc3c)
25 unoInterfaceProxyDispatch
/home/noel/libo-tsan/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:409
(libgcc3_uno.so+0xc1f6)

Mutex M0 acquired here while holding mutex M1 in thread T44:
3 osl::Guard<osl::Mutex>::Guard(osl::Mutex&)
/home/noel/libo-tsan/include/osl/mutex.hxx:144
(libcomphelper.so+0x1bde34)
4
comphelper::OPropertyChangeListener::setAdapter(comphelper::OPropertyChangeMultiplexer*)
/home/noel/libo-tsan/comphelper/source/property/propmultiplex.cxx:58
(libcomphelper.so+0x1bde34)
5
comphelper::OPropertyChangeMultiplexer::disposing(com::sun::lang::EventObject
const&)
/home/noel/libo-tsan/comphelper/source/property/propmultiplex.cxx:120
(libcomphelper.so+0x1bde34)
6 non-virtual thunk to
comphelper::OPropertyChangeMultiplexer::disposing(com::sun::lang::EventObject
const&)
/home/noel/libo-tsan/comphelper/source/property/propmultiplex.cxx:?
(libcomphelper.so+0x1bdf12)
7
cppu::OInterfaceContainerHelper::disposeAndClear(com::sun::lang::EventObject
const&)
/home/noel/libo-tsan/cppuhelper/source/interfacecontainer.cxx:272
(libuno_cppuhelpergcc3.so.3+0x66524)
8
cppu::OMultiTypeInterfaceContainerHelperInt32::disposeAndClear(com::sun::lang::EventObject
const&)
/home/noel/libo-tsan/cppuhelper/source/interfacecontainer.cxx:577
(libuno_cppuhelpergcc3.so.3+0x68af0)
9 cppu::OPropertySetHelper::disposing()
/home/noel/libo-tsan/cppuhelper/source/propshlp.cxx:246
(libuno_cppuhelpergcc3.so.3+0x8be45)
10 comphelper::OPropertySetAggregationHelper::disposing()
/home/noel/libo-tsan/comphelper/source/property/propagg.cxx:366
(libcomphelper.so+0x1a0321)
^^^ Mutex M1 previously acquired by the same thread here:
11 frm::OControlModel::disposing()
/home/noel/libo-tsan/forms/source/component/FormComponent.cxx:705
(libfrmlo.so+0x19eecc)
12 frm::ORichTextModel::disposing()
/home/noel/libo-tsan/forms/source/richtext/richtextmodel.cxx:295
(libfrmlo.so+0x267bdb)
13 cppu::OComponentHelper::dispose()
/home/noel/libo-tsan/cppuhelper/source/component.cxx:159
(libuno_cppuhelpergcc3.so.3+0x4504f)
14 non-virtual thunk to cppu::OComponentHelper::dispose()
/home/noel/libo-tsan/cppuhelper/source/component.cxx:?
(libuno_cppuhelpergcc3.so.3+0x45379)
15 frm::OControlModel::disposing()
/home/noel/libo-tsan/forms/source/component/FormComponent.cxx:708
(libfrmlo.so+0x19ef13)
16 frm::OBoundControlModel::disposing()
/home/noel/libo-tsan/forms/source/component/FormComponent.cxx:1340
(libfrmlo.so+0x1a507f)
17 frm::OEditModel::disposing()
/home/noel/libo-tsan/forms/source/component/Edit.cxx:301
(libfrmlo.so+0x161208)
18 cppu::OComponentHelper::dispose()
/home/noel/libo-tsan/cppuhelper/source/component.cxx:159
(libuno_cppuhelpergcc3.so.3+0x4504f)
19 non-virtual thunk to cppu::OComponentHelper::dispose()
/home/noel/libo-tsan/cppuhelper/source/component.cxx:?
(libuno_cppuhelpergcc3.so.3+0x45379)
20 SdrUnoObj::~SdrUnoObj()
/home/noel/libo-tsan/svx/source/svdraw/svdouno.cxx:214
(libsvxcorelo.so+0x6f471b)
21 FmFormObj::~FmFormObj()
/home/noel/libo-tsan/svx/source/form/fmobj.cxx:119
(libsvxcorelo.so+0x3bd8cf)
22 FmFormObj::~FmFormObj()
/home/noel/libo-tsan/svx/source/form/fmobj.cxx:112
(libsvxcorelo.so+0x3bd985)
23 SdrObject::release()
/home/noel/libo-tsan/svx/source/svdraw/svdobj.cxx:486
(libsvxcorelo.so+0x6634df)
24 rtl::Reference<SdrObject>::~Reference()
/home/noel/libo-tsan/include/rtl/ref.hxx:126 (libsvxcorelo.so+0x61610d)
25 void std::destroy_at<rtl::Reference<SdrObject>
>(rtl::Reference<SdrObject>*)
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:88
(libsvxcorelo.so+0x61610d)
26 void std::_Destroy<rtl::Reference<SdrObject>
>(rtl::Reference<SdrObject>*)
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:149
(libsvxcorelo.so+0x61610d)
27 void
std::_Destroy_aux<false>::__destroy<rtl::Reference<SdrObject>*>(rtl::Reference<SdrObject>*,
rtl::Reference<SdrObject>*)
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:163
(libsvxcorelo.so+0x61610d)
28 void
std::_Destroy<rtl::Reference<SdrObject>*>(rtl::Reference<SdrObject>*,
rtl::Reference<SdrObject>*)
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:195
(libsvxcorelo.so+0x61610d)
29 void std::_Destroy<rtl::Reference<SdrObject>*,
rtl::Reference<SdrObject> >(rtl::Reference<SdrObject>*,
rtl::Reference<SdrObject>*, std::allocator<rtl::Reference<SdrObject> >&)
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:948
(libsvxcorelo.so+0x61610d)
30 std::vector<rtl::Reference<SdrObject>,
std::allocator<rtl::Reference<SdrObject> > >::~vector()
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_vector.h:735
(libsvxcorelo.so+0x61610d)
31 SdrModel::ClearModel(bool)
/home/noel/libo-tsan/svx/source/svdraw/svdmodel.cxx:623
(libsvxcorelo.so+0x61610d)
32 SwDrawModel::~SwDrawModel()
/home/noel/libo-tsan/sw/source/core/draw/drawdoc.cxx:108
(libswlo.so+0x714650)
33 std::default_delete<SwDrawModel>::operator()(SwDrawModel*) const
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:99
(libswlo.so+0x5a3082)
34 std::__uniq_ptr_impl<SwDrawModel, std::default_delete<SwDrawModel>
>::reset(SwDrawModel*)
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:211
(libswlo.so+0x5a3082)
35 std::unique_ptr<SwDrawModel, std::default_delete<SwDrawModel>
>::reset(SwDrawModel*)
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:509
(libswlo.so+0x5a3082)
36 sw::DocumentDrawModelManager::ReleaseDrawModel()
/home/noel/libo-tsan/sw/source/core/doc/DocumentDrawModelManager.cxx:162
(libswlo.so+0x5a3082)
37 SwDoc::~SwDoc()
/home/noel/libo-tsan/sw/source/core/doc/docnew.cxx:585
(libswlo.so+0x5457c8)
38 SwDoc::release() /home/noel/libo-tsan/sw/source/core/doc/doc.cxx:129
(libswlo.so+0x4b8993)
39 rtl::Reference<SwDoc>::clear()
/home/noel/libo-tsan/include/rtl/ref.hxx:193 (libswlo.so+0x104c301)
40 SwDocShell::RemoveLink()
/home/noel/libo-tsan/sw/source/uibase/app/docshini.cxx:444
(libswlo.so+0x104c301)
41 SwDocShell::~SwDocShell()
/home/noel/libo-tsan/sw/source/uibase/app/docshini.cxx:372
(libswlo.so+0x104bf36)
42 SwDocShell::~SwDocShell()
/home/noel/libo-tsan/sw/source/uibase/app/docshini.cxx:362
(libswlo.so+0x104c469)
43 non-virtual thunk to SwDocShell::~SwDocShell()
/home/noel/libo-tsan/sw/source/uibase/app/docshini.cxx:?
(libswlo.so+0x104c469)
44 cppu::OWeakObject::release()
/home/noel/libo-tsan/cppuhelper/source/weak.cxx:230
(libuno_cppuhelpergcc3.so.3+0x105ae7)
45 rtl::Reference<SfxObjectShell>::~Reference()
/home/noel/libo-tsan/include/rtl/ref.hxx:126 (libsfxlo.so+0x5209e5)
46 IMPL_SfxBaseModel_DataContainer::~IMPL_SfxBaseModel_DataContainer()
/home/noel/libo-tsan/sfx2/source/doc/sfxbasemodel.cxx:265
(libsfxlo.so+0x5209e5)
47 void
std::destroy_at<IMPL_SfxBaseModel_DataContainer>(IMPL_SfxBaseModel_DataContainer*)
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:88
(libsfxlo.so+0x51f4e6)
48 void
std::_Destroy<IMPL_SfxBaseModel_DataContainer>(IMPL_SfxBaseModel_DataContainer*)
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:149
(libsfxlo.so+0x51f4e6)
49 void std::allocator_traits<std::allocator<void>
>::destroy<IMPL_SfxBaseModel_DataContainer>(std::allocator<void>&,
IMPL_SfxBaseModel_DataContainer*)
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:675
(libsfxlo.so+0x51f4e6)
50 std::_Sp_counted_ptr_inplace<IMPL_SfxBaseModel_DataContainer,
std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose()
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:613
(libsfxlo.so+0x51f4e6)
51 SfxBaseModel::dispose()
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:175
(libsfxlo.so+0x4e7c7c)
52 SwXTextDocument::dispose()
/home/noel/libo-tsan/sw/source/uibase/uno/unotxdoc.cxx:562
(libswlo.so+0x13896e1)
53 SfxBaseModel::close(unsigned char)
/home/noel/libo-tsan/sfx2/source/doc/sfxbasemodel.cxx:1526
(libsfxlo.so+0x4eed16)
54 SwXTextDocument::close(unsigned char)
/home/noel/libo-tsan/sw/source/uibase/uno/unotxdoc.cxx:575
(libswlo.so+0x138999c)
55 non-virtual thunk to SwXTextDocument::close(unsigned char)
/home/noel/libo-tsan/sw/source/uibase/uno/unotxdoc.cxx:?
(libswlo.so+0x1389ad3)
56 gcc3::callVirtualMethod(void*, unsigned int, void*,
_typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int,
unsigned long*, double*)
/home/noel/libo-tsan/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:87
(libgcc3_uno.so+0xd92a)

Change-Id: Ie16fc0ff7462632a591a46025a38344006d43c30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173068
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-09 16:08:42 +02:00
Mike Kaganski
d5da67752e Simplify a bit
Change-Id: I35ca6c1981bff2e7b91f7c1900fd3bdf3f98ef3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172174
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-08-21 15:47:26 +02:00
Mike Kaganski
02c0e5f970 Simplify BSTR construction from OUString a bit
Use the known string length into account (and I definitely like to
not rely on the undocumented implementation detail that OUString is
null-terminated).

Change-Id: I0e7478d25e802f8f8e31f02cf8d77613c1325bc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172170
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-08-21 12:15:36 +02:00
Caolán McNamara
c93eb54c87 cid#1557618 COPY_INSTEAD_OF_MOVE
and

cid#1557535 COPY_INSTEAD_OF_MOVE
cid#1557520 COPY_INSTEAD_OF_MOVE
cid#1557513 COPY_INSTEAD_OF_MOVE
cid#1557503 COPY_INSTEAD_OF_MOVE
cid#1557487 COPY_INSTEAD_OF_MOVE
cid#1557483 COPY_INSTEAD_OF_MOVE
cid#1557479 COPY_INSTEAD_OF_MOVE
cid#1557474 COPY_INSTEAD_OF_MOVE
cid#1557461 COPY_INSTEAD_OF_MOVE
cid#1557446 COPY_INSTEAD_OF_MOVE
cid#1557445 COPY_INSTEAD_OF_MOVE
cid#1557441 COPY_INSTEAD_OF_MOVE
cid#1557435 COPY_INSTEAD_OF_MOVE
cid#1557433 COPY_INSTEAD_OF_MOVE
cid#1557429 COPY_INSTEAD_OF_MOVE
cid#1557375 COPY_INSTEAD_OF_MOVE
cid#1557372 COPY_INSTEAD_OF_MOVE
cid#1557356 COPY_INSTEAD_OF_MOVE
cid#1557350 COPY_INSTEAD_OF_MOVE
cid#1557344 COPY_INSTEAD_OF_MOVE
cid#1557339 COPY_INSTEAD_OF_MOVE
cid#1557332 COPY_INSTEAD_OF_MOVE
cid#1557330 COPY_INSTEAD_OF_MOVE
cid#1557328 COPY_INSTEAD_OF_MOVE
cid#1557323 COPY_INSTEAD_OF_MOVE
cid#1557315 COPY_INSTEAD_OF_MOVE
cid#1557313 COPY_INSTEAD_OF_MOVE
cid#1557304 COPY_INSTEAD_OF_MOVE
cid#1557297 COPY_INSTEAD_OF_MOVE
cid#1557291 COPY_INSTEAD_OF_MOVE
cid#1557290 COPY_INSTEAD_OF_MOVE
cid#1557271 COPY_INSTEAD_OF_MOVE
cid#1557266 COPY_INSTEAD_OF_MOVE
cid#1557262 COPY_INSTEAD_OF_MOVE
cid#1557259 COPY_INSTEAD_OF_MOVE
cid#1557246 COPY_INSTEAD_OF_MOVE
cid#1557242 COPY_INSTEAD_OF_MOVE
cid#1557241 COPY_INSTEAD_OF_MOVE
cid#1557236 COPY_INSTEAD_OF_MOVE
cid#1557228 COPY_INSTEAD_OF_MOVE
cid#1557225 COPY_INSTEAD_OF_MOVE
cid#1557221 COPY_INSTEAD_OF_MOVE
cid#1557217 COPY_INSTEAD_OF_MOVE
cid#1557213 COPY_INSTEAD_OF_MOVE
cid#1557211 COPY_INSTEAD_OF_MOVE
cid#1557209 COPY_INSTEAD_OF_MOVE
cid#1557205 COPY_INSTEAD_OF_MOVE
cid#1557204 COPY_INSTEAD_OF_MOVE
cid#1557193 COPY_INSTEAD_OF_MOVE
cid#1556082 COPY_INSTEAD_OF_MOVE

Change-Id: I07f195a79a69d4bac0d14317854efc88d6fe94d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171927
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-16 09:30:37 +02:00
Michael Weghorn
7247f3ad59 tdf#153343 Show settings for the actual default font in control properties
Since

    commit ea36e0502c
    Date:   Tue Oct 4 12:42:33 2022 +0100

        tdf#150786 use a 'standard' theme for form controls

, form controls in Writer/Calc/Impress documents are
supposed to no longer make use of the system style,
but use style settings independent of the platform
and system style/theme.

Edits in forms actually use the standard font (set
in `ImplStyleData::SetStandardStyles`) by default
since that commit.

However, the font dialog in the control properties
was still showing data for the application default
font that depends on the system style for font
attributes not explicitly set for the control, which
was incorrect and inconsistent with the visual
appearance of the font actually used.

Take `PROPERTY_STANDARD_THEME` introduced in the
above-mentioned commit into account for the dialog
as well when deciding what default font to use.
Add inline comments that the 2 places setting and
making assumptions about the default style of
controls need to be kept in sync.

With this in place, the actually used font height
of 8 (as set in `ImplStyleData::SetStandardStyles`)
is now displayed in the dialog for a newly inserted
edit in Writer instead of something dependent on the
style (e.g. 10 for the kf5 VCL plugin with the Breeze
style in use, or 9 for the qt6 VCL plugin with the Fusion
style).

For the font family, the dialog now shows
"Segoe UI;Tahoma;Arial Unicode MS;Lucida Sans Unicode;DejaVu Sans;Albany AMT;Albany;Arial;Nimbus Sans L;Interface User;Geneva;Dialog;Lucida;Helvetica;Helmet;Interface System;Sans Serif"
(and "This font has not been installed. The closest available
font will be used.") instead of "Noto Sans", which seems a bit
odd, but is presumably "correct" based on the standard style
font. (In order to change that, it would potentially be necessary
to adjust what style settings are set in the
"standard style settings" for controls.)

Change-Id: I1fbee69fdcd6f73a126df64294eb1bcc44078642
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171426
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-08-02 18:34:08 +02:00
Caolán McNamara
4177e553e0 cid#1555587 COPY_INSTEAD_OF_MOVE
and

cid#1555589 COPY_INSTEAD_OF_MOVE
cid#1555593 COPY_INSTEAD_OF_MOVE
cid#1555596 COPY_INSTEAD_OF_MOVE
cid#1555602 COPY_INSTEAD_OF_MOVE
cid#1555608 COPY_INSTEAD_OF_MOVE
cid#1555610 COPY_INSTEAD_OF_MOVE
cid#1555620 COPY_INSTEAD_OF_MOVE
cid#1555623 COPY_INSTEAD_OF_MOVE
cid#1555625 COPY_INSTEAD_OF_MOVE
cid#1555626 COPY_INSTEAD_OF_MOVE
cid#1555634 COPY_INSTEAD_OF_MOVE
cid#1555638 COPY_INSTEAD_OF_MOVE
cid#1555667 COPY_INSTEAD_OF_MOVE
cid#1555682 COPY_INSTEAD_OF_MOVE
cid#1555686 COPY_INSTEAD_OF_MOVE
cid#1555702 COPY_INSTEAD_OF_MOVE
cid#1555710 COPY_INSTEAD_OF_MOVE
cid#1555750 COPY_INSTEAD_OF_MOVE
cid#1555752 COPY_INSTEAD_OF_MOVE
cid#1555761 COPY_INSTEAD_OF_MOVE
cid#1555762 COPY_INSTEAD_OF_MOVE
cid#1555771 COPY_INSTEAD_OF_MOVE
cid#1555772 COPY_INSTEAD_OF_MOVE
cid#1555784 COPY_INSTEAD_OF_MOVE
cid#1555785 COPY_INSTEAD_OF_MOVE

Change-Id: Ib9724230c05b2027b4edf64e6a0bb5e22a270a88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171274
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-31 17:37:14 +02:00
Gabor Kelemen
e1a351ca19 Remove now unneeded osl/diagnose.h
followup to commit 57c228803e

Change-Id: Iebfb23bb65e2bf898bf27f367cc9641f47a14cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167998
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2024-07-20 10:20:31 +02:00
Xisco Fauli
83a8d5a275 BootstrapFixture: get rid of mxComponentContext
Change-Id: I0318485c3c0159277e47096e0c7e0df8ed109ea4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169865
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-07-02 15:35:00 +02:00
Andrea Gelmini
2a69521271 Fix typo
Change-Id: I1835209f48896e01af2cb3fad10a758b704087dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169515
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-06-25 13:54:46 +02:00
Taichi Haradaguchi
4220b8be72 Add newline at end of file
Change-Id: I731d8d80e075c8df8a104ec963b89337a91d536c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169376
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
Tested-by: Jenkins
2024-06-24 23:21:36 +02:00
Bogdan Buzea
6b04c3ff86 Resave with newer Glade version
Change-Id: Ia4b40678632d825143c7e9ac2e8719b7e109a64a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169410
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2024-06-24 13:44:09 +02:00
Bogdan Buzea
5412dba69b Resave with newer Glade version
Change-Id: I970e33e166efe611dbaae16ab0ed6491298a6751
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169409
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2024-06-24 02:08:13 +02:00
Andrea Gelmini
758f1230f8 Fix typo
Change-Id: I0a68063a64d0a80b521cd69a1abf146476f27bee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169169
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-06-19 08:37:25 +02:00
Andrea Gelmini
bbf9d0a934 Fix typo
Change-Id: I080533a791c8ad0034b4b24ea630c6ab7265e31e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169171
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-06-19 08:33:26 +02:00
Andrea Gelmini
e5f1b4cdec Fix typo
Change-Id: I33b497fd707e5100d0a03cf9868b0627859922ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169178
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-06-19 08:28:39 +02:00
Caolán McNamara
a551290fc4 WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: Ia64d863baa72a2d32a8bee40968af4f6aacd88bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167332
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-05-08 15:11:42 +02:00
Noel Grandin
f49d8ce461 loplugin:ostr in extensions
Change-Id: I32f74fe67e8eb0b6b12ee60405c3d99932b75182
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167284
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-07 18:15:14 +02:00
Caolán McNamara
3752d82833 WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: I68acd56b28b0f989a4010cd939f2452970d158ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167103
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-04 14:19:55 +02:00
Christian Lohmaier
0c4c84a14b makefile simplification: replace $(call gb_CustomTarget_get_workdir,foo)
…by a simple/static $(gb_CustomTarget_workdir)/foo

The build system has a lot of overly complicated leftovers from when it
was introduced and had not only deal with split repositories but also
had to coexist with another buildsystem. Along with lots of copy'n'paste
along the years the makefiles became hard to grasp for newcomers with
all our calls and evals.
As a first step to streamline that, the macros from TargetLocations that
simply prefix a static path to the argument (and similar of the same
kind) are a natural pick before simplifying the rules themselves/getting
rid of a bunch of eval statements.

Change-Id: Ia06dbbcd5d1994755a2ff05b84f72ccbc4e3cab5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167005
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-05-03 16:06:14 +02:00
Caolán McNamara
a2623abe07 WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: I498c10e8bc134b41e3606d8a05cf3103a9274735
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166937
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-30 22:04: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
AmandaQuaresmaCoutinho
ccebd10bc4 tdf#148251 Use std::swap instead of using temporary values
Change-Id: I7629d86b8f85a493bd3ad6b9c465a81c746b1dab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165802
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-04-08 20:45:39 +02:00
Gabor Kelemen
7f2af61f1a tdf#146619 Drop unused 'using namespace' in: extensions/
Change-Id: I3581cc8eb2414161ecb81a4ebcedd7b3b391c642
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165571
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-04-08 15:09:50 +02:00
Stephan Bergmann
9adcf67c9b Drop C/C++ DEBUG macro
...(that was defined iff OSL_DEBUG_LEVEL >= 2) and replace its uses with
OSL_DEBUG_LEVEL directly

Change-Id: I807c15a02cc8ced9852287df0afb4808761d19d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165067
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-03-21 16:30:59 +01:00
AhmedHamed
9786fb8b94 tdf#145538 Use range based for loops
Change-Id: I62ed915f3ac398ffdffb0a47e40ce23f0a893b3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163885
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-02-27 07:26:36 +01:00
Mike Kaganski
276f8ef880 Use SHGetKnownFolderPath to avoid MAX_PATH limitation
Change-Id: Icba230fedc9e6071d3817454f55d4533727e3aa2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163916
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-26 02:24:46 +01:00
Mike Kaganski
d37df8fd1a Fix warning C4312 when building with MSVC without -Wv:18
Discovered by https://gerrit.libreoffice.org/c/core/+/163717

Like these:

 C:/lo/core/sw/source/ui/dbui/addresslistdialog.cxx(426): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size

Change-Id: Idbfbe8add89c8e219bdabcf28b741e2e31a5e345
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163781
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-23 01:35:14 +01:00
Mike Kaganski
ff23937c34 Fix warning C4459 when building with MSVC without -Wv:18
Discovered by https://gerrit.libreoffice.org/c/core/+/163717

Like these:

 C:/lo/core/oox/source/export/shapes.cxx(2411): warning C4459: declaration of 'XML_line' hides global declaration

Change-Id: I74738753254ad1c468025d25bfb0bfe21787180f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163779
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-23 01:34:45 +01:00
Armin Le Grand (allotropia)
9bd2012df7 ITEM: Speedup SlotIDToWhichID translations
With ItemInfoPackages we now can have a buffered, static
global translation table from SlotIDs to WhichIDs since
the ItemInfoStatic used already contains all the needed
information.
Register that in registerItemInfoPackage at the Pool and
use it for lookup. That speeds up the lookup from O(n)
to O(1). Since that lookup is used in UI and UNO API
implementations this has positive effect on load/safe,
but also all interactive stuff in the whole office.

NOTE: I tried to use a merged version of that translation
table in the parent pool, but this shows double SlotIDs,
what is no wonder since that's what those are used for:
To get different WhichIDs for a SlotID in Item handling.
This *might* prevent getting rid of the chanined Pools
at all - sadly. The returned WhichID directly depends
on which Pool the function(s) GetWhichIDFromSlotID and
GetTrueWhichIDFromSlotID are called.

NOTE: Very strange is that the parameter 'bDeep' in that
functions is *not* passed down to the call to the
secondary Pool - probably an error, but risky to fix,
that may change already the behaviour :-(

Change-Id: Iea77ffad0f6a5401ab74fea0bbfc2589c66680ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163597
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-19 20:04:34 +01:00
Armin Le Grand (allotropia)
625fa07d33 ITEM: corrected error for SfxSetItem
Secured usage of FontList in SvxFontListItem
usage (a test)

Change-Id: I412a7681b3ece4e5d3751165d4b566ccdf5b2da9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163257
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-13 16:54:34 +01:00
Armin Le Grand (allotropia)
ca3c6d468f ITEM: ItemPool Rework (I)
Driving forward the Item reworks I now take the
ItemPool in focus: It now does not hold any items
anymore and should be renamed to something like
ItemInfoProvider/ItemHelper, since it's main purpose
is to provide the Defaults for the Item functionality.

There is that SfxItemInfo, only a struct and bundling
SlotID and ItemFlags. There are also the DefaultItems,
just handled as ptrs in an array. It is/was always
error-prone to keep these in sync. Remember that it's
also necessary for the order to not only being sorted
but being increments of one with no gaps allowed in
the WhichIDs to which the Items are bound.

I now bundled that to a new class ItemInfo that joins
WhichID, SlotID, ItemFlags and the default Item. This
is a pure virtual base class, it comes in three
derivations:

(1) ItemInfoStatic:
This is supposed to be global static and hosts the
Item in a std::unique_ptr to ensure cleanup. It is
designed to be constructed once during runtime and
being shared globally. It allows the ItemPtr to be
nullptr to mark as non-static (if initial static is
not possible for some reason) but still offers the
needed data. Most cases (95%+) are of that case.
The contained Item is owned by that instance. The
flag isStaticDefault() is set at the Item.

(2) ItemInfoDynamic:
This is supposed to be used for cases where the Item
cannot be static: Mainly for SfxSetItem (that needs
a Pool itself in the contained SfxItemSet, so lifetime
is bound to that Pool), but other cases showed up in
the transition. These instances live while the Pool
lives and get destructed when the Pool goes down.
Also uses std::unique_ptr for the Item instance for
as much automated cleanup as possible, the contained
Item is owned by that instance, the instance by the
Pool. The flag isDynamicDefault() is set at the Item.

(3) ItemInfoUser:
This is used for UserDefaults that can be set for
every ItemInfo entry to 'overshadow' the default
from the 'outside'. It uses a regular Item and
the central access methods implCreateItemEntry/
implCleanupItemEntry to manage the Item instance,
thus works like a SfxPoolItemHolder. The Item
instance can be globally shared and re-used even
when the Pool goes down. Instances belong to the
Pool and are cleaned up when the Pool goes down.
This Item does not need any further flag to be
set.

The ItemInfos are organized using a class
called ItemInfoPackage:

This bundles groups of ItemInfoStatic to
functional instances. There are derivations/
implementations of this e.g. for Writer ItemPool
bundling all the needed defaults for Writer,
similar for draw/impress, Calc and other usages.

These ItemInfoPackage can be 'registered' at an
ItemPool using it's method registerItemInfoPackage.
This does all the needed stuff to setup that
group of ItemInfos at the Pool (It even sets
internal vars First/LastWhich, that info can just
be derived from the buildup ItemInfo Ptrs).

The ItemInfoPackage has methods 'size()' and
'getItemInfo(index) to allow looping over it
and deliver the infos the Pool needs. The
(forced, pure virtual) overloads of getItemInfo
in the specific implementations check for the
ItemPtr being nullptr and create a exclusive
incarnation of ItemInfoDynamic for the Pool if
needed, returning that. The Pool owns the
ItemInfoDynamic incarnations and uses the
ItemInfoStatic directly. On shutdown it cleans
up the ItemInfoDynamic as needed.

The ItemInfoUser is used by the Pool when a
UserDefault is set/used: for SetUserDefaultItem,
GetUserDefaultItem, ResetUserDefaultItem. It
is not held in a 2nd list, but directly in the
list of ItemInfo'ptrs: To keep track of this
an unordered_map is used that helds the original
ItemInfo associated with the WhichID. That way
no two lookups (as before) are needed to get the
current Pool's default for any WhichID.

The derivations of ItemInfoPackage are
encapsulated and just allow access to an
ItemInfoPackage& with a single method as
return value. All use a static local instance
of a std::array<ItemInfoStatic, FIXED_SIZE>
which constructs all ItemInfoStatic and the
static Item instances - if already possible.
Sometimes it is necessary to overload the
constructor to set some static instances
for Items later than the lib init. These are
also just marked with nullptr as Item instance.
Some need to overload getItemInfo to complete
instances of ItemInfoStatic, if needed, or
create and deliver instances of ItemInfoDynamic.

The registerItemInfoPackage also offers a
optional lambda callback: there were two cases
where local data from the Pool was needed to
incarnate the item - just add that to the
call to registerItemInfoPackage if needed,
see examples in the adapted code.

For the re-use of Items this means that now
in SfxItemSet/SfxPoolItemHolder *true* static
Items can and will be used without RefCount
directly and globally. This is also the case
for dynamic Items, with the exception of
differing Pools for SfxSetItems which cannot
be done.

Future:
That design is already prepared to allow
solving that Pool-chaining problem: currently
there are master/sub-pools and all accesses
have to traverse that structure before even
doing anything.
For the future the idea is more to 'compose'
a Pool by registering ItemInfoPackages, e.g.
for Writer pool you may start with SfxItemPool,
register the writer-specific ItemInfoPackage,
then the one for DrawingLayer (if needed) and
the one for EditEngine.
It should also be possible to get to smaller
granularities of that packages. Ideas for
new ones will emerge. We might also think
about composing Pools which can e.g. run Writer
and Chart, so allowing to use Chart *without*
OLE stuff in Writer - just ideas...

More changes:
- Adapted all stuff, cleaned up old stuff/
  definitions
- Removed FreezeIdRanges, that can be done
  once per Pool on-demand (and cannot be
  forgotten to be called)
- Merged XOutdevItemPool with SdrItemPool
  and offered a ItemInfoPackage which joins
  both needed sets of Items
- All the cleanup hassle with Pools and
  defaults cleaned up
- Adapted all access methods of the pool
  to use that new stuff. Pool chaining
  currently stays, but I use a central
  method 'getTargetPool' instead of
  recursive calling to get the correct
  Pool for the action

Change-Id: I2b8d3d4c3cc80b1d0d0b3c0f4bd90d7656b4bab7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163157
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-12 10:35:33 +01:00