Examples of XExporter


Examples of com.sun.star.document.XExporter

        Object GraphicExportFilter = localServiceManager
            .createInstanceWithContext(
                "com.sun.star.drawing.GraphicExportFilter",
                ((DokeosSocketOfficeConnection)this.openOfficeConnection).getComponentContext());
       
        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";
       
       
       
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

        xComponent = Helper.createDocument( xServiceFactory,
          sUrl.toString(), "_blank", 0, pPropValues );
  
        Object GraphicExportFilter = xServiceFactory.createInstance
          ("com.sun.star.drawing.GraphicExportFilter");
        XExporter xExporter = (XExporter)
          UnoRuntime.queryInterface( XExporter.class, GraphicExportFilter );

        PropertyValue aProps[] = new PropertyValue[2];
        aProps[0] = new PropertyValue();
        aProps[0].Name = "MediaType";
        aProps[0].Value = "image/gif";

/* some graphics e.g. the Windows Metafile does not have a Media Type, for this case
        aProps[0].Name = "FilterName";  // it is possible to set a FilterName
        aProps[0].Value = "WMF";
*/
        java.io.File destFile = new java.io.File(args[1]);
        StringBuffer destUrl = new StringBuffer("file:///");
        destUrl.append(destFile.getCanonicalPath().replace('\\', '/'));
               
        aProps[1] = new PropertyValue();
        aProps[1].Name = "URL";
        aProps[1].Value = destUrl.toString();//args[ 1 ];
       
        int nPageIndex = Integer.parseInt( args[ 2 ] );
        if ( nPageIndex < PageHelper.getDrawPageCount( xComponent ) &&
                   nPageIndex > 1 )
        {
          XDrawPage xPage = PageHelper.getDrawPageByIndex( xComponent, nPageIndex );
          XComponent xComp = (XComponent)
            UnoRuntime.queryInterface( XComponent.class, xPage );
          xExporter.setSourceDocument( xComp );
          XFilter xFilter = (XFilter)
            UnoRuntime.queryInterface( XFilter.class, xExporter );
          xFilter.filter( aProps );
          System.out.println( "*** graphics on page \"" + nPageIndex + "\" from file \"" +
                                        args[0] + "\" exported under the name \""
View Full Code Here

Examples of com.sun.star.document.XExporter

        Any arg = new Any(new Type(XDocumentHandler.class), xDocHandWriter);
        XInterface oExp = (XInterface)xMSF.createInstanceWithArguments(
            "com.sun.star.comp." + docType + ".XML" + exportType + "Exporter",
            new Object[] {arg});

        XExporter xExp = (XExporter) UnoRuntime.queryInterface
            (XExporter.class, oExp) ;
        xExp.setSourceDocument(xDoc) ;

        XFilter filter = (XFilter) UnoRuntime.queryInterface(XFilter.class, oExp) ;
        filter.filter(XMLTools.createMediaDescriptor(
            new String[] {"FilterName"},
            new Object[] {"Custom filter"})) ;
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

        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

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

            //set some settings
            XModel xDrawModel = (XModel)
                UnoRuntime.queryInterface(XModel.class, xDrawDoc);
            XController xController = xDrawModel.getCurrentController();
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

        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
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.