Kaydet (Commit) 75c642da authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1420317 Unchecked dynamic_cast

Change-Id: I33d065780ece2aab5f5a07d0dfd5493005a22b33
Reviewed-on: https://gerrit.libreoffice.org/43917Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst c15ac2c2
...@@ -325,9 +325,9 @@ public: ...@@ -325,9 +325,9 @@ public:
for (editeng::Section const & rSection : aSections) for (editeng::Section const & rSection : aSections)
{ {
const SvxFieldItem* pFieldItem = findField(rSection); const SvxFieldItem* pFieldItem = findField(rSection);
if (pFieldItem) const editeng::CustomPropertyField* pCustomPropertyField = pFieldItem ? dynamic_cast<const editeng::CustomPropertyField*>(pFieldItem->GetField()) : nullptr;
if (pCustomPropertyField)
{ {
const auto* pCustomPropertyField = dynamic_cast<const editeng::CustomPropertyField*>(pFieldItem->GetField());
OUString aKey = pCustomPropertyField->GetKey(); OUString aKey = pCustomPropertyField->GetKey();
if (aKey.startsWith(sPolicy + "Marking:Text:")) if (aKey.startsWith(sPolicy + "Marking:Text:"))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment