summaryrefslogtreecommitdiff
path: root/svx/source/fmcomp
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-03-14 12:28:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-03-14 14:20:26 +0100
commit6ba9daac763baf37c833911be5e5fb97e068bea1 (patch)
tree12ba4c5402747074f5a4b69a10fc60ab1c3d6603 /svx/source/fmcomp
parenta342ac91e21dd45640b7dea063bc04b80f0feb6e (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/fmcomp')
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 3906a6047258..762144002948 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -798,12 +798,12 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, weld::Menu& rM
// ask the bindings of the current view frame (which should be the one we're residing in) for the state
if (pCurrentFrame)
{
- std::unique_ptr<SfxPoolItem> pItem;
+ std::unique_ptr<SfxBoolItem> pItem;
SfxItemState eState = pCurrentFrame->GetBindings().QueryState(SID_FM_CTL_PROPERTIES, pItem);
if (eState >= SfxItemState::DEFAULT && pItem != nullptr)
{
- bool bChecked = dynamic_cast<const SfxBoolItem*>( pItem.get()) != nullptr && static_cast<SfxBoolItem*>(pItem.get())->GetValue();
+ bool bChecked = pItem && pItem->GetValue();
rMenu.set_active("column", bChecked);
}
}