Now, I want to get each TextTables by its own parents' Supplier.But,I found that I can't do this by TextFrame.When I try to get XTextTablesSupplier through TextFrame's object like this,
Code: Select all
com.sun.star.text.xTextFrame = UnoRuntime.queryInterface(
XTextFrame.class, xNameAccess.getByName(ele));
com.sun.star.text.XTextTablesSupplier xTextTablesSupplier = (com.sun.star.text.XTextTablesSupplier)
UnoRuntime.queryInterface( com.sun.star.text.XTextTablesSupplier.class,
xTextFrame );
I can get all TextTables by XTextDocument object, but I can't identity which TextFrame they are belong to.
Code: Select all
com.sun.star.text.XTextDocument myDoc = (com.sun.star.text.XTextDocument)
UnoRuntime.queryInterface(com.sun.star.text.XTextDocument.class,
xComp);
com.sun.star.text.XTextTablesSupplier xTextTablesSupplier = (com.sun.star.text.XTextTablesSupplier)
UnoRuntime.queryInterface( com.sun.star.text.XTextTablesSupplier.class,
myDoc);