CreateUnoValue Function
āĻāĻāĻāĻŋ āĻŦāĻ¸ā§āĻ¤ā§ āĻĒā§āĻ°āĻĻāĻžāĻ¨ āĻāĻ°ā§ āĻ¯āĻž Uno āĻāĻžāĻāĻĒ āĻĒāĻĻā§āĻ§āĻ¤āĻŋāĻ¤ā§ āĻāĻ˛ā§āĻ˛ā§āĻāĻŋāĻ¤ āĻ¸āĻ āĻŋāĻāĻāĻžāĻŦā§ āĻāĻžāĻāĻĒāĻā§āĻ¤ āĻŽāĻžāĻ¨ā§āĻ° āĻ¸ā§āĻ¸ā§āĻĒāĻˇā§āĻ āĻŦā§āĻ¯āĻžāĻā§āĻ¯āĻž āĻĒā§āĻ°āĻĻāĻžāĻ¨ āĻāĻ°ā§āĨ¤
Uno āĻ¤ā§ āĻĒāĻžāĻ¸ āĻāĻ°āĻžāĻ° āĻ¸āĻŽā§ āĻŦāĻ¸ā§āĻ¤ā§āĻāĻŋ āĻ¸ā§āĻŦāĻ¯āĻŧāĻāĻā§āĻ°āĻŋāĻ¯āĻŧāĻāĻžāĻŦā§ āĻ¸āĻāĻļā§āĻ˛āĻŋāĻˇā§āĻ āĻāĻžāĻāĻĒā§āĻ° Any āĻāĻžāĻāĻĒā§ āĻ°ā§āĻĒāĻžāĻ¨ā§āĻ¤āĻ°āĻŋāĻ¤ āĻšāĻŦā§āĨ¤ āĻāĻžāĻāĻĒāĻāĻŋ āĻ āĻŦāĻļā§āĻ¯āĻ āĻāĻ° āĻ¸āĻŽā§āĻĒā§āĻ°ā§āĻŖ āĻ¯ā§āĻā§āĻ¯āĻ¤āĻž āĻ¸āĻŽā§āĻĒāĻ¨ā§āĻ¨ Uno āĻāĻžāĻāĻĒ āĻ¨āĻžāĻŽā§ āĻāĻ˛ā§āĻ˛ā§āĻ āĻāĻ°āĻ¤ā§ āĻšāĻŦā§āĨ¤
LibreOffice API āĻĒā§āĻ°āĻžāĻ¯āĻŧāĻ Any āĻāĻžāĻāĻĒ āĻŦā§āĻ¯āĻŦāĻšāĻžāĻ° āĻāĻ°ā§ āĻĨāĻžāĻā§āĨ¤ āĻāĻāĻāĻŋ āĻ āĻ¨ā§āĻ¯ āĻāĻ¨āĻāĻžā§āĻ°āĻ¨āĻŽā§āĻ¨ā§āĻ āĻĨā§āĻā§ āĻā§āĻ¯āĻžāĻ°āĻŋāĻ¯āĻŧā§āĻ¨ā§āĻ āĻāĻžāĻāĻĒā§āĻ° āĻĒā§āĻ°āĻ¤āĻŋāĻ°ā§āĻĒāĨ¤ Any āĻāĻžāĻāĻĒ āĻāĻāĻāĻŋ āĻ āĻ¯ā§āĻā§āĻ¤āĻŋāĻ Uno āĻāĻžāĻāĻĒ āĻ§āĻžāĻ°āĻŖ āĻāĻ°ā§ āĻāĻŦāĻ āĻ¸āĻžāĻ§āĻžāĻ°āĻŖ Uno āĻāĻ¨ā§āĻāĻžāĻ°āĻĢā§āĻ¸ā§ āĻŦā§āĻ¯āĻŦāĻšā§āĻ¤ āĻšāĻ¯āĻŧāĨ¤
oUnoValue = CreateUnoValue( "[]byte", MyBasicValue ) ' to get a byte sequence.
If CreateUnoValue cannot be converted to the specified Uno type, and error occurs. For the conversion, the TypeConverter service is used.
This function is intended for use in situations where the default Basic to Uno type converting mechanism is insufficient. This can happen when you try to access generic Any based interfaces, such as XPropertySet::setPropertyValue( Name, Value ) or X???Container::insertBy???( ???, Value ), from LibreOffice Basic. The Basic runtime does not recognize these types as they are only defined in the corresponding service.
In this type of situation, LibreOffice Basic chooses the best matching type for the Basic type that you want to convert. However, if the wrong type is selected, an error occurs. You use the CreateUnoValue() function to create a value for the unknown Uno type.
You can also use this function to pass non-Any values, but this is not recommend. If Basic already knows the target type, using the CreateUnoValue() function will only lead to additional converting operations that slow down the Basic execution.