Bug 139737 - EDITING: Undo deletes everything after Paste Special as RTF
Summary: EDITING: Undo deletes everything after Paste Special as RTF
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.4.0 target:7.3.1
Keywords: bibisected, regression
: 133916 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-01-18 10:24 UTC by Xisco Faulí
Modified: 2022-02-03 17:18 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file (33.45 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-01-18 10:24 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2021-01-18 10:24:17 UTC
Created attachment 168982 [details]
sample file

Steps to reproduce:
1. Open attached document ( the document is used in the unittest for bug 131963
2. Select all
3. Copy
4. Paste special as RTF
5. Undo

-> Everything is deleted in the document

Reproduced in

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 6ce66560c59470a9eb76fbf80f439b452166d3e4
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2021-01-18 10:25:24 UTC
it was fine up to https://cgit.freedesktop.org/libreoffice/core/commit/?id=4dc1615c80e8e66d339dc86fa95bbc76e884d988. Then it started to crash copying the content ( bug 129805 ).
The crash was fixed in 
https://git.libreoffice.org/core/commit/cf226535f9903a048b1c105b180ae3a50a776e68
and from this moment on, this issue is reproducible

Adding Cc: to Michael Stahl
Comment 2 Xisco Faulí 2022-01-19 19:33:15 UTC
This issue is happening again in master since https://cgit.freedesktop.org/libreoffice/core/commit/?id=657de5fba12b0e9afcdee361654d2a2d0dbd7311, where https://cgit.freedesktop.org/libreoffice/core/commit/?id=70dd95aabd11b2146e2556c1da87da4a22d6f7b5 got reverted

Reproduced in

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: bd5492275d31f59b1d269205018d1487af52426f
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 3 Commit Notification 2022-01-26 17:49:39 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/94ef342679629c76eff2686243b423e926bbf680

tdf#139737 sw_fieldmarkhide: writerfilter: don't copy header/footer

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 4 Commit Notification 2022-01-26 17:49:48 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#139737 sw_fieldmarkhide: add unit test

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 5 Michael Stahl (allotropia) 2022-01-26 17:51:28 UTC
this was a corner case where inserting a file created new header/footer, which we can't undo
Comment 6 Commit Notification 2022-01-27 09:41:10 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/71dea9a8aa8bd853acff6310c424376d5c73c4f2

tdf#139737 sw_fieldmarkhide: writerfilter: don't copy header/footer

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 7 Commit Notification 2022-01-27 09:42:18 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/938a6a01168c6e091cea6735b1e4037c075dbabb

tdf#139737 sw_fieldmarkhide: add unit test

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 8 Xisco Faulí 2022-02-03 17:18:35 UTC
*** Bug 133916 has been marked as a duplicate of this bug. ***