summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-01-10 13:58:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-10 14:59:31 +0100
commit8f453c674f19188360ba5895c2bd9bd80273a83b (patch)
treece569bb8caeaea0b110e1e23e845716cb841588f /forms
parentc5367ee0a60966b755e726de6d175dfcd1630741 (diff)
static_cast after dynamic_cast
Change-Id: I3792ddadad9582a7e6f4740829c081d9571ddaff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109049 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/richtext/rtattributehandler.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx
index e1a9c231d71a..804d6bb2d42d 100644
--- a/forms/source/richtext/rtattributehandler.cxx
+++ b/forms/source/richtext/rtattributehandler.cxx
@@ -419,8 +419,8 @@ namespace frm
AttributeCheckState BooleanHandler::implGetCheckState( const SfxPoolItem& _rItem ) const
{
OSL_ENSURE( dynamic_cast<const SfxBoolItem*>( &_rItem) != nullptr, "BooleanHandler::implGetCheckState: invalid item!" );
- if ( dynamic_cast<const SfxBoolItem*>( &_rItem) != nullptr )
- return static_cast< const SfxBoolItem& >( _rItem ).GetValue() ? eChecked : eUnchecked;
+ if ( auto pBoolItem = dynamic_cast<const SfxBoolItem*>( &_rItem) )
+ return pBoolItem->GetValue() ? eChecked : eUnchecked;
return eIndetermined;
}