diff options
author | Oliver Bolte <obo@openoffice.org> | 2006-03-22 09:52:57 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2006-03-22 09:52:57 +0000 |
commit | e08fd5fcafcc2bd45626644f101538daaedaf150 (patch) | |
tree | ddd875bb4d2c0ec52c4b40ccde3cbe9295d46aba /pyuno | |
parent | 53f491565b0118658cdc1e441aaab693c0cf678a (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')
-rw-r--r-- | pyuno/source/module/uno.py | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/pyuno/source/module/uno.py b/pyuno/source/module/uno.py index 52239aed7..9f3c221a1 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" |