diff options
author | David Tardon <dtardon@redhat.com> | 2011-12-16 06:44:18 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-12-22 15:18:35 +0100 |
commit | 8ab2c40f2000a7d8a8f5f230698f19babde8e523 (patch) | |
tree | ad557444343773233931a0281573e91fbd909724 /wizards | |
parent | e095be2fd4a54d7cd876a6d2f86363a99ddb5ed8 (diff) |
fix syntactic error
Signed-off-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/common/PropertySetHelper.py | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.py b/wizards/com/sun/star/wizards/common/PropertySetHelper.py index fbb31d8f4ec8..8ce949ec344d 100644 --- a/wizards/com/sun/star/wizards/common/PropertySetHelper.py +++ b/wizards/com/sun/star/wizards/common/PropertySetHelper.py @@ -4,16 +4,8 @@ class PropertySetHelper(object): @classmethod def __init__(self, _aObj): - if not _aObj: - return - self.m_xPropertySet = _aObj - - def getHashMap(self): - if self.m_aHashMap == None: - self.m_aHashMap = HashMap < String, Object >.Object() - - return self.m_aHashMap + self.m_aHashMap = {} ''' set a property, don't throw any exceptions, @@ -55,7 +47,7 @@ class PropertySetHelper(object): DebugHelper.exception(e) else: - getHashMap().put(_sName, _aValue) + self.m_aHashMap[_sName] = _aValue ''' get a property and convert it to a int value @@ -128,9 +120,11 @@ class PropertySetHelper(object): except com.sun.star.lang.WrappedTargetException, e: DebugHelper.writeInfo(e.getMessage()) + # TODO: I wonder why the same thing is not done in the rest of the + # getPropertyValueAs* functions... if aObject == None: - if getHashMap().containsKey(_sName): - aObject = getHashMap().get(_sName) + if _sName in self.m_aHashMap: + aObject = self.m_aHashMap[_sName] if aObject != None: try: |