tdf#158773 reduce dynamic_cast'ing in CustomShapeProperties::Notify

shaves 2% off the load time

Change-Id: Ia7e4747711948ccfeb274cf32028d03486cc14a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164476
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx
index cbad73a..c48e4d3 100644
--- a/svx/source/sdr/properties/customshapeproperties.cxx
+++ b/svx/source/sdr/properties/customshapeproperties.cxx
@@ -205,18 +205,12 @@ namespace sdr::properties
            TextProperties::Notify( rBC, rHint );

            bool bRemoveRenderGeometry = false;
            const SfxStyleSheetHint* pStyleHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint);

            if ( pStyleHint && pStyleHint->GetStyleSheet() == GetStyleSheet() )
            if (rHint.GetId() == SfxHintId::StyleSheetModified || rHint.GetId() == SfxHintId::StyleSheetChanged)
            {
                switch( pStyleHint->GetId() )
                {
                    case SfxHintId::StyleSheetModified :
                    case SfxHintId::StyleSheetChanged  :
                        bRemoveRenderGeometry = true;
                    break;
                    default: break;
                }
                const SfxStyleSheetHint* pStyleHint = static_cast<const SfxStyleSheetHint*>(&rHint);
                if ( pStyleHint->GetStyleSheet() == GetStyleSheet() )
                    bRemoveRenderGeometry = true;
            }
            else if ( rHint.GetId() == SfxHintId::DataChanged )
            {