Table of Contents copy+Rich Text Formatting paste special makes entire document hyperlink

Hello,

English LibreOffice Writer app.
There’s a big table of contents/index for a +1,000 page startup company manual. This is a table of contents made by insert>Table of Contents and Index.

I copied a portion of the “index”/table of contents and then pasted it. But I chose “paste special” out of habit, and selected “Rich Text Formatting” to see what would happen. Now the entire document is blue and underlined, and behaves like a hyperlink that directs to one of the topmost headers.

Can you tell me how to reverse this? ctrl+z didn’t fix it.
Is rich text formatting paste special supposed to turn the entire document into a hyperlink? Why can’t this be reversed?

Thank you for your time.
, Tai

Confirmed. I made a small document, added some headings, inserted a hyperlinked TOC, copied part of the TOC and pasted somewhere in the document as Rich Text Format. The result was three lines of hyperlinked text (just the ones that I pasted), and from that point the document acts like a hyperlink to the last item in the selection. It seems to be impossible to remove that behavior: deleting the pasted text, selecting and Ctrl+M or Clear formatting from the styles list box doesn’t remove it. Selecting the rest of the document, cutting and pasting back as unformatted text does though. Looks like a bug to me.

EDIT in reply to ajlittoz: it struck me that the hyperlinks in the TOC didn’t reflect the colors in the link character styles, nor did the link(s) in the rest of the document, after the bad paste. It remained in the default text color.

1 Like

I get a different result: here LO 7.2.5.2.0+ under Fedora Linux 35.

Made a “lorem” document with three Heading 1. Creating a TOC at end as usual. Copied first Contents 1 and pasted it as RTF in the middle of the document.

The inserted TOC excerpt is still Contents 1 with hyperlink and I have no special rendering (no gray background nor any underlining) though the hyperlink is there.

BUT the original TOC is damaged: the hyperlink target under the line I copied is changed to the one following it and even the whole TOC now hyperlinks to the same single destination, chapter two in my case!

There is definitely a bug.

Regarding the impossibility to remove the hyperlink styling, it reminds me of a weird styling behaviour. I use to tell there are three style layers: paragraph, character, direct formatting but when you want to be very accurate, there are in fact four layers: paragraph, character, DF and links with their dedicated character styles. This is the only context in which you can have two character styles applied simultaneously. And the extra char style can’t be removed with Ctrl+M.

To see if you are in this context, try to change one of Index Link, Internet Link or Visited Internet Link, e.g. change font color or font size. In my case, nothing happened but I have already no underline in my document. So I may face another bug than yours.

1 Like

Thanks so much for your responses. I submitted a bugzilla report. I’m not sure how to test other links styles, but will try to research when I’ve got the time. All appreciated.

tdf#147206