Bug 88749 - Edit>Delete Contents should not allow to delete Pivot Table
Summary: Edit>Delete Contents should not allow to delete Pivot Table
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.8.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Pivot-Table
  Show dependency treegraph
 
Reported: 2015-01-23 14:55 UTC by Pedro
Modified: 2023-01-03 09:59 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample spreadsheet containing a non-visible Pivot Table (21.34 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-01-23 14:57 UTC, Pedro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro 2015-01-23 14:55:27 UTC
Under LibreOffice (at least 4.2.8 and higher, didn't test earlier) the user can not delete rows, columns or cells containing a Pivot Table (unlike Excel).

It is not a bad idea to restrict this operation to the option Data > Pivot Table > Delete

However if the user doesn't know that and after failing to delete Rows, Columns or Cells (which popup a IMO incomplete warning), then resorting to Delete Contents does _apparently_ work.

In the attached file a Pivot Table was created starting at cell B10 and then was deleted using Edit>Delete Contents

The problem is that the Pivot Table although not visible is "still there".

This can easily be proven by 
1) trying to delete Rows 10 to 15 
2) by clicking on any cell in the range B10 to F15 and selecting Data > Pivot Table > Create
3) right click on any cell in the range B10 to F15 and click on Refresh

So the suggestions are
a) When the user tries to delete a range containing a Pivot Table using Edit>Delete Contents popup the same warning as for Delete Rows, Columns or Cells

b) Improve the error message by mentioning that "To remove a Pivot Table use option Data > Pivot Table > Delete or right click on the Pivot Table and select Delete"
Comment 1 Pedro 2015-01-23 14:57:22 UTC
Created attachment 112722 [details]
Sample spreadsheet containing a non-visible Pivot Table
Comment 2 raal 2015-01-23 21:58:07 UTC
I can confirm with Version: 4.5.0.0.alpha0+
Build ID: 60143f4f7bc50054dcef923218b8c7c3bc154933
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-01-21_04:58:34
Comment 3 QA Administrators 2016-09-20 09:37:07 UTC Comment hidden (obsolete)
Comment 4 Pedro 2016-09-29 14:49:23 UTC
The problem is still present in 5.2.2.2

This is somewhat a regression. In version 4.0.6 deleting the rows actually removes all the Pivot Table. But selecting a single row within the Pivot range would delete the line converting the Pivot to a regular table (which is not expected).

There are two problems here: 1) Delete Contents (currently Clear Contents) should not hide the Pivot Table but effectively Clear all cell content; 2) If the range selected includes a Pivot Table then Clear or Delete Rows or any other insert/delete function should a) take effect if the whole table is selected or b) it should show the error message "You cannot insert or delete cells when the affected range intersects with pivot table." if only a part of the Pivot Table is selected

This is what happens in Excel and is a logical result.
Comment 5 QA Administrators 2017-10-23 14:15:28 UTC Comment hidden (obsolete)
Comment 6 Pedro 2017-10-24 09:27:24 UTC
Yes, this bug still occurs in LO 5.3.6 and 5.4.2 under Windows 7.
Comment 7 elicoten 2018-01-01 16:43:12 UTC
I have a similar problem where I pasted some data from Google Spreadsheets and now there are some cells which it won't let me delete with the error

"You cannot insert or delete cells when the affected range intersects with pivot table."

I don't think there is currently a pivot table in the source spreadsheet where I copied and pasted from (it's possible there was one there that was deleted/moved) but now Calc seems to think there's a pivot table in rows 2-6 and won't let me delete any of the rows. I have tried clearing contents and then deleting the rows but still get the same error.

I can't see any pivot table in my Calc spreadsheet.
Calc Version: 5.4.4.2 on Ubuntu.
Comment 8 QA Administrators 2019-01-02 03:34:25 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2021-01-02 03:45:28 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2023-01-03 03:19:11 UTC Comment hidden (obsolete)
Comment 11 Pedro 2023-01-03 09:59:56 UTC
Bug is still present in the latest Collabora Office (and in LibreOffice 6.4.7.2)

Version: 22.05.9.20221219
Build ID: 982efcdb8be0f3a591a8bd59c3e260eab4aec4c8
CPU threads: 8; OS: Linux 5.14; UI render: default; VCL: gtk3
Locale: pt-PT (pt_PT.UTF-8); UI: en-US
Calc: CL