diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-11-23 09:14:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-11-23 13:00:39 +0100 |
commit | 0e630b825184fc19a83778b8c130c2be1a068d8e (patch) | |
tree | 05a2989779a656ba09998322016a4229883dab8e /svx | |
parent | 25460b7fd4fa35717c431c1968f873b61fc901a6 (diff) |
dynamic_cast followed by static_cast
Change-Id: I3f121c2981c3dbec237b11babc91af80309ec356
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106400
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index b60c6e686aea..dca42fc19dce 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -2615,7 +2615,10 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl case OWN_ATTR_ISFONTWORK: { - rValue <<= dynamic_cast<const SdrTextObj*>(GetSdrObject()) != nullptr && static_cast<SdrTextObj*>(GetSdrObject())->IsFontwork(); + bool bIsFontwork = false; + if (const SdrTextObj* pTextObj = dynamic_cast<const SdrTextObj*>(GetSdrObject())) + bIsFontwork = pTextObj->IsFontwork(); + rValue <<= bIsFontwork; break; } |