CreateUnoValue Function

āĻāĻ•āϟāĻŋ āĻŦāĻ¸ā§āϤ⧁ āĻĒā§āϰāĻĻāĻžāύ āĻ•āϰ⧇ āϝāĻž Uno āϟāĻžāχāĻĒ āĻĒāĻĻā§āϧāϤāĻŋāϤ⧇ āωāĻ˛ā§āϞ⧇āĻ–āĻŋāϤ āϏāĻ āĻŋāĻ•āĻ­āĻžāĻŦ⧇ āϟāĻžāχāĻĒāĻ•ā§ƒāϤ āĻŽāĻžāύ⧇āϰ āϏ⧁āĻ¸ā§āĻĒāĻˇā§āϟ āĻŦā§āϝāĻžāĻ–ā§āϝāĻž āĻĒā§āϰāĻĻāĻžāύ āĻ•āϰ⧇āĨ¤

Uno āϤ⧇ āĻĒāĻžāϏ āĻ•āϰāĻžāϰ āϏāĻŽā§Ÿ āĻŦāĻ¸ā§āϤ⧁āϟāĻŋ āĻ¸ā§āĻŦāϝāĻŧāĻ‚āĻ•ā§āϰāĻŋāϝāĻŧāĻ­āĻžāĻŦ⧇ āϏāĻ‚āĻļā§āϞāĻŋāĻˇā§āϟ āϟāĻžāχāĻĒ⧇āϰ Any āϟāĻžāχāĻĒ⧇ āϰ⧂āĻĒāĻžāĻ¨ā§āϤāϰāĻŋāϤ āĻšāĻŦ⧇āĨ¤ āϟāĻžāχāĻĒāϟāĻŋ āĻ…āĻŦāĻļā§āϝāχ āĻāϰ āϏāĻŽā§āĻĒā§‚āĻ°ā§āĻŖ āϝ⧋āĻ—ā§āϝāϤāĻž āϏāĻŽā§āĻĒāĻ¨ā§āύ Uno āϟāĻžāχāĻĒ āύāĻžāĻŽā§‡ āωāĻ˛ā§āϞ⧇āĻ– āĻ•āϰāϤ⧇ āĻšāĻŦ⧇āĨ¤

āύ⧋āϟ āφāχāĻ•āύ

LibreOffice API āĻĒā§āϰāĻžāϝāĻŧāχ Any āϟāĻžāχāĻĒ āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻ•āϰ⧇ āĻĨāĻžāϕ⧇āĨ¤ āĻāχāϟāĻŋ āĻ…āĻ¨ā§āϝ āĻāύāĻ­āĻžā§ŸāϰāύāĻŽā§‡āĻ¨ā§āϟ āĻĨ⧇āϕ⧇ āĻ­ā§āϝāĻžāϰāĻŋāϝāĻŧ⧇āĻ¨ā§āϟ āϟāĻžāχāĻĒ⧇āϰ āĻĒā§āϰāϤāĻŋāϰ⧂āĻĒāĨ¤ Any āϟāĻžāχāĻĒ āĻāĻ•āϟāĻŋ āĻ…āϝ⧋āĻ•ā§āϤāĻŋāĻ• Uno āϟāĻžāχāĻĒ āϧāĻžāϰāĻŖ āĻ•āϰ⧇ āĻāĻŦāĻ‚ āϏāĻžāϧāĻžāϰāĻŖ Uno āχāĻ¨ā§āϟāĻžāϰāĻĢ⧇āϏ⧇ āĻŦā§āϝāĻŦāĻšā§ƒāϤ āĻšāϝāĻŧāĨ¤


Syntax:

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.

Please support us!