sw: do more input validation in SwWW8ImplReader::Read_And

(to fix up f2945255df273404ee2457dcf761cb8f334b732b)

Change-Id: Ie20fb9db4515b9737322ec7224ecd7e411d31c03
(cherry picked from commit ae2e7ad276acb9394691a9d4a702ed7a6b07b508)
Reviewed-on: https://gerrit.libreoffice.org/10137
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
fdo#81036 escape ~ in .ui and fix a typo (straight apostrophe)

Change-Id: I652dc63cc0e8fb04d7c3115d66d60dabda60f0f4
(cherry picked from commit 4861e4961f7dc4f28a14c5f9d9b969456bfec720)
Reviewed-on: https://gerrit.libreoffice.org/10143
Reviewed-by: Matúš Kukan <matus.kukan@collabora.com>
Tested-by: Matúš Kukan <matus.kukan@collabora.com>