CreateUnoValue Function

བྱ་ཡུལ་ཞིག་ལ་ཕྱིར་ལོག་ བྱ་ཡུལ་འདིས་ Uno རིགས་ཀྱི་མ་ལག་དང་འབྲེལ་བའི་ཞིབ་རྩིས་རིགས་ཀྱི་ཐང་མཚོན་

ལས་ཡུལ་འདི་ཉིད་ Uno ལ་བརྒྱུད་གཏོང་བྱེད་པའི་སྐབས་རང་འགུལ་གྱིས་ལྟོས་ཟླའི་ Any རིགས་ཚབ་བརྗེ་བསྒྱུར་བྱེད་ རིགས་འདི་ནི་ངེས་པར་དུ་ཁྱོན་ཡོངས་ཚད་བཀག་གི་ Uno རིགས་ཀྱི་མིང་ནས་གཏན་འཁེལ་དགོས།

ཟུར་མཆན་རིས་རྟགས་

LibreOffice API ཡིས་རྟག་ཏུ་ Any རིགས་སྤྱོད་ཀྱི་ཡོད་ དེ་དང་ཁོར་ཡུག་གཞན་ཁྲོད་ཀྱི་ Variant རིགས་ཕན་ཚུན་ལྟོས་ཟླར་གྱུར་ 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!