Bug 103090 - FILEOPEN / FILESAVE: Cross-reference (with white space in name) broken after saving as DOCX
Summary: FILEOPEN / FILESAVE: Cross-reference (with white space in name) broken after ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium major
Assignee: Vasily Melenchuk (CIB)
URL:
Whiteboard: interoperability target:6.0.0
Keywords: filter:docx
Depends on:
Blocks: DOCX
  Show dependency treegraph
 
Reported: 2016-10-10 14:14 UTC by Matthew Kogan
Modified: 2017-09-13 09:42 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Document containing cross-reference to a bookmark (10.98 KB, application/vnd.oasis.opendocument.text)
2016-10-10 14:15 UTC, Matthew Kogan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Kogan 2016-10-10 14:14:49 UTC
Description:
A cross-reference to a bookmark with a space in its name is broken after saving the document as DOCX. It looks like the space in the bookmark name is replaced with an underscore, but the cross-reference itself is still referring to the original name. It looks fine when you first open the document in Word (2013 if it matters), but as soon as you go to Print or Print Preview, it replaces the cross-reference with "Error! Reference source not found.".

Steps to Reproduce:
Open the attached "Cross ref test.odt", save as DOCX, open DOCX in Word, print or print preview.

Actual Results:  
Cross-reference reads "Error! Reference source not found.".

Expected Results:
Cross-reference reads "1.1".


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Comment 1 Matthew Kogan 2016-10-10 14:15:28 UTC
Created attachment 127923 [details]
Document containing cross-reference to a bookmark
Comment 2 Xisco Faulí 2016-10-10 14:28:57 UTC
Confirmed in

- Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
- Version: 5.3.0.0.alpha0+
Build ID: ae3ec79354f7b4967e736c6a4cd7c08fc52e2b7d
CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 3 Cor Nouws 2016-10-10 15:22:28 UTC
looking at bug 42346, cross refs to bookmars was one of the items that did work :\
Comment 4 Matthew Kogan 2016-10-10 15:28:23 UTC
Thanks, Cor, but this report is a bit more specific. It's only when the bookmark name contains a space, and only when you export to DOCX and then print.
Comment 5 Xisco Faulí 2016-10-10 15:39:39 UTC
Hi Cor,
This is not a regression. Reproduced in

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 6 Matthew Kogan 2016-10-10 16:00:59 UTC
I'm not convinced that it has been inherited from OOo - that has never been able to save to DOCX, as far as I know.
Comment 7 Commit Notification 2017-09-07 13:03:51 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=aa3c0ddc61726f9e2e927e08966acd63a3fcf968

tdf#103090 replace spaces by underscore in bookmark names for DOCX.

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Cor Nouws 2017-09-13 09:42:57 UTC
works ok in Version: 6.0.0.0.alpha0+
Build ID: 5bbfa7ab8ded08d73dcb86c5e9fa3692b629e5bf
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-09-11_08:32:29
Locale: nl-NL (nl_NL.UTF-8); Calc: group
thanks!