Пример #1
0
 /** 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));
 }
Пример #2
0
 /**
  * creates and inserts a draw page into the giving position, the method returns the new created
  * page
  */
 public static XDrawPage insertNewDrawPageByIndex(XComponent xComponent, int nIndex)
     throws Exception {
   XDrawPagesSupplier xDrawPagesSupplier =
       (XDrawPagesSupplier) UnoRuntime.queryInterface(XDrawPagesSupplier.class, xComponent);
   XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
   return xDrawPages.insertNewByIndex(nIndex);
 }
Пример #3
0
 /** removes the given page */
 public static void removeDrawPage(XComponent xComponent, XDrawPage xDrawPage) {
   XDrawPagesSupplier xDrawPagesSupplier =
       (XDrawPagesSupplier) UnoRuntime.queryInterface(XDrawPagesSupplier.class, xComponent);
   XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
   xDrawPages.remove(xDrawPage);
 }
Пример #4
0
 public static XDrawPages getDrawPages(XComponent xComponent) {
   XDrawPagesSupplier xDrawPagesSupplier =
       (XDrawPagesSupplier) UnoRuntime.queryInterface(XDrawPagesSupplier.class, xComponent);
   XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
   return xDrawPages;
 }