/** get draw page by index */ public static XDrawPage getDrawPageByIndex(XComponent xComponent, int nIndex) throws com.sun.star.lang.IndexOutOfBoundsException, com.sun.star.lang.WrappedTargetException { XDrawPagesSupplier xDrawPagesSupplier = (XDrawPagesSupplier) UnoRuntime.queryInterface(XDrawPagesSupplier.class, xComponent); XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages(); return (XDrawPage) UnoRuntime.queryInterface(XDrawPage.class, xDrawPages.getByIndex(nIndex)); }