sw lok: simplify SwTransferable::isComplex()
Commit
169a87563a3940299811d874b4df0ad13591771c (LOK: Implement
getSelectionType, 2019-06-24) implemented detecting complex selections
by copying the selection to a new SwDoc, which probably had two
benefits: first, the created SwPaM instance didn't touch the document;
second, this means no bounds has to be set when scanning nodes: the
entire document is the selection.
Later commit
7fe30d1cb00c576469d6cbe5606268a9cdf35bd3 (LOK: detect
Graphics in isComplex for Writer, 2019-06-25) got rid of the SwPaM
(which would register itself into text nodes), so now it's possible to
not touch the document, even if we work on the original document.
Instead, solve the partial scanning by iterating over the list of
selections. This is meant to be faster, and also less likely to crash in
case some internal document model invariant is broken.
No testcase, testComplexSelection in CppunitTest_desktop_lib already
covers thie behavior.
Change-Id: Ia528c06a48defd06c5e34ed7d61621e5ce10bb06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111377
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins