Getting from DependentTextField to Table/Cell, or Vice Versa?

I have a series of DependentTextFields dependent on a particular com.sun.star.text.fieldmaster.SetExpression TextFieldMaster of SubType com.sun.star.text.SetVariableType.SEQUENCE. Each DependentTextField is in the column B cell of a row in one of a number of TextTables. Given a particular number in the sequence, I want to find the table and cell containing the DependentTextField having that number (if any).

Going one direction, I can iterate through the tables and their rows to get the Cell object for each column B cell, the text in the cell, and a text cursor for that text. But I can’t figure out how to get at the DependentTextField in the cell.

Going another direction, I can get the pertinent TextFieldMaster, get the corresponding DependentTextFields, and iterate through them. But I can’t figure out how to find the table and cell that a DependentTextField is in.

Does anyone know how to bridge the gap between Table/Cell and a DependentTextField contained therein?

Suggestions in any language - Java, BASIC, C++, Python, whatever - are welcome!

For the curious… All of this effort’s purpose is to find the matching row, and then add some text to the column A cell for the matching row.

Thanks to anyone who considered answering this, but… I finally got a clue, generated a document with the sequence DependentTextFields in the tables as described in the question, and examined a column B cell with MRI. There, after a good amount of digging, I found a TextField at the TextRange at the start of the cell’s text, accessible via a TextField property. That TextField was my DependentTextField.

Here’s a Java code snippet showing what worked…

XCell xCellB = xTextTable.getCellByName("B" + row);
XText xCellText	= UnoRuntime.queryInterface(XText.class, xCellB);
XTextCursor xCellCursor = xCellText.createTextCursor();
XPropertySet xCellStartRangeProps = UnoRuntime.queryInterface(XPropertySet.class, xCellCursor.getStart());
Object oDependentTextField = xCellStartRangeProps.getPropertyValue("TextField");
XDependentTextField xDepTextField = (XDependentTextField) UnoRuntime.queryInterface(XDependentTextField.class, oDependentTextField);