summaryrefslogtreecommitdiff
path: root/pyuno/source/module/uno.py
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-03-22 09:52:57 +0000
committerOliver Bolte <obo@openoffice.org>2006-03-22 09:52:57 +0000
commitf6e480a312ed0e70b590b660e9091a1ae315bc78 (patch)
tree56fece351cba2ff774910e975d24b16fd3b7a353 /pyuno/source/module/uno.py
parentf352083d2ae3fc7b11595a6dd289699fd4851110 (diff)
INTEGRATION: CWS pyunofixes2 (1.5.40); FILE MERGED
2006/01/07 21:36:28 jbu 1.5.40.2: RESYNC: (1.5-1.6); FILE MERGED 2006/01/07 20:13:41 jbu 1.5.40.1: #i57379# added pyuno current context support
Diffstat (limited to 'pyuno/source/module/uno.py')
-rw-r--r--pyuno/source/module/uno.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/pyuno/source/module/uno.py b/pyuno/source/module/uno.py
index 52239aed7809..9f3c221a141e 100644
--- a/pyuno/source/module/uno.py
+++ b/pyuno/source/module/uno.py
@@ -4,9 +4,9 @@
#
# $RCSfile: uno.py,v $
#
-# $Revision: 1.6 $
+# $Revision: 1.7 $
#
-# last change: $Author: rt $ $Date: 2005-09-08 16:54:32 $
+# last change: $Author: obo $ $Date: 2006-03-22 10:52:57 $
#
# The Contents of this file are made available subject to
# the terms of GNU Lesser General Public License Version 2.1.
@@ -96,6 +96,23 @@ def fileUrlToSystemPath( url ):
def absolutize( path, relativeUrl ):
"returns an absolute file url from the given urls"
return pyuno.absolutize( path, relativeUrl )
+
+def getCurrentContext():
+ """Returns the currently valid current context.
+ see http://udk.openoffice.org/common/man/concept/uno_contexts.html#current_context
+ for an explanation on the current context concept
+ """
+ return pyuno.getCurrentContext()
+
+def setCurrentContext( newContext ):
+ """Sets newContext as new uno current context. The newContext must
+ implement the XCurrentContext interface. The implemenation should
+ handle the desired properties and delegate unknown properties to the
+ old context. Ensure to reset the old one when you leave your stack ...
+ see http://udk.openoffice.org/common/man/concept/uno_contexts.html#current_context
+ """
+ return pyuno.setCurrentContext( newContext )
+
class Enum:
"Represents a UNO idl enum, use an instance of this class to explicitly pass a boolean to UNO"