Package com.sun.star.text

Examples of com.sun.star.text.XDependentTextField.attachTextFieldMaster()


  public ITextField constructNewTextField() throws NOAException {
    try {
      XMultiServiceFactory xMultiServiceFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(XMultiServiceFactory.class, textDocument.getXTextDocument());
      Object textField = xMultiServiceFactory.createInstance(ITextFieldService.USER_TEXTFIELD_ID);
      XDependentTextField xDependentTextField = (XDependentTextField)UnoRuntime.queryInterface(XDependentTextField.class, textField);
      xDependentTextField.attachTextFieldMaster(xPropertySet);
      return new TextField(textDocument, xDependentTextField);
    }
    catch(Throwable throwable) {
      throw new NOAException(throwable);
    }
View Full Code Here


      INumberFormat numberFormat, boolean isFormula) throws NOAException {
    try {
      XMultiServiceFactory xMultiServiceFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(XMultiServiceFactory.class, textDocument.getXTextDocument());
      Object textField = xMultiServiceFactory.createInstance(ITextFieldService.VARIABLES_TEXTFIELD_ID);
      XDependentTextField xDependentTextField = (XDependentTextField)UnoRuntime.queryInterface(XDependentTextField.class, textField);
      xDependentTextField.attachTextFieldMaster(xPropertySet);

      XPropertySet xPropertySetField = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xDependentTextField);
      xPropertySetField.setPropertyValue("IsVisible", new Boolean(visible));
      xPropertySetField.setPropertyValue("IsFixedLanguage", new Boolean(false))
     
View Full Code Here

              .getXTextDocument());
      Object textField = xMultiServiceFactory
          .createInstance(ITextFieldService.VARIABLES_TEXTFIELD_ID);
      XDependentTextField xDependentTextField = (XDependentTextField) UnoRuntime
          .queryInterface(XDependentTextField.class, textField);
      xDependentTextField.attachTextFieldMaster(xPropertySet);

      XPropertySet xPropertySetField = (XPropertySet) UnoRuntime
          .queryInterface(XPropertySet.class, xDependentTextField);
      xPropertySetField.setPropertyValue("IsVisible",
          new Boolean(visible));
View Full Code Here

              .getXTextDocument());
      Object textField = xMultiServiceFactory
          .createInstance(ITextFieldService.USER_TEXTFIELD_ID);
      XDependentTextField xDependentTextField = (XDependentTextField) UnoRuntime
          .queryInterface(XDependentTextField.class, textField);
      xDependentTextField.attachTextFieldMaster(xPropertySet);
      return new TextField(textDocument, xDependentTextField);
    } catch (Throwable throwable) {
      throw new NOAException(throwable);
    }
  }
View Full Code Here

      XPropertySet xPropertySet = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, oFieldMaster);
 
      xPropertySet.setPropertyValue("Name", name);
      xPropertySet.setPropertyValue("Content", content);
 
      xDependentTextField.attachTextFieldMaster(xPropertySet);
     
      return new TextField(textDocument, xDependentTextField);
    }
    catch(Exception exception) {
      throw new TextException(exception);
View Full Code Here

          .queryInterface(XPropertySet.class, oFieldMaster);

      xPropertySet.setPropertyValue("Name", name);
      xPropertySet.setPropertyValue("Content", content);

      xDependentTextField.attachTextFieldMaster(xPropertySet);

      return new TextField(textDocument, xDependentTextField);
    } catch (Exception exception) {
      throw new TextException(exception);
    }
View Full Code Here

            // Set the name and value of the FieldMaster
            xMasterPropSet.setPropertyValue ( "Name", "UserEmperor" );
            xMasterPropSet.setPropertyValue ( "Value", new Integer ( 42 ) );
           
            // Attach the field master to the user field
            xUserField.attachTextFieldMaster ( xMasterPropSet );
           
            // Move the cursor to the end of the document
            mxDocCursor.gotoEnd( false );
            // insert a paragraph break using the XSimpleText interface
            mxDocText.insertControlCharacter (
View Full Code Here

                Object oMaster = xTextFieldsSupplier.getTextFieldMasters().getByName("com.sun.star.text.FieldMaster.User." + FieldName);
                XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, oMaster);
                xComponent.dispose();
            }
            XPropertySet xPSet = createUserField(FieldName, FieldTitle);
            xDepField.attachTextFieldMaster(xPSet);
            xTextCursor.getText().insertTextContent(xTextCursor, xFieldContent, false);
        } catch (com.sun.star.uno.Exception exception) {
            exception.printStackTrace(System.out);
        }
    }
View Full Code Here

            // Set the name and value of the FieldMaster
            xMasterPropSet.setPropertyValue ( "Name", "UserEmperor" );
            xMasterPropSet.setPropertyValue ( "Value", new Integer ( 42 ) );
           
            // Attach the field master to the user field
            xUserField.attachTextFieldMaster ( xMasterPropSet );
           
            // Move the cursor to the end of the document
            mxDocCursor.gotoEnd( false );
            // insert a paragraph break using the XSimpleText interface
            mxDocText.insertControlCharacter (
View Full Code Here

            XText the_Text = xTextDoc.getText();
            XTextCursor the_Cursor = the_Text.createTextCursor();
            XTextContent the_Field = (XTextContent)
                             UnoRuntime.queryInterface(XTextContent.class,oObj);

            xTF.attachTextFieldMaster(PFieldMaster);
            the_Text.insertTextContent(the_Cursor,the_Field,false);
        }
        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.