The SfxDispatchController_Impl::InterceptLOKStateChangeEvent() should be updated so that it returns a generic UNO -> Json conversion of aEvent.State, and it is up to the client to get the needed info out of that, so that we don't have to handle each and every case in InterceptLOKStateChangeEvent. Ideal would be to have a generic comphelper::anyToJson() similar to comphelper::anyToString(); see comphelper/source/misc/anytostring.cxx .