Examples of supportsService()


Examples of com.sun.star.lang.XServiceInfo.supportsService()

    public void _Arguments() {
        // check if Service is available
        XServiceInfo xInfo = (XServiceInfo)
            UnoRuntime.queryInterface(XServiceInfo.class, oObj );

        if ( ! xInfo.supportsService
                ( "com.sun.star.sheet.FunctionDescription" ) ) {
           log.println( "Service not available !" );
           tRes.tested( "Supported", false );
        }
View Full Code Here

Examples of com.sun.star.lang.XServiceInfo.supportsService()

            info = (XServiceInfo) UnoRuntime.queryInterface
                (XServiceInfo.class, tabs.getByName(tabNames[0])) ;
        } catch (com.sun.star.uno.Exception e) {}

        log.println("Support : " +
            info.supportsService("com.sun.star.sdbcx.Table")) ;
       

        tRes.tested("getTables()", tabs != null) ;
    }
View Full Code Here

Examples of com.sun.star.lang.XServiceInfo.supportsService()



    public boolean hasControlByName(String _FormName, Object _oDrawPageElement){
        XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, _oDrawPageElement);
        if (xServiceInfo.supportsService("com.sun.star.drawing.ControlShape")){
            XControlShape xControlShape = (XControlShape) UnoRuntime.queryInterface(XControlShape.class, _oDrawPageElement);
            XControlModel xControlModel = xControlShape.getControl();
            xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, xControlShape.getControl());
            if (xServiceInfo.supportsService("com.sun.star.form.FormComponent")){
                XChild xChild = (XChild) UnoRuntime.queryInterface(XChild.class, xControlModel);
View Full Code Here

Examples of com.sun.star.lang.XServiceInfo.supportsService()

        XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, _oDrawPageElement);
        if (xServiceInfo.supportsService("com.sun.star.drawing.ControlShape")){
            XControlShape xControlShape = (XControlShape) UnoRuntime.queryInterface(XControlShape.class, _oDrawPageElement);
            XControlModel xControlModel = xControlShape.getControl();
            xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, xControlShape.getControl());
            if (xServiceInfo.supportsService("com.sun.star.form.FormComponent")){
                XChild xChild = (XChild) UnoRuntime.queryInterface(XChild.class, xControlModel);
                XNamed xNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class, xChild.getParent());
                String sName = xNamed.getName();
                return _FormName.equals(xNamed.getName());
            }
View Full Code Here

Examples of com.sun.star.lang.XServiceInfo.supportsService()

        try {
            xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, xInterface);
            com.sun.star.lang.XComponent xComponent = xComponentLoader.loadComponentFromURL(sURL, sFrame, 0, xValues);

            XServiceInfo xComponentService = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, xComponent);
            if (xComponentService.supportsService("com.sun.star.text.TextDocument"))
                oDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xComponent);

            //TODO: write if clauses for Calc, Impress and Draw

        } catch (Exception exception) {
View Full Code Here

Examples of com.sun.star.lang.XServiceInfo.supportsService()

                XServiceInfo.class, oObj);
       
        optionalService = entry.isOptional;

        String theService = getTestedClassName();
        if (xInfo != null && !xInfo.supportsService(theService)) {
            log.println("Service "+theService+" not available");
            if (optionalService) {
                log.println("This is OK since it is optional");
            } else {
                Status.failed(theService + " is not supported");
View Full Code Here

Examples of com.sun.star.lang.XServiceInfo.supportsService()

                UnoRuntime.queryInterface(XServiceInfo.class,aObject);
        printArray(xSI.getSupportedServiceNames());
        String str="Therein not Supported Service";
    boolean notSupportedServices = false;
        for (int i=0;i<xSI.getSupportedServiceNames().length;i++) {
            if (! xSI.supportsService(xSI.getSupportedServiceNames()[i])) {
        notSupportedServices = true;
                str+="\n" + xSI.getSupportedServiceNames()[i];
            }
        }
    if (notSupportedServices)
View Full Code Here

Examples of com.sun.star.lang.XServiceInfo.supportsService()

    private String getFormatExtension(Object _xComponent /* int _nType*/ )
         {
             String sExtension;
             XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface( XServiceInfo.class, _xComponent );
             if ( xServiceInfo.supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) )
             {
                 // calc
                 sExtension = ".ods";
             }
             else if (xServiceInfo.supportsService("com.sun.star.text.TextDocument"))
View Full Code Here

Examples of com.sun.star.lang.XServiceInfo.supportsService()

             if ( xServiceInfo.supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) )
             {
                 // calc
                 sExtension = ".ods";
             }
             else if (xServiceInfo.supportsService("com.sun.star.text.TextDocument"))
             {
                 //writer
                 sExtension = ".odt";
             }
             else
View Full Code Here

Examples of com.sun.star.lang.XServiceInfo.supportsService()

    }


    private static String getXMLOutputFilterforXComponent(XComponent xComponent, StringBuffer suffix){
        XServiceInfo xSI = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, xComponent);
        if (xSI.supportsService("com.sun.star.text.TextDocument")){
            resetBuffer(suffix, ".sxw");
            return "swriter: StarOffice XML (Writer)";
        }else if (xSI.supportsService("com.sun.star.sheet.SpreadsheetDocument")){
            resetBuffer(suffix, ".sxc");
            return "scalc: StarOffice XML (Calc)";
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.