Very helpful! Thanks again.
I am struggling with this now… (maybe to open a different topic?)
About DrawPages:
- This is done by getByIndex(0) NOT by name of the object
- As I understood well, Draw objects are accessed after you call getDrawPages.getByIndex(0) and not before.
- So Drawobjects can be called by any (unique) name inside a Sheet?
- For Example:
a) Charts (which store Charts in a sheet) provide a list with object names as string e.g .Charts.getByName(“xx”) or Charts.getByIndex(0)
b) I havent found something similar with DrawPages.
c) The weird thing IS that Draw Objects DO have names e.g .“Object 1” but initially, DrawPages nowhere stores them as an index string. This is accessed after specifying index of Chart eg. getByIndex()
Note this:
’ Doc.getDrawPages.getByIndex(0).getByIndex(0).Title
’ Doc.getDrawPages.getByIndex(0).getByIndex(0).Description
’ oSheet.getDrawPage().getByIndex(0).PersistName
What I would like to do:
I would like to itirate through name of objects (charts) BEFORE Index of Drawpages.
Why? Because it is more “safe” solution.
If Calc document have other draw objects, this may create confusion. I would like all calc charts to be named with specific names.
So, Is there a solution ?
How can i be assured that only named-specific charts will be appended to the Writer document?
I tried to use charts.getByName(“blablabla”) but Doc.CurrentController.select refuse to select it.
Is there any other way to copy paste a chart object as Chart in libre writer from Calc except Drawpages?
Anything else?