コード例 #1
0
ファイル: PageHelper.java プロジェクト: luongit/blindside
 /** 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
ファイル: PageHelper.java プロジェクト: luongit/blindside
 /**
  * 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
ファイル: PageHelper.java プロジェクト: luongit/blindside
 /** get the page count for master pages */
 public static int getMasterPageCount(XComponent xComponent) {
   XMasterPagesSupplier xMasterPagesSupplier =
       (XMasterPagesSupplier) UnoRuntime.queryInterface(XMasterPagesSupplier.class, xComponent);
   XDrawPages xDrawPages = xMasterPagesSupplier.getMasterPages();
   return xDrawPages.getCount();
 }
コード例 #4
0
ファイル: PageHelper.java プロジェクト: luongit/blindside
 /** 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);
 }
コード例 #5
0
ファイル: PageHelper.java プロジェクト: luongit/blindside
 /**
  * creates and inserts a new master page into the giving position, the method returns the new
  * created page
  */
 public static XDrawPage insertNewMasterPageByIndex(XComponent xComponent, int nIndex) {
   XMasterPagesSupplier xMasterPagesSupplier =
       (XMasterPagesSupplier) UnoRuntime.queryInterface(XMasterPagesSupplier.class, xComponent);
   XDrawPages xDrawPages = xMasterPagesSupplier.getMasterPages();
   return xDrawPages.insertNewByIndex(nIndex);
 }