Description: An object is anchored to a cell. If this cell or the row containing this cell is deleted, the object is anchored to the cell below. Steps to Reproduce: 1. Open attached document 2. Select first row 3. Right click -> select "Delete Rows" in popup menu Actual Results: The first row has now two checkboxes anchored to cell B1 Expected Results: I would expect, that objects that are anchored to a cell, are deleted together with that cell. Intuitively I would say that rows with checkboxes as in this example indicates a choice that belongs to this row and not the next. Reproducible: Always User Profile Reset: No Additional Info: Workaround would be, that I select "Clear Contents" or press the backspace key, where in a popup dialog I can decide what to delete. So, I'm not sure if this is really a bug. There is a similarly bug: 122982.
Created attachment 149654 [details] Calc document with two checkboxes
reproducible with: Version: 5.4.7.2 (x64) Build-ID: c838ef25c16710f8838b1faec480ebba495259d0 CPU-Threads: 4; BS: Windows 6.19; UI-Render: Standard; Gebietsschema: de-DE (de_DE); Calc: single Version: 6.1.5.2 (x64) Build ID: 90f8dcf33c87b3705e78202e3df5142b201bd805 CPU threads: 4; OS: Windows 10.0; UI render: default; Locale: de-DE (de_DE); Calc: and even with AOO 4.1.5
Expectations may vary. For clarification: I would never expect that a drawing object is deleted just because I clear a cell. I could expect that if I entirely delete a column or row, but not when clearing a single cell or range of cells without removing those cells.
(In reply to Eike Rathke from comment #3) > I could expect that > if I entirely delete a column or row, but not when clearing a single cell or > range of cells without removing those cells. Unless the object is anchored to a cell, deleting or clearing a row should have no effect on any type of floating object. This is how all other major spreadsheets behave.
I only mention delete operations on anchored objects, not clear operations. In my attached example, I think the user would be irretated, if he delete a row with an anchored object and has then two anchored objects in the next row. He has to delete the anchored object manually, but as there are two objects in the cell, he must find the right one.
My previous comment appears incorrect. Delete cell and row is not the correct command here. I tested the objects comparing the behavior of Calc, Excel, and WPS Sheets. All 3 behaved the same way. Deleting a row, column, or cell did NOT remove form, image, nor shape objects. If you want to remove objects, you need to use the "clear contents" command. If you want to move them, cutting and pasting works. So, unless I'm missing something, it appears that this bug report is invalid and we should not change the behavior. The correct procedure to achieve your expected results is: 1. Open attached document 2. Select first row 3. Right click -> select "Clear Contents" in popup menu This achieves your Expected Results.
(In reply to Luke from comment #6) > My previous comment appears incorrect. Delete cell and row is not the > correct command here. I tested the objects comparing the behavior of Calc, > Excel, and WPS Sheets. All 3 behaved the same way. Deleting a row, column, > or cell did NOT remove form, image, nor shape objects. Was that for anchored to cell, or anchored to page, or both?
(In reply to Eike Rathke from comment #7) > Was that for anchored to cell, or anchored to page, or both? Both. You can try a simple example like attachment 140404 [details] in Excel. With all 3 anchor types you can see that deleting the cell, row, or column does not affect the object linked to the anchor.
(In reply to Eike Rathke from comment #7) > Was that for anchored to cell, or anchored to page, or both? Both. You can try a simple example like attachment 140404 [details] in Excel. With anchor to cell and anchor to page, deleting the cell, row, column, or entire worksheet does not delete the objects themselves. The objects anchored to the cell are not deleted, but they are shifted when their anchors are removed. Only if the object is anchored "move + size" will it be deleted by right clicking and selecting delete. However, it will not be deleted by pressing Delete (DEL) on the keyboard when the cell that contains it is selected.
Ilhan Yesil committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/d2fa9c0d657877c967e41fdd0091f81d1b7ca048%5E%21 tdf#123762 Cell anchored object is deleted if cell is deleted It will be available in 6.3.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.