Fix for negative style ranges in Template editor.

When adjusting lengths and text lengths of ITextRegion, the adjustment to be made was based off of the region's length. However, it's possible that the text length is smaller than the normal length, so if the adjustment was negative, it could cause the text length to become negative.

Fixes #177