Bug 118928

Summary: FILESAVE DOCX: Table loses set name after save
Product: LibreOffice Reporter: Miloš Samek <samek>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: dgp-mail, jluth, rb.henschel, xiscofauli
Priority: medium Keywords: filter:docx
Version: Inherited From OOo   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 104444    
Attachments: Table name set
TableName.doc: MSWord 2003 macro reads out table name

Description Miloš Samek 2018-07-25 06:22:22 UTC
Created attachment 143743 [details]
Table name set

Hello,

when you are updating and saving table properties in docx format i have found that the table name property is not correctly saved into the document.
While i update the tablename and save by LibreOffice and then I open the document the tablename is back with Table+Index, in microsoft office is table name loaded without name.

Could you please look into it? 

Miloš
Comment 1 Dieter 2018-08-12 05:38:46 UTC
I confirm it with

Version: 6.2.0.0.alpha0+ (x64)
Build ID: 0a1a4ffb4f87adff7fbbbc60202b6a0e42fedd0c
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-08-08_23:17:46
Locale: en-US (de_DE); Calc: CL

Steps to reproduce
1. creat a table
2. Open table properties and set a table name
3. Save as docx and close the document
4. Reopen document => table properties

Actual result: table name is default name (table 1)
Comment 2 Xisco Faulí 2018-08-15 10:23:08 UTC
Reproduced in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.10; Render: default; 

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4

@Justin Luth, I thought you could be interested in this issue...
Comment 3 Justin L 2018-08-15 18:10:54 UTC
Created attachment 144206 [details]
TableName.doc: MSWord 2003 macro reads out table name

The first question to ask regarding MS formats is "can I do this in Word?" An internet search suggests that this can only be done using Macros. So I did a 
Selection.Tables(1).ID = "My Crazy Table"
and saved the result.  MSWord 2003 did not save that name within the document for either .doc or .docx format.

I also looked through the DOCX documentation, but didn't find a reference to naming a table in there either (although I'm not an expert for what to look for in the documentation).

And I can't see someone trying to hack the standard to include this information in some way.
Comment 4 Miloš Samek 2018-08-16 05:48:25 UTC
Hello Justin,

i am not sure how about the past MO softwares and the standards in documentation, but in the new MO you are able to set the name for the table in docx.

The printscreen from MO: 
https://ctrlv.cz/S2Um


Regards,
Miloš
Comment 5 Regina Henschel 2018-08-16 08:08:55 UTC
(In reply to Miloš Samek from comment #4)
> Hello Justin,
> 
> i am not sure how about the past MO softwares and the standards in
> documentation, but in the new MO you are able to set the name for the table
> in docx.
> 
> The printscreen from MO: 
> https://ctrlv.cz/S2Um

That is not a name, but the "title" is a <w:tblCaption> and the "description" is a <w:tblDescription> in OOXML. For graphic objects that corresponds to "<svg:title>" and "<svg:desc>" and for a pure table, not contained in a frame, it corresponds to "<table:title>" and "<table:desc>" in ODF.

It seems that currently neither <svg:title> for the frame around the table (in case of floating table) nor <table:title> are implemented in Writer in LibreOffice, at least I find nothing in the UI. So there would be no conflict to use "title" of the MS-table to store the name and get it back from there. But in case the docx-file does not come from LibreOffice and has a string in <w:tblCaption>, you might get funny table-names, because all special characters have to be escaped, because in ODF the table name is used for references.
Comment 6 QA Administrators 2019-08-19 07:00:22 UTC Comment hidden (obsolete, spam)
Comment 7 Stéphane Guillou (stragu) 2021-06-29 04:09:27 UTC
Reproduced as described in Comment 1, with:

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: f446a203fa2897bab8ae7686c948a8bf060675c6
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-06-24_15:16:38
Calc: threaded
Comment 8 QA Administrators 2023-06-30 03:13:28 UTC Comment hidden (obsolete)
Comment 9 Dieter 2023-07-29 15:27:56 UTC
Still present in

Version: 7.6.0.1 (X86_64) / LibreOffice Community
Build ID: 776eaf34564cbf3f034a0ba1fd1d5c32ff9ccf1c
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded