fdo#87155: Avoid negative scaling (and assertion failures further on)

Change-Id: I4a1a96b785ced4364a325ac19975d29771afe122
Reviewed-on: https://gerrit.libreoffice.org/13396
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>