LibreOffice
LibreOffice 7.4 SDK API Reference
Public Member Functions | List of all members
XInvocation Interface Referencepublished

gives access to an object's methods and properties. More...

import"XInvocation.idl";

Inheritance diagram for XInvocation:
XInterface BrowseNode XAutomationInvocation XInvocation2 ScriptProvider LanguageScriptProvider MasterScriptProvider ScriptProviderForBasic ScriptProviderForBeanShell ScriptProviderForJava ScriptProviderForJavaScript

Public Member Functions

com::sun::star::beans::XIntrospectionAccess getIntrospection ()
 returns the introspection from this object or NULL if the object does not provide this information. More...
 
any invoke ([in] string aFunctionName, [in] sequence< any > aParams, [out] sequence< short > aOutParamIndex, [out] sequence< any > aOutParam) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::script::CannotConvertException, com::sun::star::reflection::InvocationTargetException )
 provides access to methods exposed by an object. More...
 
void setValue ([in] string aPropertyName, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::script::CannotConvertException, com::sun::star::reflection::InvocationTargetException )
 sets a value to the property with the specified name. More...
 
any getValue ([in] string aPropertyName) raises ( com::sun::star::beans::UnknownPropertyException )
 returns the value of the property with the specified name. More...
 
boolean hasMethod ([in] string aName)
 returns TRUE if the method with the specified name exists, else FALSE. More...
 
boolean hasProperty ([in] string aName)
 returns TRUE if the property with the specified name exists, else FALSE. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

Detailed 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.

Member Function Documentation

◆ getIntrospection()

returns the introspection from this object or NULL if the object does not provide this information.

◆ getValue()

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

returns the value of the property with the specified name.

Parameters
aPropertyNamespecifies the name of the property.

◆ hasMethod()

boolean hasMethod ( [in] string  aName)

returns TRUE if the method with the specified name exists, else FALSE.

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

    @param aName
        specifies the name of the method.

◆ hasProperty()

boolean hasProperty ( [in] string  aName)

returns TRUE if the property with the specified name exists, else FALSE.

    <p>This optimizes the calling sequence
    ( XInvocation::hasProperty(),
    XInvocation::getValue() ) or

    ( XInvocation::hasProperty(),
    XInvocation::setValue() )!

        @param aName
    specifies the name of the property.

◆ invoke()

any invoke ( [in] string  aFunctionName,
[in] sequence< any >  aParams,
[out] sequence< short >  aOutParamIndex,
[out] sequence< any >  aOutParam 
)
raises ( com::sun::star::lang::IllegalArgumentException,
com::sun::star::script::CannotConvertException,
com::sun::star::reflection::InvocationTargetException
)

provides access to methods exposed by an object.

Parameters
aFunctionNamethe method to invoke
aParamsall parameters; pure out params are undefined in sequence, the value has to be ignored by the callee
aOutParamIndexThis sequence contains the indices of all parameters that are specified as out or inout.
aOutParamThis 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()

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.


The documentation for this interface was generated from the following file: