Bug 127816 - HTML-Export: relative link in docx files is not preserved
Summary: HTML-Export: relative link in docx files is not preserved
Status: RESOLVED DUPLICATE of bug 123627
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-27 09:15 UTC by Marc Bessières
Modified: 2020-01-08 15:27 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
document containing the relative link to another document (11.52 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-09-27 09:17 UTC, Marc Bessières
Details
document being linked by the first document (11.26 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-09-27 09:18 UTC, Marc Bessières
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Bessières 2019-09-27 09:15:44 UTC
Description:
When a docx containing a relative link to another document is saved in html, then the href tag is empty

Steps to Reproduce:
1. In attachment you can find 2 files, document_linking.docx and linked_document.docx. document_linking.docx contains a relative link to linked_document.docx
2. Place both files in the same directory then you can click on the link in document_linking.docx and it'll open linked_document.docx

3. Save document_linking.docx in html format
File -> Save As... -> HTML document (Writer) (.html)


Actual Results:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
	<title></title>
	<meta name="generator" content="LibreOffice 6.3.1.2 (Linux)"/>
	<meta name="author" content="BESSIERES Marc"/>
	<meta name="created" content="2019-09-17T09:08:00"/>
	<meta name="changedby" content="BESSIERES Marc"/>
	<meta name="changed" content="2019-09-19T11:49:00"/>
	<meta name="AppVersion" content="16.0000"/>
	<meta name="DocSecurity" content="0"/>
	<meta name="HyperlinksChanged" content="false"/>
	<meta name="LinksUpToDate" content="false"/>
	<meta name="ScaleCrop" content="false"/>
	<meta name="ShareDoc" content="false"/>
	<style type="text/css">
		@page { size: 8.27in 11.69in; margin: 1in }
		p { margin-bottom: 0.1in; direction: ltr; line-height: 115%; text-align: left; orphans: 2; widows: 2; background: transparent }
		a:link { color: #0563c1; text-decoration: underline }
	</style>
</head>
<body lang="en-GB" link="#0563c1" vlink="#800000" dir="ltr"><p style="margin-bottom: 0.11in; line-height: 108%"><a name="_GoBack"></a>
<font color="#0563c1"><u><a href=""><font face="Arial, serif">linked_document.docx</font></a></u></font></p>
</body>
</html>


Expected Results:
the href field shouldn't be empty and should be a path to the linked document like:
<a href="linked_document.docx">linked_document.docx</a>


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 6.3.1.2
Build ID: b79626edf0065ac373bd1df5c28bd630b4424273
CPU threads: 8; OS: Linux 3.10; UI render: default; VCL: gtk3; 
Locale: en-US (C); UI-Language: en-US
Calc: CL
Comment 1 Marc Bessières 2019-09-27 09:17:27 UTC
Created attachment 154584 [details]
document containing the relative link to another document
Comment 2 Marc Bessières 2019-09-27 09:18:00 UTC
Created attachment 154585 [details]
document being linked by the first document
Comment 3 Dieter 2019-10-02 06:08:29 UTC
I couldn't follow the steps, because when I click on link in step 2 I recieve the warning "file:///C:/Users/.../.../../linked_document.docx" is not an absolute URL that can be passed to an external application to open it."

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 460908269972fd1f89312a1e62897ed1503e9e98
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-09-30_09:18:03
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded
Comment 4 NISZ LibreOffice Team 2020-01-08 15:27:18 UTC
Reproduced using 6.3, but not with 6.4 beta1

Bibisecting shows that the export works since:

commit 4c30848c852c44cbad8509c770feed5244f1940f [log] 
author
Tünde Tóth <tundeth@gmail.com> Thu Jul 18 15:10:26 2019 +0200 
committer
László Németh <nemeth@numbertext.org> Thu Jul 25 09:31:34 2019 +0200 

tdf#123627 DOCX import: fix relative hyperlinks to documents

*** This bug has been marked as a duplicate of bug 123627 ***