Re: help on macro (writing a testcase)

2013-02-25 Thread Maxime de Roucy
Hello,

I managed to write the testcase, thanks a lot :-)
https://gerrit.libreoffice.org/#/c/2376/

In fact I used another testcase that was already written (testFdo48033).

Regards

-- 
Maxime de Roucy
Groupe LINAGORA - OSSA
✉ : 80 rue Roque de Fillol 92800 PUTEAUX
☎ : 01.46.96.63.44 ☏ : 06.42.00.49.09


signature.asc
Description: This is a digitally signed message part
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


help on macro (writing a testcase)

2013-02-21 Thread Maxime de Roucy
Hello

I am trying to write a test case for a my patch :
https://gerrit.libreoffice.org/#/c/2243/

Basically I have to test if the only picture of the document is in the
first or the second cell of the only table of the document (Writer).

As explained in this page : 
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…

oTable = oDoc.getTextTables().getByIndex(0)
oCell = oTable.getCellByName(B1)
xray oCell
oElementEnum = oCell.createEnumeration()
xray oElementEnum.nextElement()
While oElementEnum.hasMoreElements()
  xray oElementEnum.nextElement()
Wend

Can someone could help me ?

Thank you in advance

-- 
Maxime de Roucy
Groupe LINAGORA - OSSA
✉ : 80 rue Roque de Fillol 92800 PUTEAUX
☎ : 01.46.96.63.44 ☏ : 06.42.00.49.09


signature.asc
Description: This is a digitally signed message part
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: help on macro (writing a testcase)

2013-02-21 Thread Noel Power

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
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice