sal_uInt16: to sal_Int32/long, constify, reworked some casts
sal_uInt16: to sal_Int32/long, constify, reworked some casts

Change-Id: I81e13e42619d73346c63689bf4392f924348b4ae

JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core