Bug 169366 - LibreOffice Impress ignores cell-level formatCode in pptx charts
Summary: LibreOffice Impress ignores cell-level formatCode in pptx charts
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
25.8.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pptx
Depends on: 142108
Blocks:
  Show dependency treegraph
 
Reported: 2025-11-10 11:06 UTC by mvarnar
Modified: 2025-11-17 19:16 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
file with incorrect chart (49.73 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2025-11-10 11:06 UTC, mvarnar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mvarnar 2025-11-10 11:06:48 UTC
Created attachment 203851 [details]
file with incorrect chart

Description:
When importing PPTX files with charts containing mixed data formats, LibreOffice Impress incorrectly renders time values by ignoring cell-specific format codes and applying only the general format to all data points.

Steps to Reproduce:

Create a chart in Microsoft PowerPoint with mixed time formats:

Most cells formatted as "h:mm"

Some individual cells formatted as "[h]:mm:ss"

Save the presentation as PPTX

Open the file in LibreOffice Impress

Observe the chart rendering

Expected Result:

Cell with value 2.206 and formatCode="[h]:mm:ss;@" should display as 52:56:38

Other cells with general h:mm format should display accordingly

Actual Result:

All cells are rendered using the general <c:formatCode>h:mm;@</c:formatCode>

Value 2.206 incorrectly displays as 4:56 instead of 52:56:38

Cell-specific <c:pt formatCode="..."> attributes are completely ignored

How it looks in xml chart:
<c:numRef>
    <c:f>Лист1!$B$2:$B$4</c:f>
    <c:numCache>
        <c:formatCode>h:mm;@</c:formatCode>
        <c:ptCount val="3"/>
        <c:pt idx="0">
            <c:v>0.59699999999999998</c:v>
        </c:pt>
        <c:pt idx="1">
            <c:v>0.72</c:v>
        </c:pt>
        <c:pt idx="2" formatCode="[h]:mm:ss;@">
            <c:v>2.206</c:v>
        </c:pt>
    </c:numCache>
</c:numRef>
Comment 1 tkakar 2025-11-17 02:35:31 UTC
Confirmed. After opening the attached .pptx file, the chart data is rendered incorrectly. The data point that should be "52:56:38" is instead displayed as "4:56".

Tested in:

Version: 25.8.2.2 (X86_64)
Build ID: d401f2107ccab8f924a8e2df40f573aab7605b6f
CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 620(Build:0)
CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded