CreateUnoValue Function

αžαŸ’αžšαž‘αž”αŸ‹β€‹αžœαžαŸ’αžαž»β€‹αž˜αž½αž™β€‹αžŠαŸ‚αž›β€‹αžαŸ†αžŽαžΆαž„β€‹αž²αŸ’αž™β€‹αžαž˜αŸ’αž›αŸƒβ€‹αžŠαŸ‚αž›β€‹αž”αžΆαž“β€‹αžœαžΆαž™β€‹αž™αŸ‰αžΆαž„β€‹αžαžΉαž„αžšαŸ‰αžΉαž„ αžŠαŸ‚αž›β€‹αž™αŸ„αž„β€‹αž‘αŸ…β€‹αž”αŸ’αžšαž–αŸαž“αŸ’αž’β€‹αž”αŸ’αžšαž—αŸαž‘ UnoΒ αŸ”

αžœαžαŸ’αžαž»β€‹αž“αŸαŸ‡β€‹αžαŸ’αžšαžΌαžœβ€‹αž”αžΆαž“β€‹αž”αž˜αŸ’αž›αŸ‚αž„β€‹αžŠαŸ„αž™β€‹αžŸαŸ’αžœαŸαž™β€‹αž”αŸ’αžšαžœαžαŸ’αžαž· αž‡αžΆβ€‹αž”αŸ’αžšαž—αŸαž‘β€‹αžŠαŸ‚αž›β€‹αžαŸ’αžšαžΌαžœβ€‹αž‚αŸ’αž“αžΆβ€‹αžŽαžΆβ€‹αž˜αž½αž™ αž“αŸ…β€‹αž–αŸαž›β€‹αžαŸ’αžšαžΌαžœβ€‹αž”αžΆαž“β€‹αž αž»αž…β€‹αž‘αŸ… UnoΒ αŸ” αž”αŸ’αžšαž—αŸαž‘β€‹αžαŸ’αžšαžΌαžœβ€‹αžαŸ‚β€‹αž”αž‰αŸ’αž‡αžΆαž€αŸ‹β€‹αžŠαŸ„αž™β€‹αžˆαŸ’αž˜αŸ„αŸ‡β€‹αž”αŸ’αžšαž—αŸαž‘ 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!