Bug 140806 - FORMATTING: Pivot table style number format is ignored when source number format is set
Summary: FORMATTING: Pivot table style number format is ignored when source number for...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Pivot-Table
  Show dependency treegraph
 
Reported: 2021-03-04 22:07 UTC by esl
Modified: 2024-12-18 00:53 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple pivot table to demonstrate bug (18.52 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-03-04 22:08 UTC, esl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description esl 2021-03-04 22:07:45 UTC
Description:
Modifying the number of decimals in the style of a pivot table is working correctly as long as the source data is not formatted. When the number of decimals in the source data is set, the pivot table is ignoring the decimals set in the style and shows the same number of decimals as the source data.

Steps to Reproduce:
1. Create pivot table from data without number formatting
2. Define number formatting in style
3. Set number of decimals in source data
4. Refresh pivot table

Actual Results:
Style number formatting is ignored

Expected Results:
Number formatting applied as per style


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Not sure which version this first occurred in. I've seen it in 6.x several versions, perhaps earlier, though didn't report it back then as I wasn't sure I didn't make a mistake.

Also it seems to be a re-occurrance of bug #64440
Comment 1 esl 2021-03-04 22:08:53 UTC
Created attachment 170218 [details]
Simple pivot table to demonstrate bug
Comment 2 Mx 2021-04-03 20:14:47 UTC
Comment on attachment 170218 [details]
Simple pivot table to demonstrate bug

The results in the dynamic table were entered by hand and not calculated by the table
Comment 3 esl 2021-04-03 20:44:27 UTC
I think you misunderstand the example.

The table in F9:G37 was added to show that the pivot table style number formatting is applied correctly in those cells, irrespective of source formatting in C9:C37.

However in the pivot table on tab "Pivot Table_Sheet1_1", the number formatting in the styles is only applied as long as the source does not have a defined number of decimals.
Comment 4 Roman Kuznetsov 2022-09-20 17:02:24 UTC
repro in

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: a3bbdfab809609bec3475613a918eda699fbdc29
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: threaded
Comment 5 Stéphane Guillou (stragu) 2024-07-22 13:03:29 UTC
Reproduced in:

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8705cfecd5a10f817d3a2a02041d85e77282aa30
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

and in 4.0.0.3 as well, but not in 3.4.0rc1 -> regression.
Comment 6 Timur 2024-12-02 11:26:52 UTC
This was good before table disappeared:

 commit 19f4ebd8a54da0ae03b9cc8481613e5cd20ee1e7
    Author:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Tue Nov 13 09:49:18 2012 +0000
    
        use SetControlForeground instead of SetTextColor
    
        because that's persistent across unrelated style
        changes otherwise setting e.g. alignment will
        reset the color to default black


When the table reapppeared, it was already bad:

 commit 90830788b1f8fd61ea86135712868aeda395edd0
    Author:     Noel Grandin <noel@peralex.com>
    CommitDate: Tue Sep 17 09:06:12 2013 +0200
    
        convert the SvxAutoCorrect::FindIn* methods from String to OUString
Comment 7 m_a_riosv 2024-12-18 00:53:29 UTC
Still with
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7b9077669541b5685f3758b7a640b7e0d10dbe1b
CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded