Move some of the code to local functions to make it easier to read.
Move some of the code to local functions to make it easier to read.

Change-Id: Ib7ca5c04ec057dbce958d580ad3b7d52d19ed21f

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