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!