use dynamic_cast, prevent crash when opening Options-Writer-AutoCaption
use dynamic_cast, prevent crash when opening Options-Writer-AutoCaption

SwCaptionOptPage can be added either to SwCaptionOptDlg or OfaTreeOptionsDialog

Change-Id: I0cedfc27f8d1f1bbf5e19dce2f438fc782cd5832

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