Package com.sun.star.lang

Examples of com.sun.star.lang.XMultiServiceFactory


                //     aSemaphore.P(aSemaphore.getSemaphoreFile());
                // }
               
                aGTA.getPerformance().startTime(PerformanceContainer.OfficeStart);
                aProvider = new OfficeProvider();
                XMultiServiceFactory xMSF = (XMultiServiceFactory) aProvider.getManager(param);
                param.put("ServiceFactory", xMSF);
                aGTA.getPerformance().stopTime(PerformanceContainer.OfficeStart);

                long nStartTime = aGTA.getPerformance().getTime(PerformanceContainer.OfficeStart);
                aGTA = getGraphicalTestArguments(); // get new TestArguments
View Full Code Here


     */
    public void _printPages() {
        boolean res = true;

        try {
            XMultiServiceFactory xMSF = (XMultiServiceFactory)tParam.getMSF();
           
            String printFile = utils.getOfficeTemp(xMSF) + "XPagePrintable.prt";
            log.println("Printing to : "+ printFile);

            PropertyValue[] PrintOptions = new PropertyValue[1];
View Full Code Here

                   
                    // If we are a SpreadSheet (calc), we need to set PrintAllSheets property to 'true'
                    XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface( XServiceInfo.class, _aDoc );
                    if ( xServiceInfo.supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) )
                    {
                        XMultiServiceFactory xMSF = _aGTA.getMultiServiceFactory();
                        Object aSettings = xMSF.createInstance( "com.sun.star.sheet.GlobalSheetSettings" );
                        if (aSettings != null)
                        {
                            XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, aSettings );
                            xPropSet.setPropertyValue( "PrintAllSheets", new Boolean( true ) );
                        }
View Full Code Here

        }
   
    // -----------------------------------------------------------------------------
    public static void convertDocument(String _sInputFile, String _sOutputPath, GraphicalTestArguments _aGTA) throws ConvWatchCancelException
        {
            XMultiServiceFactory xMSF = _aGTA.getMultiServiceFactory();
            if (xMSF == null)
            {
                GlobalLogWriter.get().println("MultiServiceFactory in GraphicalTestArgument not set.");
                return;
            }
View Full Code Here

     *
     * @see #firstContentProvider
     * @see #contentProvider
     */
    public void before() {
        XMultiServiceFactory xMSF = (XMultiServiceFactory)tParam.getMSF();

        log.println("creating testing content providers");
        try {
            firstContentProvider = (XContentProvider)UnoRuntime.queryInterface(
                    XContentProvider.class, xMSF.createInstance(
                            "com.sun.star.ucb.FileContentProvider"));

            contentProvider = (XContentProvider)UnoRuntime.queryInterface(
                    XContentProvider.class, xMSF.createInstance(
                            "com.sun.star.ucb.FileContentProvider"));
        } catch (Exception e) {
            log.println("Can't create content providers " + e.getMessage());
            e.printStackTrace(log);
            throw new StatusException("Unexpected exception", e);
View Full Code Here

     */

    public static XTextContent createIndex( XTextDocument xTextDoc, String kind)
      throws com.sun.star.uno.Exception {

        XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
        UnoRuntime.queryInterface( XMultiServiceFactory.class, xTextDoc );

    Object oInt = oDocMSF.createInstance( kind );

        XTextContent xTC = (XTextContent)
                        UnoRuntime.queryInterface(XDocumentIndex.class,oInt);

        return xTC;
View Full Code Here

    }

  public static XSpreadsheet createSpreadsheet( XSpreadsheetDocument oDoc )
              throws com.sun.star.uno.Exception {

    XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
        UnoRuntime.queryInterface( XMultiServiceFactory.class, oDoc );

    Object oInt = oDocMSF.createInstance(
                    "com.sun.star.sheet.Spreadsheet" );

    XSpreadsheet oSpreadsheet = (XSpreadsheet)
            UnoRuntime.queryInterface( XSpreadsheet.class, oInt );
View Full Code Here

  public XDiagram createDiagram(XComponent oDoc, String kind) {
    XInterface oInterface = null;
    XDiagram oDiagram = null;

       //get LineDiagram
       XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, oDoc );

       try{
             oInterface = (XInterface) oDocMSF.createInstance("com.sun.star.chart."+kind);
      oDiagram  = (XDiagram) UnoRuntime.queryInterface(XDiagram.class, oInterface);
    } catch ( Exception e ) {
      // Some exception occures.FAILED
      System.out.println( "Couldn't create "+kind+"-Diagram "+ e );
    }
View Full Code Here

  */
    public XInterface createControl(XComponent oDoc, String kind) {

        XInterface oControl = null;

       XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, oDoc );

       try{
             oControl = (XInterface) oDocMSF.createInstance("com.sun.star.form.component."+kind);
       } catch ( Exception e ) {
      // Some exception occures.FAILED
      System.out.println( "Couldn't create instance "+ kind + ": "+ e );
    }
    return oControl;
View Full Code Here

  */
    public Object createInstance(XComponent oDoc, String kind) {

        Object oInstance = null;

       XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, oDoc );

       try{
             oInstance = (Object) oDocMSF.createInstance(kind);
       } catch ( Exception e ) {
      // Some exception occures.FAILED
      System.out.println( "Couldn't create instance "+ kind + ": "+ e );
    }
    return oInstance;
View Full Code Here

TOP

Related Classes of com.sun.star.lang.XMultiServiceFactory

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.