svtools: Drop now unused logic for custom ValueSetItem data

The last caller of ValueSet::SetItemData and
ValueSet::GetItemData was ported away from
using ValueSet in

    Change-Id: I423e80bba9e81a98e80652f6486970d40286362e
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Oct 2 12:36:17 2026 +0200

        svx: Switch to weld::TreeView in LineWidthPopup

. Drop the now unused methods and the corresponding
ValueSetItem::mpData member that could previously be used
to store custom data in an item.

Similar logic still exists in weld::IconView
and weld::TreeView, which should generally be preferred
over using the custom ValueSet widget.

Change-Id: I7d58ff933cb78a1157d3628096a17f68ddf2034d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211737
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn
2026-10-05 22:59:50 +02:00
parent 9a61140c32
commit e6dba93731
4 changed files with 0 additions and 36 deletions
-2
View File
@@ -340,8 +340,6 @@ public:
Image GetItemImage( sal_uInt16 nItemId ) const;
void SetItemColor( sal_uInt16 nItemId, const Color& rColor );
Color GetItemColor( sal_uInt16 nItemId ) const;
void SetItemData( sal_uInt16 nItemId, void* pData );
void* GetItemData( sal_uInt16 nItemId ) const;
void SetItemText( sal_uInt16 nItemId, const OUString& rStr );
const OUString & GetItemText( sal_uInt16 nItemId ) const;
void SetColor( const Color& rColor );
-1
View File
@@ -37,7 +37,6 @@ using namespace ::com::sun::star;
ValueSetItem::ValueSetItem( ValueSet& rParent )
: mrParent(rParent)
, mpData(nullptr)
, mxAcc()
, mnId(0)
, meType(ValueSetItemType::None)
-1
View File
@@ -44,7 +44,6 @@ struct ValueSetItem
{
ValueSet& mrParent;
OUString maText;
void* mpData;
rtl::Reference< ValueItemAcc > mxAcc;
Image maImage;
Color maColor;
-32
View File
@@ -1723,38 +1723,6 @@ void ValueSet::SetFormat()
mbFormat = true;
}
void ValueSet::SetItemData( sal_uInt16 nItemId, void* pData )
{
size_t nPos = GetItemPos( nItemId );
if ( nPos == VALUESET_ITEM_NOTFOUND )
return;
ValueSetItem* pItem = mItemList[nPos].get();
pItem->mpData = pData;
if (pItem->meType == ValueSetItemType::UserDraw)
{
if (!mbFormat && IsReallyVisible())
{
const tools::Rectangle aRect = ImplGetItemRect(nPos);
Invalidate(aRect);
}
else
mbFormat = true;
}
}
void* ValueSet::GetItemData( sal_uInt16 nItemId ) const
{
size_t nPos = GetItemPos( nItemId );
if ( nPos != VALUESET_ITEM_NOTFOUND )
return mItemList[nPos]->mpData;
else
return nullptr;
}
void ValueSet::SetItemText(sal_uInt16 nItemId, const OUString& rText)
{
size_t nPos = GetItemPos( nItemId );