diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-02 13:24:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-03 08:15:31 +0100 |
commit | 895a1e89e2b3e37eb1a2fd0dd494ddd385bd0456 (patch) | |
tree | 709dd2c4bff142e1fa66321c6c41e9ff016d2cb7 /svx | |
parent | 1f13e12700af83734eb830e4aed04f701a2caabc (diff) |
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 <alg@apache.org>
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/graphic/GraphicPropertyPanel.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
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); } } |