simplify - use OUString::startsWith where possible

Convert code like
   if( !aStr.isEmpty() && aStr[0] == 'x' )
to
   if( aStr.startsWith("x") )

Change-Id: Iabc3a44ed3be2d29eed876e0eeef212ccd271edf
use OUString::endsWith where possible

Change-Id: Ie2b68f79a7f9a54899f1d727f9a1fc7cfb14d90a
remove unnecessary casts

It is no longer necessary to cast to sal_Unicode when calling
OUStringBuffer::append

Change-Id: Iab3d1e12eef472cfe11f1d0d1969ca404091dd7d