:: com :: sun :: star :: text ::

interface XDependentTextField
Base Hierarchy
::com::sun::star::uno::XInterface
 |
 +-::com::sun::star::lang::XComponent
    |
    +-XTextContent
       |
       +-XTextField
          |
          +-XDependentTextField
Description
makes it possible to attach this TextField to a TextFieldMaster .

Methods' Summary
attachTextFieldMaster method must be called to attach the TextFieldMaster to this TextField .
getTextFieldMaster
Methods' Details
attachTextFieldMaster
void
attachTextFieldMaster(
 
[in] ::com::sun::star::beans::XPropertySet 

raises(

 
xFieldMaster ) 
::com::sun::star::lang::IllegalArgumentException );

Description
method must be called to attach the TextFieldMaster to this TextField .

A TextFieldMaster can only be assigned once.

Example
Create and insert a user field (with a TextUserField ):

 xMaster = xDoc.createInstanceByServiceName(
 "com.sun.star.text.UserFieldMaster" )

 xMaster.Value = 42
 xDoc.TextFieldMasters.insertElementByName( "MyMaster", xMaster )

 xField = xDoc.createInstanceByServiceName(
 "com.sun.star.text.UserField" )

 xField.attachTextFieldMaster( xMaster )
 xDoc.Text.insertTextContent( xCursor, xField, false )
getTextFieldMaster
::com::sun::star::beans::XPropertySet
getTextFieldMaster();
 
 

Returns
the previously attached TextFieldMaster or NULL if nothing is attached.
Top of Page