Bug 44661 - PIVOTTABLE: Pivot table layout definition doesn't survive a sheet relocation.
Summary: PIVOTTABLE: Pivot table layout definition doesn't survive a sheet relocation.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 Beta2
Hardware: Other All
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: BSA target:3.5
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-10 22:16 UTC by Kohei Yoshida
Modified: 2012-01-11 12:36 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kohei Yoshida 2012-01-10 22:16:32 UTC
1. Create a pivot table from an internal sheet source range via a defined name.  Create it on a new sheet.

2. Move the sheet that has the pivot table on it.

That's all.  After the relocation, open the pivot table layout dialog and check its data source, sometimes the range name becomes a raw range reference that the name refers to, and other times it points to the wrong sheet, thereby destroying the layout info completely.

We need to fix this.
Comment 1 Kohei Yoshida 2012-01-10 22:17:33 UTC
I'll fix it.
Comment 2 Kohei Yoshida 2012-01-10 22:35:05 UTC
I should fix this for 3.5.
Comment 3 Kohei Yoshida 2012-01-11 08:37:02 UTC
To reproduce, have a document that has

* source data in sheet 1 and have a name created for the source data.
* empty sheet 2,
* pivot table created from the name as source data.

At this point, the main pivot table dialog shows the name as the source data.

Now, delete the empty sheet 2.  Now, when you open the main pivot table dialog, the source data name is replaced with the raw range.
Comment 4 Kohei Yoshida 2012-01-11 09:29:36 UTC
Ok.  The range name source issue is now resolved.

http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5&id=390c0b86a91f6c65e8da84b26ecd9c2b726715b8

Now, a slightly more subtle problem.  Calc currently doesn't update the range of the data cache when modifying the sheet structure.  I'm looking into that now.
Comment 5 Kohei Yoshida 2012-01-11 12:36:01 UTC
Ok.  Now the pivot caches for the internal sheet ranges get properly updated when they move.

http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5&id=1e88cd643a5959271f28eaaab3d14488374df11f

On the surface the users won't notice a change by this, but the memory usage will be reduced since we properly keep track of the caches' locations.