From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- .../source/text/sbasic/shared/03132300.xhp | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 helpcontent2/source/text/sbasic/shared/03132300.xhp (limited to 'helpcontent2/source/text/sbasic/shared/03132300.xhp') diff --git a/helpcontent2/source/text/sbasic/shared/03132300.xhp b/helpcontent2/source/text/sbasic/shared/03132300.xhp new file mode 100644 index 000000000..0a490c7a3 --- /dev/null +++ b/helpcontent2/source/text/sbasic/shared/03132300.xhp @@ -0,0 +1,47 @@ + + + + + + + +CreateUnoValue Function +/text/sbasic/shared/03132300.xhp + + +Sun Microsystems, Inc. + + + +
+CreateUnoValue function + +CreateUnoValue Function +Returns an object that represents a strictly typed value referring to the Uno type system. +
+This object is automatically converted to an Any of the corresponding type when passed to Uno. The type must be specified by its fully qualified Uno type name. +The $[officename] 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. + +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 com.sun.star.script.Converter 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 $[officename] Basic. The Basic runtime does not recognize these types as they are only defined in the corresponding service. +In this type of situation, $[officename] 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. + +
-- cgit v1.2.3