summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-07-29 11:34:59 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-07-29 11:35:18 +0200
commitd6c63c9a84d989bdb8671c4f42be9acbf37d0309 (patch)
tree8d7723fd3864480bebdd99d3b84ca48ea2438d6c /pyuno
parent948b6ea02ea9de7fb4e1e2baf95ecae3ba1cd54e (diff)
Remove whitespace from line ends
Change-Id: Ie894879eaebda32bc4f99e7ad7f810c569e86a7a
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/module/uno.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/pyuno/source/module/uno.py b/pyuno/source/module/uno.py
index 1b2581644c61..2396641e865c 100644
--- a/pyuno/source/module/uno.py
+++ b/pyuno/source/module/uno.py
@@ -40,8 +40,8 @@ _g_delegatee = __builtin__.__dict__["__import__"]
def getComponentContext():
""" returns the UNO component context, that was used to initialize the python runtime.
- """
- return _g_ctx
+ """
+ return _g_ctx
def getConstantByName( constant ):
"Looks up the value of a idl constant by giving its explicit name"
@@ -50,7 +50,7 @@ def getConstantByName( constant ):
def getTypeByName( typeName):
""" returns a uno.Type instance of the type given by typeName. In case the
type does not exist, a com.sun.star.uno.RuntimeException is raised.
- """
+ """
return pyuno.getTypeByName( typeName )
def createUnoStruct( typeName, *args, **kwargs ):
@@ -82,7 +82,7 @@ def isInterface( obj ):
def generateUuid():
"returns a 16 byte sequence containing a newly generated uuid or guid, see rtl/uuid.h "
- return pyuno.generateUuid()
+ return pyuno.generateUuid()
def systemPathToFileUrl( systemPath ):
"returns a file-url for the given system path"
@@ -112,9 +112,9 @@ def setCurrentContext( newContext ):
"""
return pyuno.setCurrentContext( newContext )
-
+
class Enum:
- "Represents a UNO idl enum, use an instance of this class to explicitly pass a boolean to UNO"
+ "Represents a UNO idl enum, use an instance of this class to explicitly pass a boolean to UNO"
#typeName the name of the enum as a string
#value the actual value of this enum as a string
def __init__(self,typeName, value):
@@ -150,7 +150,7 @@ class Type:
return self.typeName.__hash__()
class Bool(object):
- """Represents a UNO boolean, use an instance of this class to explicitly
+ """Represents a UNO boolean, use an instance of this class to explicitly
pass a boolean to UNO.
Note: This class is deprecated. Use python's True and False directly instead
"""
@@ -173,13 +173,13 @@ class Char:
def __repr__(self):
return "<Char instance %s>" % (self.value, )
-
+
def __eq__(self, that):
if isinstance(that, (str, unicode)):
if len(that) > 1:
return False
return self.value == that[0]
- if isinstance(that, Char):
+ if isinstance(that, Char):
return self.value == that.value
return False
@@ -190,12 +190,12 @@ class Char:
# def __repr__(self):
# return "<ByteSequence instance %s>" % str.__repr__(self)
- # for a little bit compatitbility; setting value is not possible as
+ # for a little bit compatitbility; setting value is not possible as
# strings are immutable
# def _get_value(self):
# return self
#
-# value = property(_get_value)
+# value = property(_get_value)
class ByteSequence:
def __init__(self, value):
@@ -254,7 +254,7 @@ class Any:
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
#---------------------------------------------------------------------------------------
@@ -286,7 +286,7 @@ def _uno_import( name, *optargs, **kwargs ):
if x not in d:
failed = False
if x.startswith( "typeOf" ):
- try:
+ try:
d[x] = pyuno.getTypeByName( name + "." + x[6:len(x)] )
except RuntimeException:
failed = True
@@ -295,7 +295,7 @@ def _uno_import( name, *optargs, **kwargs ):
# check for structs, exceptions or interfaces
d[x] = pyuno.getClass( name + "." + x )
except RuntimeException:
- # check for enums
+ # check for enums
try:
d[x] = Enum( name , x )
except RuntimeException:
@@ -309,7 +309,7 @@ def _uno_import( name, *optargs, **kwargs ):
# We have an import failure, but cannot distinguish between
# uno and non-uno errors as uno lookups are attempted for all
# "from xxx import yyy" imports following a python failure.
- #
+ #
# The traceback from the original python exception is kept to
# pinpoint the actual failing location, but in Python 3 the
# original message is most likely unhelpful for uno failures,
@@ -321,7 +321,7 @@ def _uno_import( name, *optargs, **kwargs ):
# Our exception is raised outside of the nested exception
# handlers above, to avoid Python 3 nested exception
# information for the RuntimeExceptions during lookups.
- #
+ #
# Finally, a private attribute is used to prevent further
# processing if this failure was in a nested import. That
# keeps the exception relevant to the primary failure point,
@@ -342,7 +342,7 @@ def _impl_extractName(name):
if name[i] == ".":
name = name[i+1:len(name)]
break
- return name
+ return name
# private, referenced from the pyuno shared library
def _uno_struct__init__(self,*args, **kwargs):
@@ -355,7 +355,7 @@ def _uno_struct__init__(self,*args, **kwargs):
RuntimeException = pyuno.getClass( "com.sun.star.uno.RuntimeException" )
raise RuntimeException("_uno_struct__init__: unused keyword argument '" + kw + "'", None)
self.__dict__["value"] = struct
-
+
# private, referenced from the pyuno shared library
def _uno_struct__getattr__(self,name):
return __builtin__.getattr(self.__dict__["value"],name)