A macro (basic) associated to a database needs to identify a chart from a calc document. This calc document may contain several charts, each having a specific name, as defined in the outermost layer of the chart.
Previously in OpenOffice this could be found by “DisplayName” in oChart object of type ScChartObj (as seen in the debugger) :
Function getChartByName (sheet As Object, chartName as String)
dim oCharts, oChart
dim i as integer
oCharts = sheet.getCharts()
for i = 0 to oCharts.count-1
oChart = oCharts(i)
if oChart.DisplayName=chartName then
getChartByName = oChart
Exit Function
end if
next i
getChartByName = 0
End Function
When I migrated to LibreOffice the property DisplayName disappeared and I could not find a way to identify the chart. oChart still has a property Name containing (example) “OBJECT 2” over which I have no control in the calc document.
How to proceed ?
advTHANKSance