Description: A weird problem. I've made a proper document with header(page numbers) and a footer(my name). In some cases, if I make a normal copy and paste in the body of the document, the header and footer gets removed and ctrl+z doesn't restore them. Steps to Reproduce: 1. Open Impress and close the template selection window. 2. Write something in the "Click to add Title" field. I've given "Something" and copy the texts of that field. In my case, I'll be copying the text "Something" 3. Open Writer. 4. Give a header and footer. In my case, I'll be giving the page number as header(via Insert Page Number) and the text "LibreOffice" as footer. 5. Now paste the text "Something" in the page body. 6. Undo the text by pressing ctrl+z. Actual Results: When the text is pasted, the header and footer is gone. Moreover, when ctrl+z is pressed, the header and footer is not restored. Expected Results: When the text will be pasted, the header and footer will stay there as in the way were, those shouldn't be erased in the first place. Moveover, when ctrl+z is pressed, everything should be restored in the previous stated, including the header and footer. Reproducible: Always User Profile Reset: Yes Additional Info: This is very annoying.
Confirm with Version: 24.2.1.1 (X86_64) / LibreOffice Community Build ID: 359ef544e625d2ffbfced462ab37bd593ca85fa7 CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded
The bug can be reproduced in another way without the need of Impress. Steps to reproduce: 1. Open Writer and give a header and footer. 2. Insert a shape and insert a text in it. 3. Copy that text and paste in the document body. After pasting it, the header and footer will disappear.
Yes, it's easier to test like this. Version: 24.2.1.2 (X86_64) / LibreOffice Community Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win Locale: ro-RO (en_US); UI: en-US Calc: threaded
Regression introduced by: author Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> 2023-11-28 13:46:21 +0900 committer Tomaž Vajngerl <quikee@gmail.com> 2023-12-01 08:26:38 +0100 commit 4b0fa253a4540f5461397815d290586f9ddabe61 (patch) tree c58c59871244dc75e538caeea40658303da00b8b parent 93357349ff1998b41ea1ebedf09dc1cc5da316f7 (diff) tdf#136472 adjust ooxml import to handle first header/footer Bisected with: bibisect-linux64-24.2
The header being removed after pasting the text started to happen after author Miklos Vajna <vmiklos@collabora.com> 2024-02-05 10:38:06 +0100 committer Miklos Vajna <vmiklos@collabora.com> 2024-02-05 12:36:44 +0100 commit d918beda2ab42668014b0dd42996b6ccc97e8c3a (patch) tree caf41debedf8d50d3c90df7255222a13e406e702 parent 1ae7a81e542c9b072e519d0ea0d4773ed26ca251 (diff) tdf#158814 DOCX import: fix unwanted header with type="first" & no titlePg Adding also Miklos to the loop
Let me see (at least the header removal part).
In debug version I get this: warn:writerfilter:72853:72853:writerfilter/source/dmapper/PropertyMap.cxx:606: Paper source not found com.sun.star.lang.IllegalArgumentException message: "at /home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_master/sw/source/core/unocore/unostyle.cxx:1701" ArgumentPosition: 0 Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 71efd6046488b952f679936ea1c4a415f4989b18 CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c900850742efd4e1fb7c79c13c1b9a17fcd4981d Relatted: tdf#160139 RTF paste: don't turn off headers/footers It will be available in 24.8.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.
MIklos, I build LibreOffice with your latest patch, and I still repro with text copied from a shape. Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: c900850742efd4e1fb7c79c13c1b9a17fcd4981d CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded
(In reply to BogdanB from comment #9) > MIklos, I build LibreOffice with your latest patch, and I still repro with > text copied from a shape. Miklos' patch fixes the bisection from comment 7, which is the header being turned off. The shape disappearing is the bisection from comment 4
(In reply to Commit Notification from comment #8) > Miklos Vajna committed a patch related to this issue. > https://git.libreoffice.org/core/commit/ > c900850742efd4e1fb7c79c13c1b9a17fcd4981d With this patch included in my own build: - comment 0 steps: still reproduced - comment 2 steps: still reproduced (tested on Linux, gtk3 VCL plugin) To any of those STR, you can add the following steps for a crash: a. keep undoing b. if it doesn't crash on undoing, close LO Results: crash in either a or b.
Crash reports in 24.2.1 annoyingly have the <name omitted> signature but both crash STR + undo × 2 lead to the same crash in sw/inc/bparr.hxx:105: - https://crashreport.libreoffice.org/stats/crash_details/c1e2e71d-e087-4252-ad6d-0a2e595f4b56 - https://crashreport.libreoffice.org/stats/crash_details/bc7501f7-41d7-4c1f-8abf-6c2a7e613a92
(In reply to Xisco Faulí from comment #10) > Miklos' patch fixes the bisection from comment 7, which is the header being > turned off. Exactly. :-) I didn't do anything regarding turning the filled in header into an "empty but on" header.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/2e31c7cd2976be3d43b0845e50d0bb4ca7e50179 Relatted: tdf#160139 RTF paste: don't turn off headers/footers It will be available in 24.2.3. 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.
Tried the dev build. The bug can be reproduced.
*** Bug 160263 has been marked as a duplicate of this bug. ***
*** Bug 160236 has been marked as a duplicate of this bug. ***
As shown in bug 160236, this also severely affects Zotero users, as adding or refreshing a bibliography (which happens very frequently) seems to use the same pasting path.
*** Bug 160759 has been marked as a duplicate of this bug. ***
Indeed, Miklos' c900850742efd4e1fb7c79c13c1b9a17fcd4981d does fix the removal of the header on paste. This is the situation since that commit: 1. Writer 2. Type "header" in header and "footer" in footer 3. Insert a shape and type text inside it 4. Copy that text and paste in the document body: header and footer emptied _but still exist_ 5. Ctrl + Z: pasted text removed 6. Ctrl + Z: shape text removed 7. Ctrl + Z: shape removed 8. Ctrl + Z: nothing (supposed to be "undo typing 'footer'", so cursor moves to footer) 9. Ctrl + Z: header text restored; footer removed 10. Ctrl + Z: header text removed 11. Ctrl + Z: header removed 12. Close Writer: crash @Miklos: note that I couldn't crash it at c900850742~1, nor at d918beda2a~1, so maybe something you want to have a look at? @Quikee: any chance you could look at the regression caused by 4b0fa253a4540f5461397815d290586f9ddabe61?
*** Bug 160045 has been marked as a duplicate of this bug. ***
Minimal steps from duplicate bug 160045: 1. Insert any text into the header 2. Copy it 3. Paste with Ctrl + Shift + V, select RTF
But the problem occurs only when copying from Calc. if I copy from another source the header is not deleted
(In reply to sbagliato from comment #23) > But the problem occurs only when copying from Calc. > if I copy from another source the header is not deleted That's because the default Paste format when copying Calc data is RTF. You can see with other paste formats in Ctrl + Shift + V that the bug does not occur.
*** Bug 161630 has been marked as a duplicate of this bug. ***
*** Bug 161564 has been marked as a duplicate of this bug. ***
*** Bug 161952 has been marked as a duplicate of this bug. ***
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/aaf93cd9629acd476284a4933a656ddd188a80aa tdf#160139 sw RTF paste: don't empty headers/footers It will be available in 25.2.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.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/54410768676b247c2524aae229574527c67dc1d5 tdf#160139 sw RTF paste: don't empty headers/footers It will be available in 24.8.0.2. 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.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/82b9c13bc59b94ee5b42d0d7384d807d323aaf67 tdf#160139 sw RTF paste: don't empty headers/footers It will be available in 24.2.6. 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.
Fix verified for pasting something from Header, from shape, from Calc and from Impress in: Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: ccc3996cfcbebe14e9d5f3511906cfc64ddf3452 CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: CL threaded Thanks Justin! I think you can mark as fixed :)
I've tested the latest dev build of 25.2 and I can confirm that the bug no longer exist. Thank you for your time and effort. <3
*** Bug 162170 has been marked as a duplicate of this bug. ***
*** Bug 162350 has been marked as a duplicate of this bug. ***
*** Bug 161356 has been marked as a duplicate of this bug. ***
*** Bug 162500 has been marked as a duplicate of this bug. ***