weld: Switch IconView selection changed signal param to ItemView

Switch the param for the signal and handlers used when
the selection in a weld::IconView changes from weld::IconView&
to the base class, weld::ItemView&.

This is in preparation of moving the logic to the weld::ItemView
base class in an upcoming commit.

This is the IconView equivalent of previous commit

    Change-Id: I0bbf8fe1dbd95906a5224155d48d832bcd144532
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Apr 9 13:45:18 2026 +0200

        weld: Switch TreeView selection changed signal param to ItemView

Change-Id: I87fad3a129128d4387adfdd75d18e93f05af5e84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203367
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn
2026-04-10 06:36:33 +02:00
parent 03d5d803c4
commit 6edfb00862
14 changed files with 19 additions and 18 deletions
+2 -2
View File
@@ -162,9 +162,9 @@ private:
// Handler
DECL_LINK(SelStyleHdl_Impl, SvtLineListBox&, void);
DECL_LINK(SelColHdl_Impl, ColorListBox&, void);
DECL_LINK(SelPreHdl_Impl, weld::IconView&, void);
DECL_LINK(SelPreHdl_Impl, weld::ItemView&, void);
DECL_LINK(FocusOutPresets_Impl, weld::Widget&, void);
DECL_LINK(SelSdwHdl_Impl, weld::IconView&, void);
DECL_LINK(SelSdwHdl_Impl, weld::ItemView&, void);
DECL_LINK(LinesChanged_Impl, LinkParamNone*, void);
DECL_LINK(ModifyDistanceHdl_Impl, weld::MetricSpinButton&, void);
DECL_LINK(ModifyWidthLBHdl_Impl, weld::ComboBox&, void);
+2 -2
View File
@@ -1156,7 +1156,7 @@ void SvxBorderTabPage::HideShadowControls()
#define IID_PRE_TABLE_ALL 20
#define IID_PRE_TABLE_OUTER2 21
IMPL_LINK_NOARG(SvxBorderTabPage, SelPreHdl_Impl, weld::IconView&, void)
IMPL_LINK_NOARG(SvxBorderTabPage, SelPreHdl_Impl, weld::ItemView&, void)
{
const svx::FrameBorderState SHOW = svx::FrameBorderState::Show;
const svx::FrameBorderState HIDE = svx::FrameBorderState::Hide;
@@ -1231,7 +1231,7 @@ IMPL_LINK_NOARG(SvxBorderTabPage, FocusOutPresets_Impl, weld::Widget&, void)
m_xWndPresets->unselect_all();
}
IMPL_LINK_NOARG(SvxBorderTabPage, SelSdwHdl_Impl, weld::IconView&, void)
IMPL_LINK_NOARG(SvxBorderTabPage, SelSdwHdl_Impl, weld::ItemView&, void)
{
OUString sSelectedId = m_xWndShadows->get_selected_id();
bool bEnable = !sSelectedId.isEmpty() && sSelectedId.toInt32() > 1;
+2 -2
View File
@@ -364,7 +364,7 @@ public:
protected:
DECL_LINK(ChangedHdl, weld::ItemView&, void);
DECL_LINK(SelectionChangedHdl, weld::IconView&, void);
DECL_LINK(SelectionChangedHdl, weld::ItemView&, void);
DECL_LINK(RowActivatedHdl, const weld::TreeIter&, bool);
DECL_LINK(ItemActivatedHdl, const weld::TreeIter&, bool);
@@ -1323,7 +1323,7 @@ IMPL_LINK_NOARG(SvtFileView_Impl, ChangedHdl, weld::ItemView&, void)
m_aSelectHandler.Call(m_pAntiImpl);
}
IMPL_LINK_NOARG(SvtFileView_Impl, SelectionChangedHdl, weld::IconView&, void)
IMPL_LINK_NOARG(SvtFileView_Impl, SelectionChangedHdl, weld::ItemView&, void)
{
if (!mnSuspendSelectCallback)
m_aSelectHandler.Call(m_pAntiImpl);
+1 -1
View File
@@ -62,7 +62,7 @@ class SFX2_DLLPUBLIC SfxCharmapContainer
Link<void*, void> m_aUpdateFavHdl;
Link<void*, void> m_aUpdateRecentHdl;
DECL_DLLPRIVATE_LINK(IconViewSelectionChangedHdl, weld::IconView&, void);
DECL_DLLPRIVATE_LINK(IconViewSelectionChangedHdl, weld::ItemView&, void);
DECL_DLLPRIVATE_LINK(RecentItemActivatedHdl, const weld::TreeIter&, bool);
DECL_DLLPRIVATE_LINK(FavItemActivatedHdl, const weld::TreeIter&, bool);
DECL_DLLPRIVATE_LINK(ItemViewFocusInHdl, weld::Widget&, void);
+1 -1
View File
@@ -33,7 +33,7 @@ public:
void SetOptimalSize();
void refreshThemeColors();
DECL_LINK(SelectionChangedHdl, weld::IconView&, void);
DECL_LINK(SelectionChangedHdl, weld::ItemView&, void);
protected:
void onColorSetActivated() override;
+1 -1
View File
@@ -40,7 +40,7 @@ public:
explicit ThemeColorsPaneBase(std::unique_ptr<weld::IconView> xIconView);
virtual ~ThemeColorsPaneBase();
DECL_LINK(SelectionChangedHdl, weld::IconView&, void);
DECL_LINK(SelectionChangedHdl, weld::ItemView&, void);
DECL_LINK(ItemActivatedHdl, const weld::TreeIter&, bool);
std::shared_ptr<model::ColorSet> const& getCurrentColorSet() { return mpCurrentColorSet; }
+2 -2
View File
@@ -21,7 +21,7 @@ class VCL_DLLPUBLIC IconView : virtual public ItemView
friend class ::LOKTrigger;
protected:
Link<IconView&, void> m_aSelectionChangeHdl;
Link<ItemView&, void> m_aSelectionChangeHdl;
Link<const TreeIter&, OUString> m_aQueryTooltipHdl;
Link<const encoded_image_query&, bool> m_aGetPropertyTreeElemHdl;
@@ -81,7 +81,7 @@ public:
void append_separator(const OUString& rId) { insert_separator(-1, &rId); }
void connect_selection_changed(const Link<IconView&, void>& rLink)
void connect_selection_changed(const Link<ItemView&, void>& rLink)
{
m_aSelectionChangeHdl = rLink;
}
+1 -1
View File
@@ -364,7 +364,7 @@ void SfxCharmapContainer::updateCharControl(weld::IconView& rIconView,
}
}
IMPL_LINK(SfxCharmapContainer, IconViewSelectionChangedHdl, weld::IconView&, rIconView, void)
IMPL_LINK(SfxCharmapContainer, IconViewSelectionChangedHdl, weld::ItemView&, rIconView, void)
{
std::unique_ptr<weld::TreeIter> pIter = rIconView.get_selected();
if (!pIter)
+1 -1
View File
@@ -104,7 +104,7 @@ VclPtr<VirtualDevice> ThemeColorsPaneBase::CreateColorSetPreview(const model::Co
return pVDev;
}
IMPL_LINK_NOARG(ThemeColorsPaneBase, SelectionChangedHdl, weld::IconView&, void)
IMPL_LINK_NOARG(ThemeColorsPaneBase, SelectionChangedHdl, weld::ItemView&, void)
{
if (!mxIconViewThemeColors)
return;
+1 -1
View File
@@ -119,7 +119,7 @@ protected:
OUString m_sSelectedStyle;
DECL_LINK(Selected, weld::IconView&, void);
DECL_LINK(Selected, weld::ItemView&, void);
DECL_LINK(DoubleClick, const weld::TreeIter&, bool);
DECL_LINK(DoCommand, const CommandEvent&, bool);
DECL_LINK(GetPreviewImage, const weld::encoded_image_query&, bool);
+1 -1
View File
@@ -449,7 +449,7 @@ StylesPreviewWindow_Base::StylesPreviewWindow_Base(
RequestStylesListUpdate();
}
IMPL_LINK(StylesPreviewWindow_Base, Selected, weld::IconView&, rIconView, void)
IMPL_LINK(StylesPreviewWindow_Base, Selected, weld::ItemView&, rIconView, void)
{
OUString sStyleName = rIconView.get_selected_text();
@@ -132,7 +132,7 @@ void ThemeColorsPaneWrapper::onColorSetActivated()
comphelper::dispatchCommand(u".uno:ApplyTheme"_ustr, m_xFrame, aArgs);
}
IMPL_LINK_NOARG(ThemeColorsPaneWrapper, SelectionChangedHdl, weld::IconView&, void)
IMPL_LINK_NOARG(ThemeColorsPaneWrapper, SelectionChangedHdl, weld::ItemView&, void)
{
// Call base class selection handler first to update mpCurrentColorSet
svx::ThemeColorsPaneBase::SelectionChangedHdl(*mxIconViewThemeColors);
+1 -1
View File
@@ -1266,7 +1266,7 @@ DeactivateRC SwColumnPage::DeactivatePage(SfxItemSet *_pSet)
return DeactivateRC::LeavePage;
}
IMPL_LINK_NOARG(SwColumnPage, SetDefaultsHdl, weld::IconView&, void)
IMPL_LINK_NOARG(SwColumnPage, SetDefaultsHdl, weld::ItemView&, void)
{
std::unique_ptr<weld::TreeIter> pSelected = m_xDefaultIconView->get_selected();
if (!pSelected)
+2 -1
View File
@@ -24,6 +24,7 @@
#include <svx/colorbox.hxx>
#include <svx/frmdirlbox.hxx>
#include <vcl/weld/ComboBox.hxx>
#include <vcl/weld/ItemView.hxx>
#include <vcl/weld/MetricSpinButton.hxx>
#include <vcl/weld/SpinButton.hxx>
#include <map>
@@ -127,7 +128,7 @@ class SwColumnPage final : public SfxTabPage
DECL_LINK(GapModify, weld::MetricSpinButton&, void);
DECL_LINK(EdModify, weld::MetricSpinButton&, void);
DECL_LINK(AutoWidthHdl, weld::Toggleable&, void );
DECL_LINK(SetDefaultsHdl, weld::IconView&, void);
DECL_LINK(SetDefaultsHdl, weld::ItemView&, void);
DECL_LINK(Up, weld::Button&, void);
DECL_LINK(Down, weld::Button&, void);