Bring this logic from ScViewFaunc::DeleteContents to ScDocFunc's.
Bring this logic from ScViewFaunc::DeleteContents to ScDocFunc's.

To make the bug reported in fdo#80846 reproducible.

Change-Id: Iec400f26c6c6af9ae3bd0afd4fce75939ab1e23d

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