Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: script ::

interface XInvocation
Description
gives access to an object's methods and properties. Container access is available through ::com::sun::star::container::XIndexContainer, ::com::sun::star::container::XNameContainer and ::com::sun::star::container::XEnumerationAccess.


Methods' Summary
getIntrospection returns the introspection from this object or NULL if the object does not provide this information.  
invoke provides access to methods exposed by an object.  
setValue sets a value to the property with the specified name.  
getValue returns the value of the property with the specified name.  
hasMethod returns true if the method with the specified name exists, else false.  
hasProperty returns true if the property with the specified name exists, else false.  
Methods' Details
getIntrospection
::com::sun::star::beans::XIntrospectionAccess
getIntrospection();

Description
returns the introspection from this object or NULL if the object does not provide this information.
invoke
any
invoke( [in] string  aFunctionName,
[in] sequence< any >  aParams,
[out] sequence< short >  aOutParamIndex,
[out] sequence< any >  aOutParam )
raises( ::com::sun::star::lang::IllegalArgumentException,
CannotConvertException,
::com::sun::star::reflection::InvocationTargetException );

Description
provides access to methods exposed by an object.
Parameter aParams
all parameters; pure out params are undefined in sequence, the value has to be ignored by the callee
Parameter aOutParamIndex
This sequence contains the indices of all parameters that are specified as out or inout.
Parameter aOutParam
This sequence contains the values of all parameters that are specified as out or inout and corresponds with the indices provided by the aOutParamIndex sequence. Example: aOutParamIndex == { 1, 4 } means that aOutParam[0] contains the out value of the aParams[1] parameter and aOutParam[1] contains the out value of the aParams[4] parameter.
setValue
void
setValue( [in] string  aPropertyName,
[in] any  aValue )
raises( ::com::sun::star::beans::UnknownPropertyException,
CannotConvertException,
::com::sun::star::reflection::InvocationTargetException );

Description
sets a value to the property with the specified name.

If the underlying object implements an ::com::sun::star::container::XNameContainer, then this method will insert the value if there is no such aPropertyName.

getValue
any
getValue( [in] string  aPropertyName )
raises( ::com::sun::star::beans::UnknownPropertyException );

Description
returns the value of the property with the specified name.
Parameter aPropertyName
specifies the name of the property.
hasMethod
boolean
hasMethod( [in] string  aName );

Description
returns true if the method with the specified name exists, else false.

This optimizes the calling sequence ( XInvocation::hasMethod, XInvocation::invoke )!

Parameter aName
specifies the name of the method.
hasProperty
boolean
hasProperty( [in] string  aName );

Description
returns true if the property with the specified name exists, else false.

This optimizes the calling sequence ( XInvocation::hasProperty, XInvocation::getValue ) or ( XInvocation::hasProperty, XInvocation::setValue )!

Parameter aName
specifies the name of the property.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.