Package com.sun.star.drawing

Examples of com.sun.star.drawing.XDrawPagesSupplier


        // creation of testobject here
        // first we write what we are intend to do to log file
        log.println( "creating a test environment" );
        try {
            log.println( "getting Drawpages" );
            XDrawPagesSupplier oDPS = (XDrawPagesSupplier)
                UnoRuntime.queryInterface(XDrawPagesSupplier.class,xDoc);
            oDP = (XDrawPages) oDPS.getDrawPages();
            oDP.insertNewByIndex(1);
            oDP.insertNewByIndex(2);
            oObj = (XDrawPage) AnyConverter.toObject(
                    new Type(XDrawPage.class),oDP.getByIndex(0));
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

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

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

        try {
            oObj = (XInterface) xMSF.createInstanceWithArguments(
                "com.sun.star.comp.Impress.XMLExporter", new Object[] {arg});

            //get draw pages
            XDrawPagesSupplier drawPagesSupplier = (XDrawPagesSupplier)
                UnoRuntime.queryInterface(XDrawPagesSupplier.class, xImpressDoc);
            XDrawPages drawPages = drawPagesSupplier.getDrawPages();
            //insert new draw page
            XDrawPage newDrawPage = drawPages.insertNewByIndex(0);
            //set specific test name
            XNamed newPageNamed = (XNamed)
                UnoRuntime.queryInterface(XNamed.class, newDrawPage);
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

            {"end", "office:document"} };

        tEnv.addObjRelation("XDocumentHandler.XMLData", xml);

        //get draw pages
        XDrawPagesSupplier drawPagesSupplier = (XDrawPagesSupplier)
            UnoRuntime.queryInterface(XDrawPagesSupplier.class, xImpressDoc);
        XDrawPages drawPages = drawPagesSupplier.getDrawPages();
        final XNameAccess xNamePages = (XNameAccess)
            UnoRuntime.queryInterface(XNameAccess.class, drawPages);

        tEnv.addObjRelation("XDocumentHandler.ImportChecker",
            new ifc.xml.sax._XDocumentHandler.ImportChecker() {
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

        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

        log.println("creating a test environment");

        try {
            log.println("getting Drawpages");

            XDrawPagesSupplier oDPS = (XDrawPagesSupplier) UnoRuntime.queryInterface(
                                              XDrawPagesSupplier.class, xDoc);
            oDP = (XDrawPages) oDPS.getDrawPages();
            oDP.insertNewByIndex(1);
            oDP.insertNewByIndex(2);
            oObj = (XDrawPage) AnyConverter.toObject(new Type(XDrawPage.class),
                                                     oDP.getByIndex(0));
View Full Code Here

        try {
            oObj = (XInterface) xMSF.createInstanceWithArguments(
                "com.sun.star.comp.Draw.XMLExporter", new Object[] {arg});


            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);

            XDrawPage page1 = (XDrawPage)
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.