Examples of XExporter


Examples of com.sun.star.document.XExporter

        try {
            oObj = (XInterface) xMSF.createInstanceWithArguments(
                "com.sun.star.comp.Draw.XMLContentExporter",
                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);

            XDrawPage page1 = (XDrawPage)
                UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(0));
            XNamed NPage1 = (XNamed)
                UnoRuntime.queryInterface(XNamed.class,page1);
            NPage1.setName("NewSlide1");
            XDrawPage page2 = (XDrawPage)
                UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(1));
            XNamed NPage2 = (XNamed)
                UnoRuntime.queryInterface(XNamed.class,page2);
            NPage2.setName("NewSlide2");
            xEx.setSourceDocument(xDrawDoc);
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log) ;
            throw new StatusException("Can't create component.", e) ;
        }
View Full Code Here

Examples of com.sun.star.document.XExporter

        try {
            oObj = (XInterface) xMSF.createInstanceWithArguments(
                "com.sun.star.comp.Impress.XMLSettingsExporter",
                new Object[] {arg});
            XExporter xEx = (XExporter)
                UnoRuntime.queryInterface(XExporter.class,oObj);
            xEx.setSourceDocument(xImpressDoc);

            //set some settings
            XModel xImpressModel = (XModel)
                UnoRuntime.queryInterface(XModel.class, xImpressDoc);
            XController xController = xImpressModel.getCurrentController();
View Full Code Here

Examples of com.sun.star.document.XExporter

        final String SHEET_NAME = "XMLExporter_SheetTestName";

        try {
            oObj = (XInterface) xMSF.createInstanceWithArguments(
                "com.sun.star.comp.Calc.XMLExporter", new Object[] {arg} );
            XExporter xEx = (XExporter) UnoRuntime.queryInterface
                (XExporter.class,oObj);
            xEx.setSourceDocument(xSheetDoc);

            //set name of sheet
            XSpreadsheetDocument xSpreadsheetDoc = (XSpreadsheetDocument)
                UnoRuntime.queryInterface(XSpreadsheetDocument.class, xSheetDoc);
            XSpreadsheets xSpreadsheets = xSpreadsheetDoc.getSheets();
View Full Code Here

Examples of com.sun.star.document.XExporter

        Any arg = new Any(new Type(XDocumentHandler.class),filter);

        try {
            oObj = (XInterface) xMSF.createInstanceWithArguments(
                "com.sun.star.comp.Chart.XMLExporter", new Object[] {arg});
            XExporter xEx = (XExporter)
                UnoRuntime.queryInterface(XExporter.class,oObj);
            xEx.setSourceDocument(xChartDoc);

            Object oTitle = xChartDoc.getTitle() ;
            XPropertySet xTitleProp = (XPropertySet) UnoRuntime.queryInterface
                (XPropertySet.class, oTitle) ;
            xTitleProp.setPropertyValue("String", exportStr) ;
View Full Code Here

Examples of com.sun.star.document.XExporter

                UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(1));
            XNamed NPage2 = (XNamed)
                UnoRuntime.queryInterface(XNamed.class,page2);
            NPage2.setName("NewSlide2");

            XExporter xEx = (XExporter)
                UnoRuntime.queryInterface(XExporter.class,oObj);
            xEx.setSourceDocument(xDrawDoc);

        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log) ;
            throw new StatusException("Can't create component.", e) ;
        }
View Full Code Here

Examples of com.sun.star.document.XExporter

        try {
            oObj = (XInterface) xMSF.createInstanceWithArguments(
                "com.sun.star.comp.Chart.XMLStylesExporter",
                new Object[] {arg});
            XExporter xEx = (XExporter)
                UnoRuntime.queryInterface(XExporter.class,oObj);
            xEx.setSourceDocument(xChartDoc);

        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log) ;
            throw new StatusException("Can't create component.", e) ;
        }
View Full Code Here

Examples of com.sun.star.document.XExporter

        Any arg = new Any(new Type(XDocumentHandler.class),Filter);

        try {
            oObj = (XInterface) xMSF.createInstanceWithArguments(
                "com.sun.star.comp.Writer.XMLExporter", new Object[] {arg});
            XExporter xEx = (XExporter) UnoRuntime.queryInterface
                (XExporter.class,oObj);
            xEx.setSourceDocument(xTextDoc);

            XSimpleText aText = xTextDoc.getText();
            XTextCursor curs = (XTextCursor) aText.createTextCursor();
                        aText.insertString(curs, TEST_STR, false);
        } catch (com.sun.star.uno.Exception e) {
View Full Code Here

Examples of com.sun.star.document.XExporter

        Any arg = new Any(new Type(XDocumentHandler.class),filter);

        try {
            oObj = (XInterface) xMSF.createInstanceWithArguments(
                "com.sun.star.comp.Draw.XMLMetaExporter", new Object[] {arg});
            XExporter xEx = (XExporter)
                UnoRuntime.queryInterface(XExporter.class, oObj);
            xEx.setSourceDocument(xDrawDoc);

            //set some meta data
            XDocumentInfoSupplier infoSup = (XDocumentInfoSupplier)
                UnoRuntime.queryInterface(XDocumentInfoSupplier.class,
                xDrawDoc) ;
View Full Code Here

Examples of com.sun.star.document.XExporter

        final String STYLE_NAME = "New style" + counter++ ;

        try {
            oObj = (XInterface) xMSF.createInstanceWithArguments(
                "com.sun.star.comp.Draw.XMLStylesExporter", new Object[] {arg});
            XExporter xEx = (XExporter)
                UnoRuntime.queryInterface(XExporter.class,oObj);
            xEx.setSourceDocument(xDrawDoc);

            //obtain style families
            XStyleFamiliesSupplier styleSup = (XStyleFamiliesSupplier)
                UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xDrawDoc);
            XNameAccess StyleFamilies = styleSup.getStyleFamilies();
View Full Code Here

Examples of com.sun.star.document.XExporter

              //xPageName.setName((i+1)+"-"+xPageName.getName());
            Object GraphicExportFilter = xMultiComponentFactory
                .createInstanceWithContext(
                    "com.sun.star.drawing.GraphicExportFilter",
                    xComponentContext);
            XExporter xExporter = (XExporter) UnoRuntime
                .queryInterface(XExporter.class,
                    GraphicExportFilter);

            XComponent xComp = (XComponent) UnoRuntime
                .queryInterface(XComponent.class, page);

            xExporter.setSourceDocument(xComp);
            loadProps[1] = new PropertyValue();
            loadProps[1].Name = "URL";
            loadProps[1].Value = remoteFolderFullPath+remoteFolder+"/"+xPageName.getName()+".png";
            loadProps[2] = new PropertyValue();
            loadProps[2].Name = "FilterData";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.