The paragraph text may become shorter after the function succeeds,
because it may remove arbitrary number of preceding spaces; since
the position may then be used to access data in the string in the
caller, we need to update it, to avoid use of old position (which
may point beyond the string, and produce a crash; or it may point
to a wrong position in it).
Change-Id: Ib1b4b63cbd7150e0f69c97032e3410db7dadd4dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160924
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>