fdo#75665: Truncate string when clipped on screen.

This improves performance of text layouting by HarfBuzz for very long strings.
HarfBuzz's layout algorithm appears to be more expensive than ICU's.

(cherry picked from commit 087a79db1272858f107656c5ca3c6efb45680986)
(cherry picked from commit 6fa4d31d6a7e363285f22d4c0012521d10073652)
(cherry picked from commit 8e50a6c7b1cb9481cce42c71ff07e921fb4292d0)
(cherry picked from commit 21fc47e115530780ad45ae64e8076dc5e9fedb5e)

Conflicts:
	sc/inc/scopetools.hxx
	sc/source/core/tool/scopetools.cxx
	sc/source/ui/view/output2.cxx

Change-Id: Ic9738b7b8f0f1a29c51c83b147763118939b90ef
Reviewed-on: https://gerrit.libreoffice.org/9057
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>