resolved fdo#79228 resync ScPatternAttr if changed in GetNeededSize()

Change-Id: Ida47df6223a20939ad5971dc00b8f3462a92dd3e
(cherry picked from commit a1dedadbf0d87a1db24e9b336257678e059882f0)