Bug 112429 - officeooo:rsid multiplies the links
Summary: officeooo:rsid multiplies the links
Status: RESOLVED DUPLICATE of bug 148198
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.7.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-16 15:37 UTC by regivanx
Modified: 2022-07-11 13:40 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
With officeooo:rsid, links are multiplied (25.83 KB, application/vnd.oasis.opendocument.text-flat-xml)
2017-09-16 15:37 UTC, regivanx
Details
Before link editing (24.73 KB, application/vnd.oasis.opendocument.text-flat-xml)
2017-10-02 09:03 UTC, regivanx
Details

Note You need to log in before you can comment on or make changes to this bug.
Description regivanx 2017-09-16 15:37:37 UTC
Created attachment 136289 [details]
With officeooo:rsid, links are multiplied

Hello,

_ create a new document,

_ write a hypertext, linked to localhost for example,

_ save, close, and reopen the file in LibreOffice,

_ in the middle of the hypertext, write a new text,

_ save, close, and reopen the file in LibreOffice.

There are now three hyperlinks (one with automatic style T2, which has a unique identifier in <office:automatic-styles/>) instead of just one.

Instead of:

<text:a xlink:type="simple" xlink:href="http://localhost/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">Hello <text:span text:style-name="T2">small </text:span>world!</text:a>

we have:

<text:a xlink:type="simple" xlink:href="http://localhost/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">Hello </text:a><text:a xlink:type="simple" xlink:href="http://localhost/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link"><text:span text:style-name="T2">small </text:span></text:a><text:a xlink:type="simple" xlink:href="http://localhost/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">world!</text:a> 

Thus, at each new edition of the links, the links are multiplied.

Of course, this bug disappears if officeooo:rsid is disabled in the options.
Comment 1 Xisco Faulí 2017-10-01 22:44:06 UTC
I can't reproduce it in

Version: 6.0.0.0.alpha0+
Build ID: 1d0fbc9927f357d25859b7cca7ea5e9a9637681e
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 2 regivanx 2017-10-02 08:47:37 UTC
I can reproduce it in:

LibreOffice 5.4.1.2.0 40m0(Build:2)

What do you have in content.xml?

It is necessary to start from a file that contains this:

<text:p text:style-name="P1">
	<text:a xlink:type="simple" xlink:href="http://localhost/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">
		localhost
	</text:a>
</text:p>

Then if you close and reopen with LibreOffice, editing the link and saving will give this:

<text:p text:style-name="P1">
	<text:a xlink:type="simple" xlink:href="http://localhost/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">
		local
	</text:a>
	<text:a xlink:type="simple" xlink:href="http://localhost/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">
		<text:span text:style-name="T1">
			hello
		</text:span>
	</text:a>
	<text:a xlink:type="simple" xlink:href="http://localhost/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">
		host
	</text:a>
</text:p>

On the other hand, if you start with a file that contains this:

<text:p text:style-name="P2">
	<text:a xlink:type="simple" xlink:href="http://localhost/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">
		<text:span text:style-name="T2">
			localhost
		</text:span>
	</text:a>
</text:p>

You will not be able to reproduce the bug, because the problem comes from the way LibreOffice adds automatic styles: if there is already an automatic style (here: "T2"), you will get correctly:

<text:p text:style-name="P2">
	<text:a xlink:type="simple" xlink:href="http://localhost/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">
		<text:span text:style-name="T2">
			localhellohost
		</text:span>
	</text:a>
</text:p>

Thank you for your interest in this bug. :)
Comment 3 Xisco Faulí 2017-10-02 08:56:06 UTC
Could you please attach the original file ? I think the one already attached is the ending file?
Comment 4 regivanx 2017-10-02 09:03:54 UTC
Created attachment 136678 [details]
Before link editing

In fodt for easier handling, but it is the same with odt.
Comment 5 Buovjaga 2017-11-02 17:31:20 UTC
(In reply to regivanx from comment #4)
> Created attachment 136678 [details]
> Before link editing
> 
> In fodt for easier handling, but it is the same with odt.

Reproduced.

Couldn't open in 3.3 due to some Java crap, so oldest tested is 3.6.

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha1+
Build ID: fff7097f1ed8493de099d79aa0613ea6b309100a
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on November 2nd 2017

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 6 QA Administrators 2018-11-03 03:50:20 UTC Comment hidden (obsolete)
Comment 7 Regina Henschel 2018-11-03 22:18:46 UTC
The additional links are still generated in Version: 6.2.0.0.alpha1+ (x64)
Build ID: e33424dd887cb1a11a3dba2513ef0f4bf93a6dbe
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-01_00:43:29
Locale: de-DE (en_US); Calc: CL
Comment 8 QA Administrators 2019-11-04 03:28:52 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2021-11-04 04:10:09 UTC Comment hidden (obsolete)
Comment 10 Mike Kaganski 2022-07-11 13:40:34 UTC

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