Bug 71261

Summary: Frame and table name rules differ: allow spaces in table names (conform ODF specs)
Product: LibreOffice Reporter: Adam Tauno Williams <awilliam>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: enhancement CC: cno, dgp-mail, libreoffice, moderndl.ir, rb.henschel
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 107707    

Description Adam Tauno Williams 2013-11-05 12:55:18 UTC
Frame names can contain white space.

Table names to not allow whitespace.

It would be useful, especially in large documents, to be able to have consistent naming procedures for tables and frames.
Comment 1 Cor Nouws 2013-11-05 19:51:14 UTC
Hi Adam,

thanks for the issue. Set to new as enhancement.

Can you pls explain why you would like to have table names with spaces. Just for consistency??

Regards,
Cor
Comment 2 Owen Genat (retired) 2013-11-08 22:24:34 UTC
>Can you pls explain why you would like to have table names with spaces. Just for consistency??

I think in this case it is one of supporting the ODF/XML data type. The svg:title and table:title attributes, which are used to name frames and tables respectively, both use the xsd:string type.

http://www.w3.org/TR/xmlschema11-2/#string
http://www.schemacentral.com/sc/xsd/t-xsd_string.html
Comment 3 Owen Genat (retired) 2013-11-08 22:30:42 UTC
I forgot to mention that svg:title and table:title are also partially interchangeable (for the situation where a table is inserted within a frame.) ODF v1.2, Part 1, 9.1.13 <table:title> states:

>The <table:title> element specifies a title for a table. The element shall not be used if the
>parent <table:table> element is contained within a <draw:frame> element. In that case, the
>table's title is specified the by <svg:title> child element of <draw:frame>.
Comment 4 Cor Nouws 2013-11-08 22:33:48 UTC
thanks!
Comment 5 Adam Tauno Williams 2015-04-09 17:39:00 UTC
> Can you pls explain why you would like to have table names with spaces. Just 
> for consistency??

Table names can appear in the navigator.  Normal table names are better than camel or pascal case - especially when other elements allow full-text names.  Also would be good for creating an index of tables in a master document.

Version: 4.3.6.2
Build ID: 430m0(Build:2)
Comment 6 NISZ LibreOffice Team 2019-12-18 11:26:06 UTC
*** Bug 105597 has been marked as a duplicate of this bug. ***
Comment 7 Adam Tauno Williams 2021-03-05 15:35:11 UTC
Same issue still exists in current version (7.1.1.2)
Comment 8 Regina Henschel 2022-05-21 19:32:27 UTC
(In reply to Owen Genat (retired) from comment #3)
> I forgot to mention that svg:title and table:title are also partially
> interchangeable (for the situation where a table is inserted within a
> frame.) ODF v1.2, Part 1, 9.1.13 <table:title> states:
> 
> >The <table:title> element specifies a title for a table. The element shall not be used if the 
> >parent <table:table> element is contained within a <draw:frame> element. In that case, the
> >table's title is specified the by <svg:title> child element of <draw:frame>.

The elements <table:title> and <svg:title> are not relevant here.



The name of a table is stored in the attribute table:name (19.677 in ODF 1.3) of the <table:table> element. That has the data type 'string', so the file format allows spaces.

Spaces in table names are possible in Calc and in Impress/Draw. The problem in Writer is our proprietary Writer formula language, namespace 'ooow'. That language does not allow spaces in a cell reference. Calc uses the standardized formula language 'OpenFormula', namespace 'of'. There a table name with spaces is put into '' and can be handled in cell references without problems.

So to allow spaces in table names in Writer, our proprietary Writer formula language has to be extended or the tables in Writer are changed to use OpenFormula same as Calc.

Tables in Impress/Draw can have names with spaces because they do not allow any formula.
Comment 9 Regina Henschel 2022-05-21 19:34:00 UTC
*** Bug 149175 has been marked as a duplicate of this bug. ***
Comment 10 phv 2022-06-10 15:06:04 UTC
(In reply to Regina Henschel from comment #9)
> *** Bug 149175 has been marked as a duplicate of this bug. ***

Thank you for having took the time to answer me. I insist on this small enhancement that would greatly facilitate the use of Writer. I have a document with more than a hundred tables (especially because the frames do not allow any reference insertion) and I have to copy a special space character each time I rename one.