Package util

Examples of util.SOfficeFactory.createInstance()


        SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
        XComponent xComp = (XComponent)
            UnoRuntime.queryInterface(XComponent.class, xTextDoc);
        XInterface oInstance = (XInterface)
            SOF.createInstance(xComp, "com.sun.star.style.CharacterStyle");
        XStyleFamiliesSupplier oSFsS = (XStyleFamiliesSupplier)
                UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
        XNameAccess oSF = oSFsS.getStyleFamilies();
        XIndexAccess oSFIA = (XIndexAccess)
                UnoRuntime.queryInterface(XIndexAccess.class, oSF);
View Full Code Here


        tEnv.addObjRelation("XNameReplaceINDEX", nr);

        for (int n=1; n<(THRCNT+3); n++ ) {
            log.println( "adding INSTANCE"+n+" as mod relation to environment");
            tEnv.addObjRelation("INSTANCE"+n,
                SOF.createInstance(xComp,"com.sun.star.style.CharacterStyle"));
        }

        log.println("adding NAMEREPLACE as mod relation to environment");
        tEnv.addObjRelation("NAMEREPLACE", "SwXStyleFamily");
View Full Code Here

        Object instance = null;
        log.println( "creating a test environment" );
        try {
            oObj = SOF.createBookmark( xTextDoc );
            SOF.insertTextContent( xTextDoc, (XTextContent) oObj );
            instance = SOF.createInstance(xTextDoc,"com.sun.star.text.Bookmark");
        } catch ( com.sun.star.uno.Exception e ) {
            e.printStackTrace( log );
            throw new StatusException( "Couldn't create Bookmark", e );
        }
        log.println( "creating a new environment for bodytext object" );
View Full Code Here

            XNameAccess StyleFamilies = styleSup.getStyleFamilies();
            String[] styleFamiliesNames = StyleFamilies.getElementNames();
            XNameContainer StyleFamilyName = (XNameContainer)
                AnyConverter.toObject(new Type(XNameContainer.class),
                    StyleFamilies.getByName(styleFamiliesNames[0]));
            Object SC = SOF.createInstance(
                xSheetDoc, "com.sun.star.style.CellStyle");
            XStyle StyleCell = (XStyle)
                UnoRuntime.queryInterface(XStyle.class,SC);
            StyleFamilyName.insertByName(newName, StyleCell);
           
View Full Code Here

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

            Object instance = null;

            try {
                oGObject = SOF.createInstance
                    (xTextDoc,"com.sun.star.text.GraphicObject");
                instance = SOF.createInstance
                    (xTextDoc,"com.sun.star.text.GraphicObject");
                xTextFrame = SOF.createTextFrame(xTextDoc, 500, 500);
            }
View Full Code Here

            Object instance = null;

            try {
                oGObject = SOF.createInstance
                    (xTextDoc,"com.sun.star.text.GraphicObject");
                instance = SOF.createInstance
                    (xTextDoc,"com.sun.star.text.GraphicObject");
                xTextFrame = SOF.createTextFrame(xTextDoc, 500, 500);
            }
            catch (Exception ex) {
                log.println("Couldn't create instance");
View Full Code Here

            //obtain style family with name[0]
            Object objectStyle = StyleFamilies.getByName(styleFamilyName);
            XNameContainer xStyleFamilyName = (XNameContainer)
                UnoRuntime.queryInterface(XNameContainer.class, objectStyle);
            //creat new style
            Object SC = SOF.createInstance(xDrawDoc, "com.sun.star.style.Style");
            XStyle Style = (XStyle) UnoRuntime.queryInterface(XStyle.class,SC);
            //add new style to style familiy with name[0]
            xStyleFamilyName.insertByName(STYLE_NAME,Style);
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log) ;
View Full Code Here

        XInterface oObj = null;

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

        oObj =
            (XInterface) SOF.createInstance(
                xTextDoc, "com.sun.star.text.DocumentSettings"
            );

        TestEnvironment tEnv = new TestEnvironment(oObj);
View Full Code Here

        TestParameters Param, PrintWriter log) {

        XInterface oObj = null;

        SOfficeFactory SOF = SOfficeFactory.getFactory((XMultiServiceFactory)Param.getMSF());
        Object oGraphObj = SOF.createInstance(
            xTextDoc, "com.sun.star.text.GraphicObject");

        XText the_text = xTextDoc.getText();
        XTextCursor the_cursor = the_text.createTextCursor();
        XTextContent the_content = (XTextContent)
View Full Code Here

        XInterface oObj = null;
        Object oGObject = null;
        SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF() );

        try {
            oGObject = SOF.createInstance
                (xTextDoc,"com.sun.star.text.GraphicObject");
        }
        catch (Exception ex) {
            log.println("Couldn't create instance");
            ex.printStackTrace(log);
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.