Examples of XTextField


Examples of com.sun.star.text.XTextField

        XText xDocText = m_xDoc.getText();
        XTextCursor xDocTextCursor = xDocText.createTextCursor();
        xDocTextCursor.goRight((short)1, false);
        xDocTextCursor.goRight((short)3, true);

        XTextField xMetaField = inserter.makeMetaField();

        xDocText.insertTextContent(xDocTextCursor, xMetaField, true);

        XPropertySet xPropertySet = (XPropertySet)
            UnoRuntime.queryInterface(XPropertySet.class, xMetaField);
View Full Code Here

Examples of com.sun.star.text.XTextField

    XTextField makeMetaField() throws Exception
    {
        Object xMeta = m_xDocFactory.createInstance(
                "com.sun.star.text.textfield.MetadataField");
        XTextField xContent = (XTextField)
            UnoRuntime.queryInterface(XTextField.class, xMeta);
        return xContent;
    }
View Full Code Here

Examples of com.sun.star.text.XTextField

            try
            {
                    // Use the text document's factory to create a DateTime text field,
                    // and access it's
                    // XTextField interface
                    XTextField xDateField = (XTextField) UnoRuntime.queryInterface (
                            XTextField.class, mxDocFactory.createInstance (
                                    "com.sun.star.text.TextField.DateTime" ) );

                    // Insert it at the end of the document
                    mxDocText.insertTextContent ( mxDocText.getEnd(), xDateField, false );
View Full Code Here

Examples of com.sun.star.text.XTextField

                        Object objectTextField =
                            xmultiservicefactoryTextField.createInstance(
                                "com.sun.star.text.TextField.URL" );
                       
                        // Querying for the interface XTextField
                        XTextField xtextfield = ( XTextField )
                            UnoRuntime.queryInterface( XTextField.class,
                                                       objectTextField );
                       
                        // Querying for the interface XPropertySet
                        XPropertySet xpropertysetTextField = ( XPropertySet )
View Full Code Here

Examples of com.sun.star.text.XTextField

   *            the event listener wrapper to be added
   *
   * @author Sebastian R�sgen
   */
  private void addEventListener(XEventListener xEventListener) {
    XTextField xTextField = (XTextField) UnoRuntime.queryInterface(
        XTextField.class, xDependentTextField);
    xTextField.addEventListener(wrapper);
  }
View Full Code Here

Examples of com.sun.star.text.XTextField

   *            the event listener wrapper to be removed
   *
   * @author Sebastian R�sgen
   */
  private void removeEventListener(XEventListener xEventListener) {
    XTextField xTextField = (XTextField) UnoRuntime.queryInterface(
        XTextField.class, xDependentTextField);
    xTextField.removeEventListener(wrapper);
  }
View Full Code Here

Examples of com.sun.star.text.XTextField

      while (xTextRangeCompare.compareRegionEnds(textCursor.getStart(),
          xTextRange.getEnd()) != -1) {
        XPropertySet propertySet = (XPropertySet) UnoRuntime
            .queryInterface(XPropertySet.class, textCursor);
        Any any = (Any) propertySet.getPropertyValue("TextField");
        XTextField xTextField = (XTextField) any.getObject();
        if (xTextField != null)
          arrayList.add(new TextField(textDocument, xTextField));
        if (!textCursor.goRight((short) 1, false))
          break;
      }
View Full Code Here

Examples of com.sun.star.text.XTextField

      XEnumerationAccess xEnumerationAccess = xTextFieldsSupplier.getTextFields();
      XEnumeration xEnumeration = xEnumerationAccess.createEnumeration();
      ArrayList arrayList = new ArrayList();
      while(xEnumeration.hasMoreElements()) {
        Object object = xEnumeration.nextElement();
        XTextField xTextField = (XTextField)UnoRuntime.queryInterface(XTextField.class, object);
        arrayList.add(new TextField(textDocument, xTextField));
      }
      return (ITextField[])arrayList.toArray(new ITextField[arrayList.size()]);
    }
    catch(Exception exception) {
View Full Code Here

Examples of com.sun.star.text.XTextField

      XEnumerationAccess xEnumerationAccess = xTextFieldsSupplier.getTextFields();
      XEnumeration xEnumeration = xEnumerationAccess.createEnumeration();
      ArrayList arrayList = new ArrayList();
      while(xEnumeration.hasMoreElements()) {
        Object object = xEnumeration.nextElement();
        XTextField xTextField = (XTextField)UnoRuntime.queryInterface(XTextField.class, object);
        XServiceInfo xInfo = (XServiceInfo)UnoRuntime.queryInterface(XServiceInfo.class, xTextField);
        if(xInfo.supportsService(ITextFieldService.PLACEHOLDER_TEXTFIELD_ID)){
          arrayList.add(new TextField(textDocument, xTextField));
        }
      }
View Full Code Here

Examples of com.sun.star.text.XTextField

      if(placeholderType < 0 || placeholderType > 4)
        throw new TextException("The placeholder type must be one of the valid static members of com.sun.star.text.PlaceholderType.");
      XMultiServiceFactory xMultiServiceFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(XMultiServiceFactory.class, textDocument.getXTextDocument());
      Object textField = xMultiServiceFactory.createInstance(ITextFieldService.PLACEHOLDER_TEXTFIELD_ID);

      XTextField xTextField = (XTextField)UnoRuntime.queryInterface(XTextField.class, textField);
     
      XPropertySet xPropertySet = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xTextField);
 
      // Grundeinstellung festlegen
      xPropertySet.setPropertyValue("PlaceHolder", 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.