Issue 123988 - ODF Interoperability: Hyperlink uses implicitly the style Internet_20_link, but not references it
Summary: ODF Interoperability: Hyperlink uses implicitly the style Internet_20_link, b...
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: 4.1.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.1.0
Assignee: Oliver-Rainer Wittmann
QA Contact:
URL:
Keywords: needhelp
Depends on:
Blocks:
 
Reported: 2014-01-07 13:45 UTC by svanteschubert
Modified: 2017-05-20 10:35 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Simple test file with an Hyperlink (8.64 KB, application/vnd.oasis.opendocument.text)
2014-01-07 13:45 UTC, svanteschubert
no flags Details
A document without manual removal to see how it was created from DOC (7.32 KB, application/vnd.oasis.opendocument.text)
2014-05-13 16:27 UTC, svanteschubert
no flags Details
The original document the ODT was created from (9.00 KB, application/msword)
2014-05-13 16:29 UTC, svanteschubert
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description svanteschubert 2014-01-07 13:45:58 UTC
Created attachment 82236 [details]
Simple test file with an Hyperlink

Opening an ODF text file with Hyperlinks in other ODF applications, such as MSO15 does not show any hyperlinks.

Hyperlink uses implicitly the style Internet_20_link, but not references it.
Proof is, that if the style is being edited in the styles.xml e.g. the color is set to ff0000 (red) the hyperlink changes its color as well.
Comment 1 Edwin Sharp 2014-01-07 14:47:53 UTC
Attachment hyperlink is visible in abiword 2.9.2 and Calligra Words 2.6.4.

What makes you think the problem is not with MS015 (download link?) ?
Comment 2 svanteschubert 2014-01-07 14:58:50 UTC
Hi Edwin, please take a look into the ODF ZIP at the content.xml file.

<text:p text:style-name="Standard">He<text:a xlink:type="simple" xlink:href="http://www.heise.de/">llo Wor</text:a>ld!</text:p>

text:p is a paragraph and text:a is the anhor and there is not explicit style being given via a text:style-name attribute as for the paragraph.

Still this is possible (see the text:style-name, in the ODF 1.2 XML schema from http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-schema.rng line 1985). The usage of the template style "Internet_20_link" from the styles.xml (proofed by changing the color - e.g. I did it by using JEdit with archive extension) should be made explicit, so every ODF application can show the correct style.

The ODF 1.2 standard does not mention the used implicit dependency, see 
docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html


BTW MSO15 is MS Office 2013. ;)
Comment 3 Edwin Sharp 2014-01-07 15:09:20 UTC
Thanks for clarifying.
Comment 4 jsc 2014-01-07 16:26:25 UTC
it would make indeed sense to reference the style automatically when a new link is created/inserted via the hyperlink dialog.

When you apply the internet link style afterwards it is written correct to ODF.
Comment 5 svanteschubert 2014-01-07 21:21:32 UTC
During my time at Sun we had often the discussions about the differentation of enhancement/defect/feature.
Allow me to provide an argumentation of this being an defect rather than enhancement and according to a UNIX system no answer means good, I will already change optimistically the type to defect. ;)

I understand your perspective that the format of the hyperlink is already working in AOO and the change of the style is only an enhancement for AOO users. That is correct when the created documents are only being exchanged in an homogenous environement.
But if ODF documents should be usable by arbitrary ODF applications, the current behavior is an interoperability issue for people exchanging ODF documents as the ODF specification does not define the used behavior.
The ODF specification is like a blue print for applications. If an application does not behave according to the specification, the application behaves incorrect (defect).
In our case the specification writes that styles defined in the styles.xml and identified by a style in the styles.xml:

<style:style style:name="Internet_20_link" style:display-name="Internet link" style:family="text">
	<style:text-properties fo:color="#000080" fo:language="zxx" fo:country="none" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" style:language-asian="zxx" style:country-asian="none" style:language-complex="zxx" style:country-complex="none"/>
</style:style>

Should be referenced from the content.xml as:
<text:p text:style-name="Standard">He<text:a text:style-name="Internet_20_link" xlink:type="simple" xlink:href="http://www.heise.de/">llo Wor</text:a>ld!</text:p>

So users exchanging documents within the ODF ecosystems have the same user experience.
Comment 6 Oliver-Rainer Wittmann 2014-01-08 10:22:17 UTC
taking over to fix this issue for the next release.

Defect cause:
The character styles for an hyperlink (the one used for the unvisited state and the one for the visited state) are not available via the UNO-API, when the hyperlink is newly created. The ODF export works with the UNO-API to store the document into the ODF format.

After opening and confirming the hyperlink character format dialog pane (Menu Format - Character - Hyperlink) these character styles are available at the UNO-API and will be stored into the ODF format.
Comment 7 SVN Robot 2014-01-09 12:59:28 UTC
"orw" committed SVN revision 1556797 into trunk:
123988: assure that hyperlink attribute (<SwFmtINetFmt>) always provides char...
Comment 8 Oliver-Rainer Wittmann 2014-01-17 06:30:38 UTC
fixed on trunk for next release
Comment 9 svanteschubert 2014-05-13 16:27:57 UTC
Created attachment 83380 [details]
A document without manual removal to see how it was created from DOC
Comment 10 svanteschubert 2014-05-13 16:29:22 UTC
Created attachment 83381 [details]
The original document the ODT was created from