diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-03-14 12:28:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-03-14 14:20:26 +0100 |
commit | 6ba9daac763baf37c833911be5e5fb97e068bea1 (patch) | |
tree | 12ba4c5402747074f5a4b69a10fc60ab1c3d6603 /svx/source/sidebar/text | |
parent | a342ac91e21dd45640b7dea063bc04b80f0feb6e (diff) |
add TypedWhichId version of QueryState
Change-Id: I95b86fc081847da01e06f50a1b2c7e7f5456c638
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131529
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/sidebar/text')
-rw-r--r-- | svx/source/sidebar/text/TextCharacterSpacingControl.cxx | 5 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextUnderlineControl.cxx | 6 |
2 files changed, 4 insertions, 7 deletions
diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx index ba528d702282..0826434b79fb 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx +++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx @@ -106,10 +106,9 @@ TextCharacterSpacingControl::~TextCharacterSpacingControl() void TextCharacterSpacingControl::Initialize() { - const SfxPoolItem* pItem; - SfxItemState eState = SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_CHAR_KERNING, pItem); + const SvxKerningItem* pKerningItem; + SfxItemState eState = SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_CHAR_KERNING, pKerningItem); - const SvxKerningItem* pKerningItem = dynamic_cast<const SvxKerningItem*>(pItem); tools::Long nKerning = 0; if(pKerningItem) diff --git a/svx/source/sidebar/text/TextUnderlineControl.cxx b/svx/source/sidebar/text/TextUnderlineControl.cxx index 380389509865..9d79e924e877 100644 --- a/svx/source/sidebar/text/TextUnderlineControl.cxx +++ b/svx/source/sidebar/text/TextUnderlineControl.cxx @@ -99,10 +99,8 @@ namespace { Color GetUnderlineColor() { - const SfxPoolItem* pItem; - SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_CHAR_UNDERLINE, pItem); - - const SvxUnderlineItem* pUnderlineItem = static_cast<const SvxUnderlineItem*>(pItem); + const SvxUnderlineItem* pUnderlineItem; + SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_CHAR_UNDERLINE, pUnderlineItem); if(pUnderlineItem) return pUnderlineItem->GetColor(); |