help on macro (writing a testcase)

Noel Power nopower at suse.com
Thu Feb 21 12:31:55 PST 2013


On 21/02/13 17:58, Maxime de Roucy wrote:
> Hello
[...]
> http://opengrok.libreoffice.org/xref/core/sw/qa/extras/
> Before going to the C++ I am trying to write a macro doing my test.
>
> I don't know much about macro. I use XrayTool but I can't figured out
> how to do my test.
> I tried to list the element of the cells but didn't find the picture in
> it…
[...]
> Can someone could help me ?
>
it's not the cell you want to look at but the picture/shape/graphic, it 
will have an associated anchor, it is the anchor which
controls where it is located, try

Dim Anchor as Object
Dim Shape as Object
Dim Table as Object

Set Shape = ThisComponent.Drawpage(0) ' first shape on page
Set Anchor = Shape.Anchor
Set Table = Anchor.TextTable

MsgBox Shape.Name & " is located as cell " & Anchor.Cell.CellName & " in 
Table " & Table.Name


Noel


More information about the LibreOffice mailing list