Rather than using set_unit() use the function SetFieldUnit() to set the unit property according the configuration Change-Id: I1a8638d34d71b509f2d0a52fef8a673c8e112c55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207353 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins