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

Interface to provide standard type conversions. More...

import"XTypeConverter.idl";

Inheritance diagram for XTypeConverter:
XInterface Converter

Public Member Functions

any convertTo ([in] any aFrom, [in] type xDestinationType) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::script::CannotConvertException )
 Converts the value aFrom to the specified type xDestinationType. More...
 
any convertToSimpleType ([in] any aFrom, [in] com::sun::star::uno::TypeClass aDestinationType) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::script::CannotConvertException )
 Converts the value aFrom to the specified simple type aDestinationType. 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

Interface to provide standard type conversions.

See also
Converter

Member Function Documentation

◆ convertTo()

any convertTo ( [in] any  aFrom,
[in] type  xDestinationType 
)
raises ( com::sun::star::lang::IllegalArgumentException,
com::sun::star::script::CannotConvertException
)

Converts the value aFrom to the specified type xDestinationType.

Throws a CannotConvertException if the conversion failed.

Parameters
aFromsource value
xDestinationTypedestination type
Returns
converted value (any carrying value of type xDestinationType

◆ convertToSimpleType()

any convertToSimpleType ( [in] any  aFrom,
[in] com::sun::star::uno::TypeClass  aDestinationType 
)
raises ( com::sun::star::lang::IllegalArgumentException,
com::sun::star::script::CannotConvertException
)

Converts the value aFrom to the specified simple type aDestinationType.

Throws a CannotConvertException if the conversion failed and a com::sun::star::lang::IllegalArgumentException if the destination com::sun::star::uno::TypeClass is not simple, e.g. not long or byte.

Parameters
aFromsource value
aDestinationTypedestination type class
Returns
converted value (any carrying value of type aDestinationType

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