Need help for unit tests

Regina Henschel rb.henschel at t-online.de
Sun Jul 26 23:17:56 UTC 2020


Hi all,

I need again help in unit tests.
I'm working on https://gerrit.libreoffice.org/c/core/+/99464.
That is continuation for
https://bugs.documentfoundation.org/show_bug.cgi?id=128345
FILESAVE: PPTX: transparency gradient on solid fill is not considered in 
export

This part is about transparency in charts. I have (until now) three 
files to be examined, each with one problem. I have used assertXPath on 
the saved pptx file. I have expected to get /ppt/charts/chart1.xml in 
all three cases, but I get chart1.xml for the first file, chart2.xml for 
the second and chart3.xml for the third file. You see it in 
SdOOXMLExportTest1::testTdf128345Chart_CS_TG() in 
sd/qa/unit/export-tests-ooxml1.cxx#1290.

Why is it not chart1.xml in all cases? Do I miss something?
Are these numbers stable?
How can I force to get chart1.xml in the export to pptx?


I have used assertXPath, because I do not know, how to access a chart 
and its parts from the active document in a unit test. Any hint, how to 
directly get the start and end color of a transparency gradient of a 
data point, for example?


I have seen in 
https://opengrok.libreoffice.org/xref/core/chart2/qa/extras/chart2import.cxx
2541      Reference<drawing::XShape> 
xDataPointLabel1(getShapeByName(xShapes,
2542 
"CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"), 
UNO_SET_THROW);
How is the string build, what does it mean?


And a general review of the patch would be nice too.

Kind regards
Regina






More information about the LibreOffice mailing list