Examples of XTextFieldsSupplier


Examples of com.sun.star.text.XTextFieldsSupplier

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


        // create testobject here
        try {
            XTextFieldsSupplier oTFS = (XTextFieldsSupplier)
                UnoRuntime.queryInterface( XTextFieldsSupplier.class, xTextDoc );

            oObj = oTFS.getTextFieldMasters();

        }
        catch (Exception ex) {
            log.println("Couldn't create instance");
            ex.printStackTrace(log);
View Full Code Here

Examples of com.sun.star.text.XTextFieldsSupplier

        XComponent xTemplateComponent =
            newDocComponentFromTemplate( sTemplateFileUrl.toString() );
       
        // get XTextFieldsSupplier, XBookmarksSupplier interfaces
        XTextFieldsSupplier xTextFieldsSupplier = (XTextFieldsSupplier)
            UnoRuntime.queryInterface(XTextFieldsSupplier.class,
                                      xTemplateComponent);
        XBookmarksSupplier xBookmarksSupplier = (XBookmarksSupplier)
            UnoRuntime.queryInterface(XBookmarksSupplier.class, xTemplateComponent);
       
        // access the TextFields and the TextFieldMasters collections
        XNameAccess xNamedFieldMasters = xTextFieldsSupplier.getTextFieldMasters();
        XEnumerationAccess xEnumeratedFields = xTextFieldsSupplier.getTextFields();
       
        // iterate over hashtable and insert values into field masters
        java.util.Enumeration keys = recipient.keys();
        while(keys.hasMoreElements()) {
            // get column name
View Full Code Here

Examples of com.sun.star.text.XTextFieldsSupplier

        } catch(com.sun.star.beans.UnknownPropertyException e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create a test environment", e);
        }

        XTextFieldsSupplier xTFSupp = (XTextFieldsSupplier)
            UnoRuntime.queryInterface(XTextFieldsSupplier.class, left);

        oObj = xTFSupp.getTextFields();

        TestEnvironment tEnv = new TestEnvironment(oObj);

        return tEnv;
    } // finish method getTestEnvironment
View Full Code Here

Examples of com.sun.star.text.XTextFieldsSupplier

        XInterface oObj = null;
        XText oText = null;
        XTextContent oContent = null;
        XInterface aField = null;
        XTextFieldsSupplier xTextFieldsSupp = null;

        try {
            // we want to create an instance of ScCellFieldObj.
            // to do this we must get an MultiServiceFactory.

            XMultiServiceFactory _oMSF = (XMultiServiceFactory)
                UnoRuntime.queryInterface(XMultiServiceFactory.class, xSheetDoc);

            aField = (XInterface)
                _oMSF.createInstance("com.sun.star.text.TextField.URL");
            oContent = (XTextContent)
                UnoRuntime.queryInterface(XTextContent.class, aField);

            XSpreadsheets oSheets = xSheetDoc.getSheets() ;
            XIndexAccess oIndexSheets = (XIndexAccess)
                UnoRuntime.queryInterface(XIndexAccess.class, oSheets);
            XSpreadsheet oSheet = (XSpreadsheet) AnyConverter.toObject(
                    new Type(XSpreadsheet.class),oIndexSheets.getByIndex(0));

            XCell oCell = oSheet.getCellByPosition(2,3);
            oText = (XText)UnoRuntime.queryInterface(XText.class, oCell);

            oText.insertTextContent(
                oText.createTextCursor(), oContent, true);

            xTextFieldsSupp = (XTextFieldsSupplier)
                UnoRuntime.queryInterface(XTextFieldsSupplier.class, oCell);

             oObj = xTextFieldsSupp.getTextFields().createEnumeration();
        } catch (com.sun.star.lang.WrappedTargetException e) {
            log.println("Exception occured while creating test Object.");
            e.printStackTrace(log);
            throw new StatusException("Couldn't create test object", e);
        } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
            log.println("Exception occured while creating test Object.");
            e.printStackTrace(log);
            throw new StatusException("Couldn't create test object", e);
        } catch (com.sun.star.lang.IllegalArgumentException e) {
            log.println("Exception occured while creating test Object.");
            e.printStackTrace(log);
            throw new StatusException("Couldn't create test object", e);
        } catch (com.sun.star.uno.Exception e) {
            log.println("Exception occured while creating test Object.");
            e.printStackTrace(log);
            throw new StatusException("Couldn't create test object", e);
        }

        TestEnvironment tEnv = new TestEnvironment(oObj) ;

        tEnv.addObjRelation("ENUM", xTextFieldsSupp.getTextFields());

        return tEnv;
    }
View Full Code Here

Examples of com.sun.star.text.XTextFieldsSupplier

        } catch(com.sun.star.beans.UnknownPropertyException e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create a test environment", e);
        }

        XTextFieldsSupplier xTFSupp = (XTextFieldsSupplier)
            UnoRuntime.queryInterface(XTextFieldsSupplier.class, left);

        oObj = xTFSupp.getTextFields();

        TestEnvironment tEnv = new TestEnvironment(oObj);

        return tEnv;
    } // finish method getTestEnvironment
View Full Code Here

Examples of com.sun.star.text.XTextFieldsSupplier

        XComponent xTemplateComponent =
            newDocComponentFromTemplate( sTemplateFileUrl.toString() );
       
        // get XTextFieldsSupplier, XBookmarksSupplier interfaces
        XTextFieldsSupplier xTextFieldsSupplier = (XTextFieldsSupplier)
            UnoRuntime.queryInterface(XTextFieldsSupplier.class,
                                      xTemplateComponent);
        XBookmarksSupplier xBookmarksSupplier = (XBookmarksSupplier)
            UnoRuntime.queryInterface(XBookmarksSupplier.class, xTemplateComponent);
       
        // access the TextFields and the TextFieldMasters collections
        XNameAccess xNamedFieldMasters = xTextFieldsSupplier.getTextFieldMasters();
        XEnumerationAccess xEnumeratedFields = xTextFieldsSupplier.getTextFields();
       
        // iterate over hashtable and insert values into field masters
        java.util.Enumeration keys = recipient.keys();
        while(keys.hasMoreElements()) {
            // get column name
View Full Code Here

Examples of com.sun.star.text.XTextFieldsSupplier

            e.printStackTrace(log);
            throw new StatusException( "Couldn't create TextField", e );
        }

        // create testobject here
        XTextFieldsSupplier oTFS = (XTextFieldsSupplier)
            UnoRuntime.queryInterface( XTextFieldsSupplier.class, xTextDoc );
        xFEA = oTFS.getTextFields();
        oObj = oTFS.getTextFields().createEnumeration();

        log.println( "creating a new environment for FieldEnumeration object" );
        TestEnvironment tEnv = new TestEnvironment( oObj );

        tEnv.addObjRelation("ENUM", xFEA);
View Full Code Here

Examples of com.sun.star.text.XTextFieldsSupplier

        XComponent xTemplateComponent =
            newDocComponentFromTemplate( sTemplateFileUrl.toString() );
       
        // get XTextFieldsSupplier, XBookmarksSupplier interfaces
        XTextFieldsSupplier xTextFieldsSupplier = (XTextFieldsSupplier)UnoRuntime.queryInterface(
            XTextFieldsSupplier.class, xTemplateComponent);
        XBookmarksSupplier xBookmarksSupplier = (XBookmarksSupplier)UnoRuntime.queryInterface(
            XBookmarksSupplier.class, xTemplateComponent);
       
        // access the TextFields and the TextFieldMasters collections
        XNameAccess xNamedFieldMasters = xTextFieldsSupplier.getTextFieldMasters();
        XEnumerationAccess xEnumeratedFields = xTextFieldsSupplier.getTextFields();
       
        // iterate over hashtable and insert values into field masters
        java.util.Enumeration keys = recipient.keys();
        while(keys.hasMoreElements()) {
            // get column name
View Full Code Here

Examples of com.sun.star.text.XTextFieldsSupplier

   * @author Markus Kr�ger
   * @date 29.05.2007
   */
  public void refresh() throws TextException {
    try {
      XTextFieldsSupplier xTextFieldsSupplier = (XTextFieldsSupplier)UnoRuntime.queryInterface(XTextFieldsSupplier.class, textDocument.getXTextDocument());
      XRefreshable xRefreshable = (XRefreshable)UnoRuntime.queryInterface(XRefreshable.class, xTextFieldsSupplier.getTextFields());
      xRefreshable.refresh();
    }
    catch(Exception exception) {
      throw new TextException(exception);
    }
View Full Code Here

Examples of com.sun.star.text.XTextFieldsSupplier

   *
   * @author Andreas Br�ker
   */
  public ITextFieldMaster getUserTextFieldMaster(String name) throws TextException {
    try {
      XTextFieldsSupplier xTextFieldsSupplier = (XTextFieldsSupplier)UnoRuntime.queryInterface(XTextFieldsSupplier.class, textDocument.getXTextDocument());
      XNameAccess xNameAccess = xTextFieldsSupplier.getTextFieldMasters();
      Any any = null;
     
      try {
        any = (Any)xNameAccess.getByName(USER_TEXTFIELD_MASTER_PREFIX + name);
      }
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.