Package com.sun.star.drawing

Examples of com.sun.star.drawing.XDrawPagesSupplier


        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace( log );
            throw new StatusException("Couldn't create document", e);
        }
       
        XDrawPagesSupplier oDPS = (XDrawPagesSupplier)
            UnoRuntime.queryInterface(XDrawPagesSupplier.class, xImpressDoc);
        XDrawPages the_pages = oDPS.getDrawPages();
        XIndexAccess oDPi = (XIndexAccess)
            UnoRuntime.queryInterface(XIndexAccess.class,the_pages);

        XModel aModel = (XModel)
            UnoRuntime.queryInterface(XModel.class, xImpressDoc);
View Full Code Here


        SOfficeFactory SOF = SOfficeFactory.getFactory(
                                    (XMultiServiceFactory)Param.getMSF());

        // get the drawpage of drawing here
        log.println( "getting Drawpage" );
        XDrawPagesSupplier oDPS = (XDrawPagesSupplier)
            UnoRuntime.queryInterface(XDrawPagesSupplier.class,xDrawDoc);
        XDrawPages oDPn = oDPS.getDrawPages();
        XIndexAccess oDPi = (XIndexAccess) UnoRuntime.queryInterface
            (XIndexAccess.class,oDPn);
        try {
            oObj = (XDrawPage) AnyConverter.toObject(
                        new Type(XDrawPage.class),oDPi.getByIndex(0));
View Full Code Here

        }
        return xDrawDoc;
    }
   
    private void fillDrawDocWithContent(XComponent xDrawDoc){
        XDrawPagesSupplier oDPS = (XDrawPagesSupplier)
            UnoRuntime.queryInterface(XDrawPagesSupplier.class, xDrawDoc);
        XDrawPages oDPn = oDPS.getDrawPages();
        XIndexAccess oDPi = (XIndexAccess)
            UnoRuntime.queryInterface(XIndexAccess.class, oDPn);
        XDrawPage oDP = null;
        try {
            oDP = (XDrawPage) AnyConverter.toObject(
View Full Code Here

    */        

    public static XDrawPages getDrawPages ( XComponent aDoc ) {
        XDrawPages oDPn = null;
        try {
            XDrawPagesSupplier oDPS = (XDrawPagesSupplier)
            UnoRuntime.queryInterface(XDrawPagesSupplier.class,aDoc);

            oDPn = oDPS.getDrawPages();
        } catch ( Exception e ) {
            throw new IllegalArgumentException( "Couldn't get drawpages" );
        }
        return oDPn;
    } // finish getDrawPages
View Full Code Here

      pPropValues[ 0 ].Value = new Boolean( true );

      xDrawDoc = Helper.createDocument( xOfficeContext,
        "private:factory/simpress", "_blank", 0, pPropValues );

      XDrawPagesSupplier xDrawPagesSupplier =
        (XDrawPagesSupplier)UnoRuntime.queryInterface(
          XDrawPagesSupplier.class, xDrawDoc );
      XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
           
      // take care that this document has ten pages
        while ( xDrawPages.getCount() < 10 )
        xDrawPages.insertNewByIndex( 0 );
View Full Code Here

    /** get the page count for standard pages
  */
  static public int getDrawPageCount( XComponent xComponent )
  {
    XDrawPagesSupplier xDrawPagesSupplier =
      (XDrawPagesSupplier)UnoRuntime.queryInterface(
        XDrawPagesSupplier.class, xComponent );
    XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
    return xDrawPages.getCount();
  }
View Full Code Here

  */
  static public 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 ));
  }
View Full Code Here

    the method returns the new created page
  */
  static public XDrawPage insertNewDrawPageByIndex( XComponent xComponent, int nIndex )
    throws Exception
  {
    XDrawPagesSupplier xDrawPagesSupplier =
      (XDrawPagesSupplier)UnoRuntime.queryInterface(
        XDrawPagesSupplier.class, xComponent );
    XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
    return xDrawPages.insertNewByIndex( nIndex );
  }
View Full Code Here

    /** removes the given page
  */
  static public void removeDrawPage( XComponent xComponent, XDrawPage xDrawPage )
  {
    XDrawPagesSupplier xDrawPagesSupplier =
      (XDrawPagesSupplier)UnoRuntime.queryInterface(
        XDrawPagesSupplier.class, xComponent );
    XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
    xDrawPages.remove( xDrawPage );
  }
View Full Code Here

        tEnv.addObjRelation("XDocumentHandler.ImportChecker",
            new ifc.xml.sax._XDocumentHandler.ImportChecker() {
                public boolean checkImport() {
                    try {
                        XDrawPagesSupplier xPagesSup = (XDrawPagesSupplier)
                            UnoRuntime.queryInterface
                            (XDrawPagesSupplier.class, xImpressDoc) ;
                        XDrawPages xPages = xPagesSup.getDrawPages() ;
                        XNamed xPageName = (XNamed) UnoRuntime.queryInterface
                            (XNamed.class, xPages.getByIndex(0)) ;
                        String gName = xPageName.getName() ;
                        logF.println("Page name returned = '" + gName + "'") ;
                        return impPageName.equals(gName) ;
View Full Code Here

TOP

Related Classes of com.sun.star.drawing.XDrawPagesSupplier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.