Helps to reliably restore the correct previous value of a setting:
in many cases, the old restoration code used hardcoded values, which
could get out of sync with current defaults. Also, makes the code
easier to read.
Change-Id: Ia60b4e42192009c16bdbe58c540980c13626d5d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198479
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins