coverity#984421 Unused pointer value

Change-Id: Id44c9c3da6624db63e1f0f95dcaeddcc8b5402d5
Reviewed-on: https://gerrit.libreoffice.org/8426
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
coverity#705000 Unchecked dynamic_cast

Change-Id: Iae20a0ab45779483fc501e5ab982e38f38ba21b7
Reviewed-on: https://gerrit.libreoffice.org/8425
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>