fdo#84938 replace BASERR_REASON_ constants -> enum

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