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

interface XTypeConverter

Methods' Summary
convertTo Converts the value aFrom to the specified type xDestinationType. Throws a CannotConvertException if the conversion failed.  
convertToSimpleType 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.  
Methods' Details
convertTo
any
convertTo( [in] any  aFrom,
[in] type  xDestinationType )
raises( ::com::sun::star::lang::IllegalArgumentException,
CannotConvertException );

Description
Converts the value aFrom to the specified type xDestinationType. Throws a CannotConvertException if the conversion failed.
Parameter aFrom
source value
Parameter xDestinationType
destination 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,
CannotConvertException );

Description
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.
Parameter aFrom
source value
Parameter aDestinationType
destination type class
Returns
converted value (any carrying value of type aDestinationType
Top of Page