interface XDependentTextField in module com::sun::star::text::

(Global Index)

Syntax

interface XDependentTextField : com::sun::star::text::XTextField ;

Description

makes it possible to attach this TextField to a TextFieldMaster .

Method Summary

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

getTextFieldMaster

Known Services Which Export this Interface

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

com::sun::star::text::textfield::User

Method Details



attachTextFieldMaster

Syntax

void attachTextFieldMaster (
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

Syntax

com::sun::star::beans::XPropertySet getTextFieldMaster ();

Returns

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