SwRTFWriter: fix string conversion

Regression from 02bfed8a53556badfea637930b05d923cf9465f2 (convert
sw/source/filter/ww8/*.cxx from String to OUString, 2013-10-14), check
for string length before invoking OUString::operator[].

This can be reproduced if copy&pasting some text inside a Writer doc
from normal text to rectangle shapes inside group shapes.

Change-Id: Ia8f774b27ca63773792e6af913dfe7e493bea4b8
(cherry picked from commit 1da04bd7a8a804cbfb1d01a3102b1b76cc557122)