convert EventNames to an enum

Change-Id: I68496b47564f4c00c19a62f9f1bf38d3353598f7
Reviewed-on: https://gerrit.libreoffice.org/13095
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>