svx/source/sidebar/text/TextCharacterSpacingControl.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bace2e0a80b939f7b1c666cf669ae99bc8758f05
Author:     Justin Luth <justin_l...@sil.org>
AuthorDate: Tue Feb 1 10:26:42 2022 +0200
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Tue Feb 1 11:15:19 2022 +0100

    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 <jl...@mail.com>

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<const 
SvxKerningItem*>(pItem);
+    const SvxKerningItem* pKerningItem = dynamic_cast<const 
SvxKerningItem*>(pItem);
     tools::Long nKerning = 0;
 
     if(pKerningItem)

Reply via email to