CreateUnoValue Function

แƒแƒ‘แƒ แƒฃแƒœแƒ”แƒ‘แƒก แƒแƒ‘แƒ˜แƒ”แƒฅแƒขแƒก, แƒ แƒแƒ›แƒ”แƒšแƒ˜แƒช แƒฌแƒแƒ แƒ›แƒแƒแƒ“แƒ’แƒ”แƒœแƒก แƒžแƒ˜แƒ แƒ“แƒแƒžแƒ˜แƒ  แƒฉแƒแƒฌแƒ”แƒ แƒ˜แƒš แƒ›แƒœแƒ˜แƒจแƒ•แƒœแƒ”แƒšแƒแƒ‘แƒแƒก, แƒ แƒแƒ›แƒ”แƒšแƒ˜แƒช แƒ›แƒ˜แƒฃแƒ—แƒ˜แƒ—แƒ”แƒ‘แƒก Uno แƒขแƒ˜แƒžแƒ˜แƒก แƒกแƒ˜แƒกแƒขแƒ”แƒ›แƒแƒก.

แƒแƒ‘แƒ˜แƒ”แƒฅแƒขแƒ˜ แƒแƒ•แƒขแƒแƒ›แƒแƒขแƒฃแƒ แƒแƒ“ แƒ’แƒแƒ“แƒแƒ“แƒ˜แƒก แƒœแƒ”แƒ‘แƒ˜แƒกแƒ›แƒ˜แƒ”แƒ  แƒจแƒ”แƒกแƒแƒ‘แƒแƒ›แƒ˜แƒก แƒขแƒ˜แƒžแƒจแƒ˜, แƒ แƒแƒ“แƒ”แƒกแƒแƒช แƒ’แƒแƒ“แƒแƒ”แƒชแƒ”แƒ›แƒ Uno-แƒก. แƒขแƒ˜แƒžแƒ˜ แƒฃแƒœแƒ“แƒ แƒ›แƒ˜แƒ”แƒ—แƒ˜แƒ—แƒแƒก Uno-แƒ˜แƒก แƒกแƒ แƒฃแƒšแƒ˜ แƒขแƒ˜แƒžแƒ˜แƒ—.

แƒจแƒ”แƒœแƒ˜แƒจแƒ•แƒœแƒ˜แƒก แƒฎแƒแƒขแƒฃแƒšแƒ

The LibreOffice API frequently uses the Any type. It is the counterpart of the Variant type known from other environments. The Any type holds one arbitrary Uno type and is used in generic Uno interfaces.


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!