[api-dev] Getting the TextFields directly of a table (Writer)

2007-06-13 Thread Michael Jeier

Hi,

I have to process a Writer document with a lot of TextFields. I know how to
get globally all TextFields, like:

ReferenceXTextFieldsSupplier xSupp (xWriterComponent, UNO_QUERY);
ReferenceXEnumerationAccess enumerationAcc = xSupp-getTextFields();
ReferenceXEnumeration enumeration = enumerationAcc-createEnumeration();

BUT: I need to process the TextFields in tables differently. So I have to
know which
TextFields are in the tables of the document. I can access the text in the
table cell
like that:

ReferenceXCell cell =
table-getCellByName(OUString::createFromAscii(cellName));
ReferenceXText  xtext (cell, UNO_QUERY);
ReferenceXTextCursor  xtextc = xtext-createTextCursor();
CString name = OUStringToOString(xtextc-getString(),
RTL_TEXTENCODING_ASCII_US).getStr();

But how can I access the content of the TextField in the cell?!

Thanks for your help.

Regards, Michael


Re: [api-dev] Getting the TextFields directly of a table (Writer)

2007-06-13 Thread Laurent Godard

Hi Micheal


But how can I access the content of the TextField in the cell?!



Look at the anchors and compare their relative position
with for example compareRegionEnds method

Laurent


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]