ubsan: fix downcast (2)

svx/source/svdraw/svdedtv1.cxx:1011:56: runtime error: downcast of address 0x7bd2deeea930 which does not point to an object of type 'const SfxUInt16Item'
0x7bd2deeea930: note: object is of type 'XFillTransparenceItem'
00 00 00 00 90 ee bd 84 a2 7b 00 00 00 00 00 00 fb 03 be be 17 02 00 00 89 be 00 00 00 00 00 00
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'XFillTransparenceItem'

after
  commit 953219b811
  Author: Noel Grandin <noelgrandin@gmail.com>
  Date:   Wed Dec 3 21:34:19 2025 +0200
  make XFillTransparenceItem extend SfxPoolItem

Change-Id: Id29305cf0a7b7431207aaa7f8ede639f035a630e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195276
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2025-12-09 14:18:28 +01:00
parent 1e2e9a20a4
commit bd84bd35e9
+1 -1
View File
@@ -1008,7 +1008,7 @@ void SdrEditView::MergeAttrFromMarked(SfxItemSet& rAttr, bool bOnlyHardAttr) con
const SfxPoolItem* pItem = rSet.GetItem(XATTR_FILLTRANSPARENCE);
if (pItem)
{
sal_uInt16 nTransparency = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
sal_uInt16 nTransparency = static_cast<const XFillTransparenceItem*>(pItem)->GetValue();
sPayload = OUString::number(nTransparency);
sPayload = ".uno:FillTransparence=" + sPayload;