Bug 147206 - copy+Rich Text Formatting RTF paste special turns entire document into hyperlink text
Summary: copy+Rich Text Formatting RTF paste special turns entire document into hyperl...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.4.0 target:7.3.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2022-02-04 23:07 UTC by Tai
Modified: 2022-02-10 12:19 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tai 2022-02-04 23:07:16 UTC
Description:
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

Steps to Reproduce:
1.Insert>Table of Contents and Index.  Insert an index/table of contents.
2.Copy part or all of the table of contents in a document.
3.Paste special somewhere, select "Rich Text Formatting"
4. See that the entire document has become hyperlink text.  

Actual Results:
The entire document became a hyperlink.  All 1,000+ pages of a business manual.  All headers and all text, all the way to the bottom.  ctrl+z did not reverse the problem.  

Expected Results:
Expected to paste a copy of the text I copied, without affecting other areas of text, especially the entire document.  


Reproducible: Always


User Profile Reset: No



Additional Info:
Sincere apologies if this is not really a bug, but it is such an extreme result that it seems like either it's a bug or there should be a user warning before paste-special.
Comment 2 Mike Kaganski 2022-02-07 07:21:03 UTC
No repro with Version: 6.0.0.3 (x64)
Build ID: 64a0f66915f38c6217de274f0aa8e15618924765
CPU threads: 12; OS: Windows 10.0; UI render: GL; 
Locale: ru-RU (ru_RU); Calc: CL

Repro with Version: 6.4.0.3 (x64)
Build ID: b0a288ab3d2d4774cb44b62f04d5d28733ac6df8
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: GL; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded
Comment 3 ajlittoz 2022-02-07 08:09:05 UTC
Happens also with my LO 7.2.5.2.0+
Comment 4 Mike Kaganski 2022-02-07 09:42:29 UTC
Regression after https://git.libreoffice.org/core/+/58a86af36295b4fc1e07c0bd38f74530a2ce0f08

> author	Michael Stahl <Michael.Stahl@cib.de>	Tue Oct 29 13:44:07 2019 +0100
> writerfilter: use insert position in PushFieldContext()
Comment 5 Mike Kaganski 2022-02-07 09:43:41 UTC
/me is puzzled how could that filter change affect something unrelated to import at all...
Comment 6 Mike Kaganski 2022-02-07 09:45:17 UTC
(In reply to Mike Kaganski from comment #5)
> something unrelated to import at all...

Ah wait, of course it's related to import of RTF.
Comment 7 Commit Notification 2022-02-09 09:59:17 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9d30e168112bc5c3c7f2dfc029f293c540ebb280

tdf#147206 writerfilter: fix end position of hyperlink in ToX

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2022-02-09 13:12:31 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d794c377e503aa7d00dbc6daad0aa32efad9e682

(related: tdf#147206) writerfilter: fix another end in...

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Michael Stahl (allotropia) 2022-02-09 13:15:30 UTC
fixed on master
Comment 10 Commit Notification 2022-02-09 21:45:03 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/55a7b13b542bba70f459b60d58f1616dbeb838ac

(related: tdf#147206) writerfilter: fix another end in...

It will be available in 7.3.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2022-02-10 12:19:22 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/5c0497337cb2cc34091d1ae58dab288a8a9a5454

tdf#147206 writerfilter: fix end position of hyperlink in ToX

It will be available in 7.3.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.