the range has to be in the correct order, fdo#81803

Change-Id: Ia3907701857e22c11a2cefa5d35437c8f8219ff6
(cherry picked from commit 7bff8e93eb98be4b621c3902de227a3c313cf5b4)
Reviewed-on: https://gerrit.libreoffice.org/10654
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>