out-of-bounds string access, this comparison never matched

aName == aLinkTabName.copy(nIndex, nLinkTabNameLength)
is not a replacement for
String(aName).Equals(String(aLinkTabName), nIndex, nLinkTabNameLength)
instead use
aName.match( aLinkTabName, nIndex)
because here nLinkTabNameLength actually is aLinkTabName.getLength()

Change-Id: I884f56541f819db5672e9d096a26a3673e82d83b
(cherry picked from commit aebcabd54cc5587f3856c48db0a4c4fc0f3f8ce8)
Reviewed-on: https://gerrit.libreoffice.org/11134
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>