summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorJörg Budischewski <jbu@openoffice.org>2003-05-24 22:24:27 +0000
committerJörg Budischewski <jbu@openoffice.org>2003-05-24 22:24:27 +0000
commitb7c79567c0e279f295faa3e05e6c34e21328c30b (patch)
tree52e2e72b310b78d6bc292a4d7c0107bfcd82d8ad /pyuno
parentbbdf01a49211ab2a0b6071cf17b7683a705c1d53 (diff)
#i12504# added uno.Any and uno.invoke
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/module/uno.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/pyuno/source/module/uno.py b/pyuno/source/module/uno.py
index bef6c8d61b40..220dfbc11c91 100644
--- a/pyuno/source/module/uno.py
+++ b/pyuno/source/module/uno.py
@@ -2,9 +2,9 @@
#
# $RCSfile: uno.py,v $
#
-# $Revision: 1.3 $
+# $Revision: 1.4 $
#
-# last change: $Author: jbu $ $Date: 2003-04-06 17:13:09 $
+# last change: $Author: jbu $ $Date: 2003-05-24 23:24:27 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -206,8 +206,6 @@ class Char:
#
# value = property(_get_value)
-
-
class ByteSequence:
def __init__(self, value):
if isinstance(value, str):
@@ -245,6 +243,20 @@ class ByteSequence:
def __hash__( self ):
return self.value.hash()
+
+
+class Any:
+ "use only in connection with uno.invoke() to pass an explicit typed any"
+ def __init__(self, type, value ):
+ if isinstance( type, Type ):
+ self.type = type
+ else:
+ self.type = getTypeByName( type )
+ self.value = value
+
+def invoke( object, methodname, argTuple ):
+ "use this function to pass exactly typed anys to the callee (using uno.Any)"
+ return pyuno.invoke( object, methodname, argTuple )
#---------------------------------------------------------------------------------------
# don't use any functions beyond this point, private section, likely to change