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>
(cherry picked from commit 3b41dc58dc3689d4506dec0825834fbec0d1ed60)
Reviewed-on: https://gerrit.libreoffice.org/9622
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>