For (not too old) versions of LibreOffice the striked-out part of the post should still be valid.
No need. All the objects having a property ZOrder are inserted into the respective container DrawPage. The elements of a drawpage (in case of a Writer document exactly one) are accessible by enumeration, in Basic with the constructCode: Select all
For Each object In myDrawPage
<statement block>
Next object
and also by IndexAccess.
Enumarating accesses them top down by ZOrder, access by increasing index does it bottom up. The index
is the ZOrder value actually.
Concerning the Z-order I did not take this from a specification I knew, but from experience and "research". Please tell me (us) if I am wrong.
To study the effects of editing and anchoring on the Z-order you may use the attached example doc which contains a fe lines of related Basic code.[/strike]
It's a mess. My experiences are from my usage of LibreOffice.
AOO does it differently.
-1- A Writer document does not allow access to its DrawPage via a virtual DrawPages container which makes it possible in LibreOffice only to use the same code in Writer and in AOO.
(This is easily fixed by changing a few lines in the contained code.)
-2- AOO neither enumerates nor indexes the contents of the CodePage in Z-order.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München