fix bad cast in SvxStyleBox_Impl::StateChanged()

This causes various JunitTest crashes on Windows, regression from
887bc4dd3e62fe6dd19dc9d1c3ba273a5b21b5ec.

Change-Id: Iab24e0d39375ac1e5ac63d32470dca1e54d518c5
Reviewed-on: https://gerrit.libreoffice.org/9621
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>