Factor out SvxWeightItem::dumpAsXml() from sw

Change-Id: I97ccc04190b1f75c54e725e0612724a2ef62fe3e
fdo#86750 RTF import: fix table of contents links

Change-Id: I0f3d35a0e64c9ce5646fa63eda317bee42de5540