// Checking target document after import
tEnv.addObjRelation("XDocumentHandler.ImportChecker",
new ifc.xml.sax._XDocumentHandler.ImportChecker() {
public boolean checkImport() {
XDrawPagesSupplier supp = (XDrawPagesSupplier)
UnoRuntime.queryInterface
(XDrawPagesSupplier.class, xDrawDoc);
final XDrawPages xPages = supp.getDrawPages();
XNamed[] pageArray = new XNamed[ xPages.getCount() ];
for (int i=0; i < xPages.getCount(); i++) {
try {
pageArray[i] = (XNamed) UnoRuntime.queryInterface
(XNamed.class, xPages.getByIndex(i));