fdo#77506: More reliable way to determine label strings.

Not beautiful, but doable.

(cherry picked from commit a2a1a59a448420a858724371c4a339f75ebe8c1e)

Conflicts:
	sc/source/ui/unoobj/chart2uno.cxx
	xmloff/source/chart/SchXMLExport.cxx

Change-Id: I6f3b00d620e7d7d19cc05ec4239deeb14d0d5201