Bug 117043 - PIVOT TABLE: refresh bug
Summary: PIVOT TABLE: refresh bug
Status: RESOLVED DUPLICATE of bug 41645
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.5.1 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Pivot-Table
  Show dependency treegraph
 
Reported: 2018-04-16 16:43 UTC by rking
Modified: 2025-03-05 14:58 UTC (History)
4 users (show)

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 rking 2018-04-16 16:43:53 UTC
Description:
Loss of style while refreshing pivot table

Steps to Reproduce:
1.Create a Pivot Table from a set of data
2.Add a style to the Pivot Table
3.Edit the set of data and refresh the Pivot Table and Voilà

Actual Results:  
Loss of style while refreshing the Pivot Table

Expected Results:
Shouldn't loose the style sheet


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Comment 1 m_a_riosv 2018-04-16 23:09:27 UTC
Pivot table has their own styles, and they are used every time it is refreshed,

Once a pivot table is create they can be changed, but affect all pivot tables in the file.
Comment 2 Xisco Faulí 2018-07-18 14:56:36 UTC
Dear rking,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.
Comment 3 m_a_riosv 2018-07-18 18:02:53 UTC
BTW I don't think it is a bug.

Maybe could be a enhancement, if every PT could have their own styles inherited from default pt styles, so a style for particular pt could be changed.
Comment 4 Julien ROPE 2018-11-05 12:15:44 UTC
 Hi,

 I've been working with rking on this issue, and I'd like to add some context.

 I understand how pivot table styles are applied - I looked at the source code and understand how Calc is looking for styles based on their name, and apply them when the table is created/refreshed.

 The problem is not about applying custom styles. The default styles were used, and edited to have the expected look.
 The problem is that this was done with an earlier version of LibreOffice (5.2), and then opened in 5.4.

 What happens is that the translations for the LibreOffice pivot styles (in French) have been modified in 5.3, and then again in master.
 See for example the "Pivot Table Value" translation history here : https://translations.documentfoundation.org/fr/libo54_ui/translate/sc/source/ui/src.po#search=PIVOT&sfields=source,target&unit=130435809&offset=0

 Then Calc is now looking for default styles with a different name than those found in the document. Since it doesn't find them, it re-creates them with the new name, completely empty. Those new styles are then applied, and the user see the styles disappear.

 Looking for a hard-coded string is causing the problem: whenever the string changes (for a typo, or a translation), you loose everything.

 NOTE: it is similar to the bug described here (https://bugs.documentfoundation.org/show_bug.cgi?id=44763), except we're not moving the document between different locales environments, but from one version of LibreOffice to another.

 From a user's standpoint, without creating any custom styles, this really looks like a bug.

 I understand the problem is not an easy one and won't have an easy fix. But is there a way to fix this bad reference in a document (other than manually renaming each style in every document)?
 Something we could apply as a batch on all existing documents for instance ?
Comment 5 Arnaud Versini 2018-12-12 19:39:54 UTC
Cédric made a patch on Writer about issue using translated names few years ago. Perhaps you could check those modifications.

ODF are XML zipped so you can easily create some scripts to modify documents.

Ps : it's easier to check bugs when an example document is provided.
Comment 6 QA Administrators 2021-02-27 04:12:41 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2023-02-28 03:19:45 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2025-02-28 03:11:46 UTC Comment hidden (obsolete)
Comment 9 Piotr Osada 2025-03-05 14:58:46 UTC

*** This bug has been marked as a duplicate of bug 41645 ***