From 895a1e89e2b3e37eb1a2fd0dd494ddd385bd0456 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 2 Feb 2022 13:24:47 +0200 Subject: SID_ATTR_GRAF_TRANSPARENCE and SID_ATTR_GRAF_MODE have conflicting types Meant to be SfxUInt16Item, until the below commit accidentally introduced SfxInt16Item usage. commit 4d814ec1518c98d2ca251a5a10287f40a427ea6e Author: Armin Le Grand Date: Wed Apr 24 09:50:54 2013 +0000 Related: #i122111# Adapted pState usages in NotifyItemUpdate methods Change-Id: I2aff5cc1eea9257186b4da12a73f928503bc233c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129353 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/sidebar/graphic/GraphicPropertyPanel.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'svx') diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx index 5fb1e4448c71..5503649551e6 100644 --- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx +++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx @@ -108,7 +108,7 @@ IMPL_LINK_NOARG( GraphicPropertyPanel, ModifyContrastHdl, weld::MetricSpinButton IMPL_LINK_NOARG( GraphicPropertyPanel, ModifyTransHdl, weld::MetricSpinButton&, void ) { const sal_Int16 nTrans = mxMtrTrans->get_value(FieldUnit::PERCENT); - const SfxInt16Item aTransItem( SID_ATTR_GRAF_TRANSPARENCE, nTrans ); + const SfxUInt16Item aTransItem( SID_ATTR_GRAF_TRANSPARENCE, nTrans ); GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_GRAF_TRANSPARENCE, SfxCallMode::RECORD, { &aTransItem }); } @@ -117,7 +117,7 @@ IMPL_LINK_NOARG( GraphicPropertyPanel, ModifyTransHdl, weld::MetricSpinButton&, IMPL_LINK_NOARG( GraphicPropertyPanel, ClickColorModeHdl, weld::ComboBox&, void ) { const sal_Int16 nTrans = mxLBColorMode->get_active(); - const SfxInt16Item aTransItem( SID_ATTR_GRAF_MODE, nTrans ); + const SfxUInt16Item aTransItem( SID_ATTR_GRAF_MODE, nTrans ); GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_GRAF_MODE, SfxCallMode::RECORD, { &aTransItem }); } @@ -218,11 +218,10 @@ void GraphicPropertyPanel::NotifyItemUpdate( if(eState >= SfxItemState::DEFAULT) { mxLBColorMode->set_sensitive(true); - const SfxUInt16Item* pItem = dynamic_cast< const SfxUInt16Item* >(pState); - if(pItem) + if(pState) { - const sal_Int64 nTrans = pItem->GetValue(); + const sal_uInt16 nTrans = static_cast< const SfxUInt16Item* >(pState)->GetValue(); mxLBColorMode->set_active(nTrans); } } -- cgit