Bug 149949 - Hyperlink with different character styles gets subdivided when saved and reopen
Summary: Hyperlink with different character styles gets subdivided when saved and reopen
Status: RESOLVED DUPLICATE of bug 148198
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-11 12:22 UTC by phv
Modified: 2022-07-11 14:12 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
How the link is subdivided by character style after save was done (85.81 KB, image/png)
2022-07-11 12:22 UTC, phv
Details
Document saved on Writer (10.48 KB, application/vnd.oasis.opendocument.text)
2022-07-11 12:30 UTC, phv
Details
Same document saved on Word (4.78 KB, application/vnd.oasis.opendocument.text)
2022-07-11 12:31 UTC, phv
Details
Comparison option is turned off (86.60 KB, image/png)
2022-07-11 13:16 UTC, phv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description phv 2022-07-11 12:22:08 UTC
Created attachment 181225 [details]
How the link is subdivided by character style after save was done

I can't understand why LibreOffice subdivides hyperlinks by character style when saving a document in odt format.

Steps to Reproduce:
1. Create a new Writer document with a bookmark.
2. Apply two different character styles on a new hyperlink linked to this bookmark.
3. The hyperlink appears as one in the Navigator.
4. Save the document in odt format.
5. Reopen the same document.

Actual Results:
There is now multiple hyperlinks in the Navigator.
The unique hyperlink was subdivided by character style.

Expected Results:
There should be only one hyperlink in the Navigator.
The unique hyperlink should not be subdivided by character style.

Reproducible: Always

While this behavior does not affect the functionality of the document, it is unacceptable because a unique link that appears as such when it is saved should remain so. Altering the link without notification is overriding the user's work.

The readability of the links in the navigator and their management are both strongly compromised.

Word manages to save this same document in odt format without subdividing the link by character style. Once saved in Word and reopened in Writer, the document still displays a single link with several character styles.

I therefore consider this modification to be problematic even though it corresponds to OpenDocument standard.
Comment 1 phv 2022-07-11 12:30:04 UTC
Created attachment 181226 [details]
Document saved on Writer
Comment 2 phv 2022-07-11 12:31:29 UTC
Created attachment 181227 [details]
Same document saved on Word
Comment 3 phv 2022-07-11 12:46:04 UTC
I have a document whose links are each fragmented into four or five parts. Fortunately, these parts follow each other in the navigator and are not listed in alphabetical order. But changing the target of a link becomes an unproductive pain.

If the modification of the links, without displaying it to the user (I insist on this point) is a standard of OpenDocument then I recommend to add an option for a new feature similar to how Word is behaving.
Comment 4 Mike Kaganski 2022-07-11 12:47:47 UTC

*** This bug has been marked as a duplicate of bug 148198 ***
Comment 5 phv 2022-07-11 13:16:35 UTC
Created attachment 181228 [details]
Comparison option is turned off

Sorry Mike, but I think those are two different bugs, not duplicated ones. In bug report #148198, the cause is the document comparison option which is turned on.

This option is unchecked in my case, so it doesn't interfere with the link creation/saving:
- So, Comparison option "Store it when changing the document" is turned off.
- Applying the character style is done before creating the hyperlink.
- No direct formating is used.
- The text is not edited after the hyperlink has been created.
- Still, Writer subdivides the hyperlink because it has different character styles when saving.

I set this bug to unconfirmed because the descriptions don't match; I doubt that there is any other option that explains such behavior.
Comment 6 Mike Kaganski 2022-07-11 13:20:02 UTC
(In reply to phv from comment #5)

These are the same bug. It doesn't matter which specific character property is different within the text that has the same hyperlink property; in your case, you have applied character styles; in tdf#148198, it was an RSID. But the end result is that instead of a single text run, Writer has several, and each text run is considered a separate link.

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