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.
I see, that problem has come in earlier and is not specific for pivot charts.
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.
Setting to NEW
(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?
(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..
(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.
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
Hi Regina, If I do the following change as you suggested in the description: --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -715,8 +715,8 @@ void exportRangeToSomewhere( SvXMLExport& rExport, const OUString& rValue ) SvXMLElementExport aEmptyShapeGroup( rExport, XML_NAMESPACE_DRAW, ::xmloff::token::GetXMLToken( ::xmloff::token::XML_G ), true, false ); - SvXMLElementExport aDescription( rExport, XML_NAMESPACE_SVG, - ::xmloff::token::GetXMLToken( ::xmloff::token::XML_DESC ), + SvXMLElementExport aDescription( rExport, XML_NAMESPACE_XML, + ::xmloff::token::GetXMLToken( ::xmloff::token::XML_ID ), true, false ); rExport.GetDocHandler()->characters( rValue ); } some tests start to fail with Test name: PivotChartTest::testRoundtrip forced failure - /tmp/lu2932261icabs.tmp/Object 1/content.xml[2,6426]: Error: tag name "xml:id" is not allowed. Possible tag names are: <a>,<caption>,<circle>,<connector>,<control>,<custom-shape>,<desc>,<ellipse>,<event-listeners>,<frame>,<g>,<glue-point>,<line>,<measure>,<page-thumbnail>,<path>,<polygon>,<polyline>,<rect>,<regular-polygon>,<scene>,<title> ><text:p>Total</text:p><draw:g><xml:id>PT@label 0</xml:id></draw:g></table:tabl
xml:id is not an element but an attribute. It could be set as attribute on the empty group element, which currently contains the <svg:desc> child element. But I don't know in what context the embedded table is used at all and where the <svg:desc> element is currently evaluated. My concern about the <svg:desc> element is, that its specification says, "The <svg:desc> element specifies a prose description of a graphic object that may be used to support accessibility." (10.3.18 <svg:desc>, part 3, ODF 1.3) And this description does not fit to its use in the embedded table in the chart. We might need a total different attribute/element for the intended purpose.