Top   Module   Use   Manual   Index 
 EXPORTING SERVICES | METHODS' SUMMARY | METHODS' DETAILS 

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

interface XDependentTextField

Base Interface
com::sun::star::text::XTextField

Description
makes it possible to attach this TextField to a TextFieldMaster .


Known Services which Export this Interface

com::sun::star::text::DependentTextField is a TextField which is not specified by itself, but dependent on a TextFieldMaster .
com::sun::star::text::textfield::User specifies service of a user defined field.

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 xFieldMaster )
raises ( 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