forked from amazingfate/loongoffice
The whole function is pointless without a viewshell, move the check & short-circuit to the top of the function, and drop all the duplicate checks. Also drop two calls to SfxViewShell::Current(): getting it from the view frame is better than getting some global state. Change-Id: I4aa7aeb7c89841bbced760ce2e43d2312bc97f20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166139 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>