155 Commits
Author SHA1 Message Date
Michael Weghorn ec99b899d4 vcl: Pass SvLBoxItem::Paint's SvVieweDataEntry param by ref
... instead of by pointer.

This makes clear it's always non-null.

Change-Id: Iea22c33171572eec0533550293a793372d889ee9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211569
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-29 19:40:29 +02:00
Michael Weghorn 32ec401003 vcl: Drop SvLBoxContextBmp::m_bExpanded
Together with the expanded state, SvLBoxContextBmp::m_bExpanded
is used in SvLBoxContextBmp::Paint to decide which image
(SvLBoxContextBmp::m_aImage1 or SvLBoxContextBmp::m_aImage2)
to draw.

There are 2 actual scenarios used for that member:

1) The member is set to true, with (potentially) different images
  set. (Used in ImplContextGraphicItem.)
2) The member is set to false, with the same image
  set for both images. (Used in SalInstanceTreeView
  and SalInstanceIconView).

For 2), it doesn't matter which of the two images is used,
as they are the same anyway.

For 1), the

    const Image& rImage = pView->IsExpanded() != m_bExpanded ? m_aImage1 : m_aImage2;

can be simplified to just

    const Image& rImage = !pView->IsExpanded() ? m_aImage1 : m_aImage2;

to make more obvious that SvLBoxContextBmp::m_aImage1 is
used for the case where the entry is not expanded and
SvLBoxContextBmp::m_aImage2 is used when the entry is expanded.

Drop SvLBoxContextBmp::m_bExpanded to simplify this accordingly.

Change-Id: I94b06ef87f002a1f35591021225d1858631afb44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206969
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-20 22:23:14 +02:00
Michael Weghorn fa08175637 vcl: Pass SvTreeListBox::GetViewDataItem entry param by ref
It's always non-null.

Change-Id: I3f8f657a6a35ddd5b593366be2e4bd923087ff56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206965
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-20 22:22:44 +02:00
Michael Weghorn 469f96ce18 vcl: Pass SvLBoxItem::GetWidth entry param by ref
It's always non-null.

Change-Id: Iff2780f77a57e9109f1d7555c53e1419ddd073cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206964
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-20 22:22:36 +02:00
Michael Weghorn 6649bdfb80 vcl: Pass SvLBoxItem::GetHeight entry param by ref
It's always non-null.

Change-Id: Idb5be3f643bc515fd21e64de9dcc1b65f1cb2f23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206812
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-20 22:22:11 +02:00
Michael Weghorn aba65f6ba6 toolkit: Drop UnoTreeListBoxImpl::insert, use base class method
Use SvTreeListBox::Insert directly, which is perfectly fine
with a null parent param (at least) with previous changes
up to

    Change-Id: I07e12a6f3b3e9c96df79129e19f9331a64588830
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jun 17 10:25:17 2026 +0200

        vcl: Consolidate to one SvTreeListBox::Insert

in place.

Change-Id: I6c4a68a23b36df66635ef8836ffc45c7a751ef29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206791
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-20 22:19:09 +02:00
Michael Weghorn 39c1fd1c70 vcl: Switch order of SvTreeList::Insert params to prepare for default arg
Change the order of the 2nd and 3rd parameter
of SvTreeList::Insert and SvTreeListBox::Insert.

This prepares for providing a default value of
nullptr for the third parameter in
SvTreeListBox::Insert and dropping the
SvTreeListBox::Insert variant that only takes
2 params.

Change-Id: Ibea425c37a856cbece484fc2f7fbcd12b42ea235
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206788
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-20 00:51:14 +02:00
Michael Weghorn a346db6129 vcl: Use existing SvTreeListBox::InvalidateEntry
That one already gets the model to call
SvTreeList::InvalidateEntry, so no need to
do that manually in more places.

Change-Id: I52c8b883353b8eec19c642ff7a00ddb3fbd01802
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206748
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-20 00:50:08 +02:00
Michael Weghorn deb7aeea1b vcl: Pass SvTreeList::InvalidateEntry entry param by ref
It's always non-null.

Change-Id: I92d82e6b5e8e89549b487e38c1deea284991ca78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206746
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-20 00:49:50 +02:00
Michael Weghorn 4a4fa030e3 toolkit: Pass TreeControlPeer::updateEntry entry param by ref
The passed entry is always non-null.

Change-Id: Iac495b886eeb92f780ca2dba2c3b0b92375af0cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206745
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-20 00:49:42 +02:00
Michael Weghorn edf75efdad vcl/toolkit: Use existing SvTreeListBox::RemoveEntry
Use the existing SvTreeListBox method that removes
the entry from the model instead of manually
removing from the model directly.

This requires to pass a non-const SvTreeListBox
to TreeControlPeer::updateChildNodes.

Change-Id: Idefc7f25a5d22bcba765541c73101e888d42e225
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206741
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-19 18:13:41 +02:00
Michael Weghorn 6455e513a3 vcl: Pass SvTreeListBox::RequestingChildren entry param by ref
This makes clear that it's always non-null.

Change-Id: I2ac3b32ef4bb438bca09225dddd8cb6d5cf1b0b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206724
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-19 18:10:58 +02:00
Michael Weghorn b21adb27bf vcl: Pass SvTreeListBox::Expand entry param by ref
This makes clear that this is always non-null.
The method implementation unconditionally dereferences
the argument.

Change-Id: I5c0e2576b3abf4347cd18349b79656ab73bae5d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206723
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-19 18:10:51 +02:00
Michael Weghorn 8a9ca4fb6a toolkit: Drop always true bExpanded param for ImplContextGraphicItem
Just hard-code passing true to the base class ctor as the
ImplContextGraphicItem ctor is always called with a value
of true.

Change-Id: I5437e049daf570d693445a7431ed61f17b6dfffa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206397
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-17 06:09:32 +02:00
Michael Weghorn b702d3c634 vcl: Pass SvLBoxItem::InitViewData entry param by ref
This makes clear that it's always non-null.

Change-Id: I1da8eb71a9941d414c890686f0eac0263a93de7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206394
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-16 19:17:17 +02:00
Michael Weghorn 1d261e4885 vcl: Pass SvTreeListBox::Set{Expanded,Collapsed}EntryBmp entry param by ref
This makes clear that the param is always
non-null.

Change-Id: I3ade03e24097ba239c67c0e23e7e8f32715b3ced
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206391
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-16 19:16:59 +02:00
Michael Weghorn 13b3fe799e toolkit: Flatten TreeControlPeer::createEntry
Return early if mpTreeImpl is null, which allows
to get rid of one nesting level further down.

Change-Id: I75fa1d7838bb83fe1340935f2f3db09f86a45253
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206311
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-11 21:43:00 +02:00
Michael Weghorn 059f3dc5f6 toolkit: Merge TreeControlPeer::updateNode into only caller
Change-Id: I1f69073cc8924d4a0a23f41cbd32db6619f92ad5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204924
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-11 09:27:03 +02:00
Michael Weghorn 8a0d5e9e30 toolkit: Drop logic conditional on empty Sequence having element
`Nodes` is created with the default Sequence ctor, i.e.
as an empty Sequence. Since no element is inserted afterwards,
it is still empty and has no element, so there is no point
in checking whether it has any.

Drop the corresponding logic altogether.

Change-Id: I3c5e83c950d383251f713fd6ddb20554e7ad2a97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204923
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-11 09:26:55 +02:00
Michael Weghorn e020b6054c toolkit: Move check into TreeControlPeer::updateTree
All 4 callers check whether TreeControlPeer::mnEditLock
is non-zero and return early in that case. Deduplicate
that by moving the check into TreeControlPeer::updateTree
itself.

Change-Id: I650e2a9e2d256a609290e288ba850f490d071929
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204922
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-11 09:26:47 +02:00
Michael Weghorn d32784ead8 toolkit: Switch broadcast_type to enum class
Also use more usual camel case for the names.

Change-Id: Idedae71a077626093e0a7ed875aeed39418ee7f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204921
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-11 09:26:33 +02:00
Michael Weghorn 0d1b56cadf toolkit: Use actual UNO iface name in comment
The methods overriden here are from the
css::awt::tree::XTreeDataModelListener UNO interface.

Clarify the comment in the header, and drop the
duplicate comment in the source file.

Change-Id: I0481202df14601935601f69b38099f58db5d80d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204920
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-11 09:26:08 +02:00
Michael Weghorn dbac00de0b vcl: Pass SvTreeListBox::EditedEntry item param by ref
Change-Id: I6568e29a17b2710c2a14819e8665f9ba21ddeb79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204538
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-29 20:38:42 +02:00
Michael Weghorn 80a876c9e3 vcl: Pass SvTreeListBox::GetViewDataItem item param by ref
Change-Id: I7e391bdca8ecdc6bbd8614b7cd67f396212999d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204536
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-29 20:38:27 +02:00
Michael Weghorn b6dc3ce75d vcl: Also pass the item in treeview callback when entry edited
So far, the callback called when a SvTreeListBox
entry was edited contained the SvTreeListEntry
and the new text of the entry.

Pass also the entry's item (SvLBoxItem) in addition,
so the handler can take that into account.

This will be used in an upcoming commit to extend
weld::TreeView::signal_editing_done to also pass
the index of the edited column.

Change-Id: Iad2866d8fcc710d82f4f0dc0661a3b1f0bebaeab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204303
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-26 18:09:18 +02:00
Michael Weghorn 504d1aa22e vcl: Use SvTreeListEntry reference instead of ptr in IterString
Switch SvTreeListBox::EditedEntry to take a reference instead
of pointer param and also use a reference in IterString.

Change-Id: I9597ff94978c4f25440d1b41b8c99985928258e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204295
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-04-26 18:09:10 +02:00
Michael Weghorn b0ff66bbb7 vcl: Return ref in SvTreeListBox::GetViewDataItem (II)
Similar to previous commit

    Change-Id: Id39e551d54f4dc20ab7d7e33d52ed5cea308e1ce
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Apr 24 12:12:01 2026 +0200

        vcl: Return ref in SvTreeListBox::GetViewDataItem

, also switch the non-const variant to return a reference
instead of a pointer.

Change-Id: I31bef6a251c873c220171e17db1dfd4a82ddadbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204292
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-26 18:08:44 +02:00
Robert Marcano 2d20c7f496 tdf#143148 Use pragma once instead of include guards
Change-Id: Iad316b8ca0f443c545b341c62ab30bbe22fca380
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203250
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-04-07 08:37:24 +02:00
Michael Weghorn 1e14da903b vcl: Pass SvLBoxItem::InitViewData's first param by ref
... instead of by pointer.
This also allows to drop one superfluous null check
in SvLBoxButton::InitViewData.

Change-Id: Iefbfc4c701effefbc618f2eaa0b101edbd6ee176
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202346
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-03-24 08:07:04 +01:00
Michael Weghorn 441584ea53 vcl: Pass SvLBoxItem::Get{Width,Height}'s SvTreeListBox param by ref
... instead of by pointer.

Change-Id: I077dfed17bf2dad6e503d2e5c69cf670b089c4de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202344
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-03-24 08:06:25 +01:00
Gabor Kelemen 94d987edc2 tdf#146619 Use more forward declarations in include/toolkit
Change-Id: I46b4f8c398662b2826f7e4bf90f43750e3569667
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198240
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-02-07 00:41:15 +01:00
Noel Grandin e6211a4b3b BitmapEx->Bitmap in various
now that Bitmap supports transparency

Change-Id: If946687832cf30db70db9749e5aeed38ab1490c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190149
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-25 12:59:18 +02:00
Michael Weghorn 3d780e72b9 Move helpers for css::awt/VCL point/rect/size to vcl::unohelper
Move helpers to convert between the Rectangle, Point and Size
classes in vcl and in css::awt from VCLUnoHelper (in the toolkit module)
to vcl::unohelper (in the vcl module), for reuse in vcl in upcoming
commits.

Change-Id: I7b11c8a6b8c843a01ce25b1e4c0fb1869ad1e6ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177816
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-04 20:47:14 +01:00
Xisco Fauli c73c69db6b tdf#163486: PVS: fix copy&paste error
Since
commit 32cd4a92ef
Author: Jens-Heiner Rechtien <hr@openoffice.org>
Date:   Wed Jun 27 11:18:37 2007 +0000

    INTEGRATION: CWS awttree01 (1.1.2); FILE ADDED

V524 	It is odd that the body of 'removeSelectionChangeListener' function is fully equivalent to the body of 'addSelectionChangeListener' function.

Change-Id: I807520da4515ae8dfb070b29aa772bab1ade592b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175254
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-20 16:15:22 +02:00
Caolán McNamara 23d7910c1e cid#1554844 COPY_INSTEAD_OF_MOVE
and

cid#1554878 COPY_INSTEAD_OF_MOVE
cid#1554907 COPY_INSTEAD_OF_MOVE
cid#1555082 COPY_INSTEAD_OF_MOVE
cid#1555224 COPY_INSTEAD_OF_MOVE
cid#1555301 COPY_INSTEAD_OF_MOVE
cid#1555378 COPY_INSTEAD_OF_MOVE
cid#1555395 COPY_INSTEAD_OF_MOVE
cid#1555452 COPY_INSTEAD_OF_MOVE
cid#1555466 COPY_INSTEAD_OF_MOVE
cid#1555514 COPY_INSTEAD_OF_MOVE
cid#1555566 COPY_INSTEAD_OF_MOVE
cid#1555753 COPY_INSTEAD_OF_MOVE
cid#1555782 COPY_INSTEAD_OF_MOVE
cid#1555825 COPY_INSTEAD_OF_MOVE
cid#1555842 COPY_INSTEAD_OF_MOVE
cid#1555891 COPY_INSTEAD_OF_MOVE
cid#1555917 COPY_INSTEAD_OF_MOVE
cid#1555961 COPY_INSTEAD_OF_MOVE
cid#1556021 COPY_INSTEAD_OF_MOVE
cid#1556055 COPY_INSTEAD_OF_MOVE
cid#1556307 COPY_INSTEAD_OF_MOVE
cid#1556349 COPY_INSTEAD_OF_MOVE
cid#1556436 COPY_INSTEAD_OF_MOVE
cid#1556665 COPY_INSTEAD_OF_MOVE
cid#1556696 COPY_INSTEAD_OF_MOVE
cid#1556718 COPY_INSTEAD_OF_MOVE
cid#1556775 COPY_INSTEAD_OF_MOVE
cid#1556835 COPY_INSTEAD_OF_MOVE
cid#1556877 COPY_INSTEAD_OF_MOVE
cid#1556994 COPY_INSTEAD_OF_MOVE
cid#1557010 COPY_INSTEAD_OF_MOVE
cid#1557074 COPY_INSTEAD_OF_MOVE
cid#1557111 COPY_INSTEAD_OF_MOVE
cid#1557142 COPY_INSTEAD_OF_MOVE
cid#1557163 COPY_INSTEAD_OF_MOVE
cid#1557164 COPY_INSTEAD_OF_MOVE
cid#1557214 COPY_INSTEAD_OF_MOVE
cid#1557254 COPY_INSTEAD_OF_MOVE
cid#1557322 COPY_INSTEAD_OF_MOVE
cid#1557327 COPY_INSTEAD_OF_MOVE
cid#1557492 COPY_INSTEAD_OF_MOVE
cid#1557565 COPY_INSTEAD_OF_MOVE
cid#1557663 COPY_INSTEAD_OF_MOVE
cid#1557798 COPY_INSTEAD_OF_MOVE

Change-Id: I2ae9c184dcc18d44a65437e18c49e16b27f4d81d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174893
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-14 15:28:24 +02:00
Michael Weghorn 2fdee9fd60 Unify/Port to use VCLUnoHelper for AWT <-> VCL conversions
Following

    Change-Id: Id48f81deb05aee2026509037f7d14575735e5be0
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 10 14:49:03 2024 +0200

        VCLUnoHelper: Align AWT <-> VCL helpers with convert.hxx impl

, port all uses of the helper functions defined in
`include/toolkit/helper/convert.hxx` to use the
`VCLUnoHelper` equivalents instead, to unify usage
and avoid duplication.

Drop `include/toolkit/helper/convert.hxx` now that
it's unused.

Change-Id: I22695a93e40e47bb2b14d191a2e0a4eb7c856895
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170317
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-11 06:44:48 +02:00
Noel Grandin ea49dde289 loplugin:ostr in toolkit
Change-Id: Ia70d03713bfb7621196d2bd12473d3cf1c2ef1b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167654
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-15 14:22:39 +02:00
AhmedHamed e6ecd5a32c tdf#114441 Convert sal_uLong to sal_uInt32 in TreeControlPeer
We are talking about a tree list in a gui which logically will not exceed sal_uInt32
They also must be unsigned integers because they represent counts & positions

changes are done to these variables:
- nPos (node position)
In all base classes you will found that all functions deal with and return sal_int32 concerning it
- nChild (node child)
It is assigned to TREELIST_APPEND which is MAX for sal_uInt32 and it is considered like that in all other functions
- nSelectionCount
all functions that deal with it (like GetSelectionCount()) returns sal_uInt32

Change-Id: I1771b9aa52c351063d007d7014484861d4b3e02a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164067
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-02-28 08:16:19 +01:00
Noel Grandin 1914124c6a loplugin:fieldcast in MutableTreeDataModel
Change-Id: I713db74dac43a61fe98ab18834e0dd6e24117caa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159097
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-08 09:22:40 +01:00
Mike Kaganski 367891c40e Use getXWeak in toolkit
Change-Id: I44a0ddd386ea6d262d6102b40f3e9837655068ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150877
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-20 12:22:18 +02:00
Noel Grandin d9ecb98b30 MutableTreeDataModel does not need to implement XAggreggation
Checked on jenkins using 'make check' and

+void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { assert(false); }

Change-Id: I81b0c46be19bfafb220f0ae908eedfd9c5b20b71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156726
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-10 16:11:09 +02:00
Noel Grandin cd52832249 move a toolkit header inside the module
It is only used inside the module, no need to be public

Change-Id: Ibd8445ecbb67624569ee7225f0bdf6d9c041dab4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151569
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-09 18:12:21 +02:00
Noel Grandin 31e2b4746a improve some usage of OInterfaceIteratorHelper4
we can drop the lock immediately after construction (since
the iterator holds a thread-safe COW link to the underlying listener
container)

Change-Id: I08f8fa9ed7393747938572097f3c25f5f3f847fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151440
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-07 08:00:46 +02:00
Noel Grandin 30784e55e4 convert UnoControlModel and friends to use std::mutex
Which means creating a variant of the cppuhelper::OPropertySetHelper
helper class which uses a std::mutex.
Since we can do virtual base classes now (which the original could not), use that and a new helper
class comphelper::UnoImplBase to share
    std::mutex m_aMutex;
    bool m_bDisposing;
fields that the OPropertySetHelper wants to share with the parent class.

Change-Id: I05ad465a3d3653ed4e109137e3e1c58190da8d97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148474
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-13 06:49:21 +00:00
Noel Grandin b8ef33f1a2 BaseMutex->std::mutex in MutableTreeDataModel
Change-Id: I9028c0ac35b2f375ef0d72201ca4b9f8eb99c7b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148477
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-08 14:56:11 +00:00
Noel Grandin c405820c8e deduplicate MutexAndBroadcastHelper
there are two very similar classes, standardise on the one in
include/comphelper

Change-Id: If85729dcea01e65a2d095bb211fe643c783ebf1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148442
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-08 12:38:51 +00:00
Noel Grandin 1f49d8ad7a BaseMutex->std::mutex in ListenerMultiplexerBase
Change-Id: Icd565c83ca3b4afb1a846a637b7943b0498487e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147457
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-22 11:47:11 +00:00
Stephan Bergmann 579d144290 Fix some toolkit UnoControlBase derivates' queryAggregation
The base UnoControl uses WeakAggImplHelper9, so (for better or worse) derives
from XAggregation, but UnoGridControl, UnoRoadmapControl, and UnoTreeControl all
failed to properly implement the XAggregation protocol.

Change-Id: Ia1676782e616216f645dc86ba978c2f5887dc508
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145767
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-19 09:53:24 +00:00
Stephan Bergmann 19691c3b68 Revert all the recent loplugin:unocast changes
...as obsoleted by ef53355355 "Rudimentary support
for dynamic_cast on UNO proxy objects".

This reverts all of:
4cfcc9ac37 "loplugin:unocast (framework::Desktop)"
03efbf72f4 "loplugin:unocast
 (vclcanvas::TextLayout)"
80099fdd51 "loplugin:unocast (SalGtkXWindow)"
cc147f576d "loplugin:unocast
 (sdext::presenter::CachablePresenterView)"
40db42be1d "loplugin:unocast
 (vclcanvas::CanvasFont)"
2d1e7995ea "loplugin:unocast (CairoColorSpace)"
4c0bbe4bd9 "loplugin:unocast
 (canvas::ParametricPolyPolygon)"
8980366662 "loplugin:unocast
 (vclcanas::CanvasBitmap)"
d5e0c2c8db "loplugin:unocast
 (sfx2::DigitalSignatures)"
c0c4519e0d "loplugin:unocast
 (VCLXAccessibleComponent)"
feb8b833a6 "loplugin:unocast (VCLXDialog)"
1fa58cc6cc "loplugin:unocast (VCLXMultiPage)"
f481f036de "loplugin:unocast
 (DocumentSettingsSerializer)"
73df933f5f "loplugin:unocast
 (css::embed::EmbeddedUpdate)"
420165ab0e "loplugin:unocast
 (canvas::tools' StandardColorSpace, StandardNoAlphaColorSpace)"
9abe8ee067 "loplugin:unocast (MutableTreeNode)"
9f3022ceb0 "loplugin:unocast (VCLXTabPage)"
1be70dda02 "loplugin:unocast
 (vcl::unotools::VclCanvasBitmap)"
d6a70bb641 "loplugin:unocast
 (basegfx::unotools::UnoPolyPolygon)"
5a14f009e6 "loplugin:unocast
 (xmlsecurity::Certificate)"
99009c9535 "loplugin:unocast (sd::Annotation)"
0c7585c5fa "loplugin:unocast (sd::TextApiObject)"
24e14afd1b "loplugin:unocast
 (SignatureVerifierImpl)"
1a7ad0c10d "loplugin:unocast
 (pcr::PropertyEventTranslation)"
a97e2d2702 "loplugin:unocast (RangePageBreaks)"
19dfdf86ad "iloplugin:unocast
 (pcr::OFormattedNumericControl)"
f9785ea595 "loplugin:unocast
 (frm::OInterfaceContainer)"
5e5f40a4a9 "loplugin:unocast (ScVbaShapes)"
27b35b2c21 "loplugin:unocast (ScVbaShapeRange)"
cb3108f860 "cid#1517812 Dereference null return
 value"
feba0ddb15 "loplugin:unocast
 (weld::TransportAsXWindow)"
4d6c232165 "loplugin:unocast
 (oox::ForumlaImExportBase)"
4844c096a8 "loplugin:unocast
 (cairocanvas::SurfaceProvider)"
9a0b523e0a "loplugin:unocast
 (cairocanvas::CanvasBitmap)"
8a5648d8e5 "loplugin:unocast
 (cairocanvas::TextLayout)"
28c27a0623 "loplugin:unocast
 (cairocanvas::CanvasFont)"
53bc223cb3 "loplugin:unocast
 (cairocanvas::RepaintTarget)"
5f70b0b9f6 "loplugin:unocast (SvXMLImport)"
068187a898 "loplugin:unocast (VCLXWindow)"
88b4f96620 "loplugin:unocast
 (sfx2::sidebar::SidebarController)"
f1b7a69b28 "loplugin:unocast
 (SvxLineStyleToolBoxControl)"
ba76f0ba7e "loplugin:unocast
 (i18npool::Calendar_gregorian)"
840154daf9 "loplugin:unocast
 (framework::AddonsToolBarWrapper)"
b0e9c4c5f0 "loplugin:unocast
 (GrammarCheckingIterator)"
8ee6cfc965 "loplugin:unocast
 (ucb::ucp::ext::Content)"
5b8cd77c11 "loplugin:unocast
 (basic::SfxScriptLibraryContainer)"
9e73ff9fce "loplugin:unocast
 (sdext::presenter::PresenterNotesView)"
a98acca8fb "loplugin:unocast
 (SelectionChangeHandler)"
c0b59ad6e3 "Consistently use
 comphelper::getSomethingImpl<I>(aIdentifier, this)"
276e3ccbdd "loplugin:unocast
 (vclcanvas::RepaintTarget)"

Change-Id: I37c73e3422a5154bf6cb647640d2d3f23db8bc34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145063
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-05 11:45:51 +00:00
Stephan Bergmann 9abe8ee067 loplugin:unocast (MutableTreeNode)
(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)

Change-Id: I33fc079e2128c678ecc36567c2c5ed75481694c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144752
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-22 13:07:49 +00:00