Package com.sun.star.drawing

Examples of com.sun.star.drawing.XDrawPagesSupplier


        // 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));
View Full Code Here


        // 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));
View Full Code Here

        log.println("ImplementationName "+utils.getImplName(oObj));

        TestEnvironment tEnv = new TestEnvironment(oObj);

        XDrawPagesSupplier oDPS = (XDrawPagesSupplier)
            UnoRuntime.queryInterface(XDrawPagesSupplier.class, aModel);
        final XDrawPages oDPn = oDPS.getDrawPages();

        tEnv.addObjRelation("EventMsg","Inserting a drawpage via API has no "+
                                        "effect to the outline view #101050# \r\n"+
                                        "Therefore the listener isn't called");
View Full Code Here

        XShape insertedShape = null;

        try {
            System.out.println("getting Drawpages");

            XDrawPagesSupplier oDPS =  UnoRuntime.queryInterface(
                                              XDrawPagesSupplier.class,
                                              xSheetDoc);
            XDrawPages oDP =  oDPS.getDrawPages();
            XDrawPage firstDrawPage =  UnoRuntime.queryInterface(
                                              XDrawPage.class,
                                              oDP.getByIndex(0));

            final XMultiServiceFactory xMsf = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
View Full Code Here

        // first we write what we are intend to do to log file
        log.println( "creating a test environment" );

        // get the drawpage of drawing here
        log.println( "getting Drawpages" );
        XDrawPagesSupplier oDPS = (XDrawPagesSupplier)
            UnoRuntime.queryInterface(XDrawPagesSupplier.class, xDrawDoc);
        XDrawPages oDP = (XDrawPages) oDPS.getDrawPages();
        oDP.insertNewByIndex(1);
        oDP.insertNewByIndex(2);
        XInterface oObj = oDP;

        log.println( "creating a new environment for drawpage object" );
View Full Code Here

     *      com.sun.star.lang.IndexOutOfBoundsException
     *      com.sun.star.lang.WrappedTargetException
     */
    protected XDrawPage getDrawPage( int index ) throws com.sun.star.lang.IndexOutOfBoundsException, com.sun.star.lang.WrappedTargetException
    {
        XDrawPagesSupplier xSuppPages = UnoRuntime.queryInterface( XDrawPagesSupplier.class, getDocument() );
        XDrawPages xPages = xSuppPages.getDrawPages();

        return UnoRuntime.queryInterface( XDrawPage.class, xPages.getByIndex( index ) );
    }
View Full Code Here

        if ( null != xSuppPage )
            xReturn = xSuppPage.getDrawPage();
        else
        {   // the model itself is no draw page supplier - okay, it may be a Writer or Calc document
            // (or any other multi-page document)
            XDrawPagesSupplier xSuppPages = UnoRuntime.queryInterface( XDrawPagesSupplier.class, getDocument() );
            XDrawPages xPages = xSuppPages.getDrawPages();

            xReturn = UnoRuntime.queryInterface( XDrawPage.class, xPages.getByIndex( 0 ) );

            // Note that this is no really error-proof code: If the document model does not support the
            // XDrawPagesSupplier interface, or if the pages collection returned is empty, this will break.
View Full Code Here

            }
           
            log.println("adding relation for com.sun.star.view.XFormLayerAccess: XForm");
            try {
                log.println( "getting Drawpages" );
                XDrawPagesSupplier oDPS = (XDrawPagesSupplier)
                UnoRuntime.queryInterface(XDrawPagesSupplier.class,xSpreadsheetDoc);
                XDrawPages oDP = (XDrawPages) oDPS.getDrawPages();
                oDP.insertNewByIndex(1);
                oDP.insertNewByIndex(2);
                oDrawPage = (XDrawPage) AnyConverter.toObject(
                    new Type(XDrawPage.class),oDP.getByIndex(0));
                if (oDrawPage == null)
View Full Code Here

                new Object[] {arg});
            XExporter xEx = (XExporter)
                UnoRuntime.queryInterface(XExporter.class,oObj);
            //xEx.setSourceDocument(xDrawDoc);

            XDrawPagesSupplier supp = (XDrawPagesSupplier)
                UnoRuntime.queryInterface(XDrawPagesSupplier.class, xDrawDoc);
            XDrawPages set = supp.getDrawPages();

            // This is an XML-export BUG (new slide named "NewSlide2"
            // can not be exported to XML)
            set.insertNewByIndex(1);
View Full Code Here

            throw new StatusException("Couldn't create document", e);
        }

        // get the drawpage of drawing here
        log.println( "getting Drawpage" );
        XDrawPagesSupplier oDPS = (XDrawPagesSupplier)
            UnoRuntime.queryInterface(XDrawPagesSupplier.class, xDrawDoc);
        XDrawPages the_pages = oDPS.getDrawPages();
        for (int i = 1; i < 10; i++){
            the_pages.insertNewByIndex(i);
        }
        XIndexAccess oDPi = (XIndexAccess)
            UnoRuntime.queryInterface(XIndexAccess.class,the_pages);
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.