Drop the space character from the places that rejected it in
table names:
- Insert Table dialog: text filter on the name entry
- Table Properties dialog: validation in DeactivatePage that
showed an info dialog
- Navigator rename: forbidden characters list
- UNO SwXTextTable::setName: check that threw RuntimeException
Other illegal characters (".<>") are still blocked, since they
are incorrectly handled in formulas and chart data sources.
Also remove the now unused STR_WRONG_TABLENAME string.
Allowing spaces exposed that a chart linked to such a table lost
its data connection after save/reload, so fix the table name
(de)serialization on both sides of the link:
- ODF export (xmltexte.cxx) wrote draw:notify-on-update-of-ranges
wrapped in single quotes when the name contained a space; write
it unmodified instead (the attribute also allows a plain string,
not only a cellRangeAddressList).
- ODF import (xmltexti.cxx) only unquotes the legacy single-quoted
form when the value actually starts with a quote, so both old and
new documents are read correctly.
- SwChartDataProvider::convertRangeFromXML split the space separated
range list with a naive tokenizer that broke inside a single-quoted
table name; split it in a quote-aware way so the chart range still
resolves to the table (instead of falling back to the chart's
internal local-table).
Added regression tests:
- verify that the Insert Table dialog accepts spaces in the
table name
- verify that a table name with a space can be set via UNO
and is preserved
- verify that the Table Properties dialog accepts and saves
a table name containing a space
- verify that, after save/reload, the chart's
notify-on-update-of-ranges keeps the unquoted table name
- verify the convertRangeToXML/convertRangeFromXML round-trip for
a table name containing a space
Fix found with the help of Claude Opus.
Change-Id: I92bbed3bfed5c90af4242c396608dd3802cd126a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204381
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>