From bace2e0a80b939f7b1c666cf669ae99bc8758f05 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 1 Feb 2022 10:26:42 +0200 Subject: related tdf#111733 svx: SfxVoidItem != SvxKerningItem When selecting text containing several different kerning values, the pItem returned is a VoidItem. This was showing up as random numbers in the TextCharacterSpacingControl spinbutton. Change-Id: I94cfc566daa42e0d8c3d403eb08af659f01e6d5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129270 Tested-by: Jenkins Reviewed-by: Justin Luth --- svx/source/sidebar/text/TextCharacterSpacingControl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'svx') diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx index 3da72391476a..ba528d702282 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx +++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx @@ -109,7 +109,7 @@ void TextCharacterSpacingControl::Initialize() const SfxPoolItem* pItem; SfxItemState eState = SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_CHAR_KERNING, pItem); - const SvxKerningItem* pKerningItem = static_cast(pItem); + const SvxKerningItem* pKerningItem = dynamic_cast(pItem); tools::Long nKerning = 0; if(pKerningItem) -- cgit