Bug 112785 - svg:desc not suitable for a table cell identifier
Summary: svg:desc not suitable for a table cell identifier
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: lowest enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Chart ODF-spec
  Show dependency treegraph
 
Reported: 2017-09-30 18:13 UTC by Regina Henschel
Modified: 2023-11-06 10:11 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
sheet with pivot table and pivot chart (18.96 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-09-30 18:13 UTC, Regina Henschel
Details
minimal sample chart created with OOo 3.3 (11.89 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-11-06 10:10 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2017-09-30 18:13:23 UTC
Created attachment 136654 [details]
sheet with pivot table and pivot chart

The current solution of pivot charts uses e.g the structure
<table:table-cell office:value-type="float" office:value="NaN">
    <text:p>NaN</text:p>
    <draw:g>
        <svg:desc>PT@data 0</svg:desc>
    </draw:g>
</table:table-cell>

to define an identifier for the cell, that will be used in a cell reference.

This structure gives no formal error, but I will surely not support the idea of miss-using a description of a graphical element as identifier for a table-cell.

There exists more suitable solutions.
Currently possible is
attribute xml:id
or
as part of the entire table the element
<table:named-expressions> with its child element <table:named-range>.

This problem should be solved together with bug 112783.
Comment 1 Regina Henschel 2017-09-30 18:25:00 UTC
I see, that problem has come in earlier and is not specific for pivot charts.
Comment 2 Regina Henschel 2017-10-01 21:04:12 UTC
It is already there in LO 3.5.1, but not in AOO 4.1.2. It is not clear, why it was introduced. LibreOffice can handle the chart without having that elements.
Comment 3 Buovjaga 2017-11-02 17:24:03 UTC
Setting to NEW
Comment 4 Stéphane Guillou (stragu) 2023-11-06 00:27:16 UTC
(In reply to Regina Henschel from comment #2)
> It is already there in LO 3.5.1, but not in AOO 4.1.2.
But Pivot Chart were introduced in 5.4 for bug 83257, so why are earlier versions relevant?

Quikee, any thoughts on why it was done this way?
Comment 5 Tomaz Vajngerl 2023-11-06 06:11:42 UTC
(In reply to Stéphane Guillou (stragu) from comment #4)
> (In reply to Regina Henschel from comment #2)
> > It is already there in LO 3.5.1, but not in AOO 4.1.2.
> But Pivot Chart were introduced in 5.4 for bug 83257, so why are earlier
> versions relevant?

I think Regina just noticed that Pivot Charts are not related to this issue and that the issue was present even before Pivot Chart introduction. 
 
> Quikee, any thoughts on why it was done this way?

Not sure, it's not related to Pivot Charts I think, but I do vaguely remember that element. Maybe it is because "draw:g" (group) is similar to svg's (svg:g), somebody thought "svg:desc" would be a good element to add for some purpuse.

Also, I wonder if Pivot Charts were even implemented for ODS..
Comment 6 Stéphane Guillou (stragu) 2023-11-06 10:07:12 UTC
(In reply to Tomaz Vajngerl from comment #5)
> I think Regina just noticed that Pivot Charts are not related to this issue
> and that the issue was present even before Pivot Chart introduction. 
Ah right, thank you. Sorry Regina, I missed comment 1 entirely.
Now I see it, even for a simple chart created in OOo 3.3, no need to involve pivot tables or pivot charts.
Comment 7 Stéphane Guillou (stragu) 2023-11-06 10:10:13 UTC
Created attachment 190670 [details]
minimal sample chart created with OOo 3.3

After unpacking the ODS, Object 1 > content.xml contains:

<table:table-cell office:value-type="float" office:value="1">
   <text:p>1</text:p>
   <draw:g>
      <svg:desc>Sheet1.A1:Sheet1.A3</svg:desc>
   </draw:g>
</table:table-cell>

Same if created with recent trunk build:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 31fb3045dabdb27d913712f3abcade315e3ea9bd
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded