Bug 137587 - Removing field from header also removes watermark (Steps in comment 4)
Summary: Removing field from header also removes watermark (Steps in comment 4)
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Writer-Header-Footer
  Show dependency treegraph
 
Reported: 2020-10-19 09:10 UTC by Steve D
Modified: 2022-06-16 11:55 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
document for testing (11.16 KB, application/vnd.oasis.opendocument.text)
2020-10-19 14:21 UTC, BogdanB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve D 2020-10-19 09:10:14 UTC
- Create a new document in Writer
- Insert a watermark via the "Format-Watermark" menu item
- Double-click into the header
- Insert a field into the header via the "Insert-Field" menu item (I chose 'Date')
- Click on the field so it is selected
- Press 'Delete'
- The field is removed, but the watermark is also deleted

NB: This doesn't happen if there is other text in the header

NB: This also happens if you insert a different item (rather than a watermark) such as a TextBox into the header, i.e.
- Create a new document in Writer
- Double-click into the header
- Insert a TextBox into the header via the "Insert-TextBox" menu item and add some text to the TextBox
- Insert a field into the header via the "Insert-Field" menu item (I chose 'Date')
- Click on the field so it is selected
- Press 'Delete'
- The field is removed, and the TextBox is also deleted
Comment 1 BogdanB 2020-10-19 09:17:52 UTC Comment hidden (obsolete)
Comment 2 BogdanB 2020-10-19 09:20:49 UTC Comment hidden (obsolete)
Comment 3 Timur 2020-10-19 12:55:50 UTC Comment hidden (obsolete)
Comment 4 BogdanB 2020-10-19 14:21:53 UTC
Created attachment 166512 [details]
document for testing

Steps:
- Open the file
- Click on the time field in the header and press DELETE
- Watermark should NOT be removed.
Comment 5 BogdanB 2020-10-19 14:25:45 UTC
NOT ok in
Version: 6.3.1.2
Build ID: b79626edf0065ac373bd1df5c28bd630b4424273
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded

--------------------------------

Ok in
Version: 6.2.8.2
Build ID: f82ddfca21ebc1e222a662a32b25c0c9d20169ee
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded

Ok in
Version: 6.1.6.3
Build ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk2; 
Locale: ro-RO (ro_RO.UTF-8); Calc: group threaded

Ok in
Version: 6.0.7.3
Build ID: dc89aa7a9eabfd848af146d5086077aeed2ae4a5
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk2; 
Locale: ro-RO (ro_RO.UTF-8); Calc: group
Comment 6 Attila Baraksó (NISZ) 2020-10-24 08:01:11 UTC
Bibisected using linux-64-6.4 to:
URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=28b77c89dfcafae82cf2a6d85731b643ff9290e5
author: Michael Stahl <Michael.Stahl@cib.de>
committer: Michael Stahl <Michael.Stahl@cib.de>
summary: tdf#117185 tdf#110442 sw: bring harmony & peace to fly at-char selection

Adding CC: Michael Stahl
Comment 7 Michael Stahl (allotropia) 2020-10-27 16:48:32 UTC
this is similar to bug 133957, but with at-char anchor type
Comment 8 BogdanB 2021-12-29 17:13:36 UTC
Also in
Version: 7.2.4.1 / LibreOffice Community
Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 9 Michael Stahl (allotropia) 2022-06-16 11:55:10 UTC
the scenario in the description still removes the image, but with the fix for bug 133957 if you don't create a selection but use the keyboard backspace/delete to delete the field then the image will not be deleted.

if you explicitly select then anchored objects will be deleted, otherwise not; you can already see this in the UI because the selected anchored object gets highlighted.

unfortunately drawing objects don't get highlighted, only Writer's own text frames, images, and embedded objects - this should be improved, i've found bug 141210 about this.

this exact scenario in the attachment also seems difficult to change because in the attachment the field is the only content in the header, so selecting it is indistinguishable from a CTRL+A selection, which definitely should delete everything anchored in the header.

so i don't think i want to fix anything here, of course it behaves different than before but it's not clear to me that it's behaving wrongly.