40bc174
From c57fcf8d8873638b8ea9eb33c527e03939aaf80a Mon Sep 17 00:00:00 2001
40bc174
From: David Tardon <dtardon@redhat.com>
40bc174
Date: Fri, 16 Dec 2011 06:44:18 +0100
40bc174
Subject: [PATCH 1/2] fix syntactic error
40bc174
40bc174
---
40bc174
 .../sun/star/wizards/common/PropertySetHelper.py   |   18 ++++++------------
40bc174
 1 files changed, 6 insertions(+), 12 deletions(-)
40bc174
40bc174
diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.py b/wizards/com/sun/star/wizards/common/PropertySetHelper.py
40bc174
index fbb31d8..8ce949e 100644
40bc174
--- a/wizards/com/sun/star/wizards/common/PropertySetHelper.py
40bc174
+++ b/wizards/com/sun/star/wizards/common/PropertySetHelper.py
40bc174
@@ -4,16 +4,8 @@ class PropertySetHelper(object):
40bc174
 
40bc174
     @classmethod
40bc174
     def __init__(self, _aObj):
40bc174
-        if not _aObj:
40bc174
-           return
40bc174
-
40bc174
         self.m_xPropertySet = _aObj
40bc174
-
40bc174
-    def getHashMap(self):
40bc174
-        if self.m_aHashMap == None:
40bc174
-            self.m_aHashMap = HashMap < String, Object >.Object()
40bc174
-
40bc174
-        return self.m_aHashMap
40bc174
+        self.m_aHashMap = {}
40bc174
 
40bc174
     '''
40bc174
     set a property, don't throw any exceptions,
40bc174
@@ -55,7 +47,7 @@ class PropertySetHelper(object):
40bc174
                 DebugHelper.exception(e)
40bc174
 
40bc174
         else:
40bc174
-            getHashMap().put(_sName, _aValue)
40bc174
+            self.m_aHashMap[_sName] = _aValue
40bc174
 
40bc174
     '''
40bc174
     get a property and convert it to a int value
40bc174
@@ -128,9 +120,11 @@ class PropertySetHelper(object):
40bc174
             except com.sun.star.lang.WrappedTargetException, e:
40bc174
                 DebugHelper.writeInfo(e.getMessage())
40bc174
 
40bc174
+        # TODO: I wonder why the same thing is not done in the rest of the
40bc174
+        # getPropertyValueAs* functions...
40bc174
         if aObject == None:
40bc174
-            if getHashMap().containsKey(_sName):
40bc174
-                aObject = getHashMap().get(_sName)
40bc174
+            if _sName in self.m_aHashMap:
40bc174
+                aObject = self.m_aHashMap[_sName]
40bc174
 
40bc174
         if aObject != None:
40bc174
             try:
40bc174
-- 
40bc174
1.7.7.3
40bc174
40bc174
From 0e7ac37f00ded5db953aed60ec67fafcfe28f21c Mon Sep 17 00:00:00 2001
40bc174
From: David Tardon <dtardon@redhat.com>
40bc174
Date: Fri, 16 Dec 2011 06:53:23 +0100
40bc174
Subject: [PATCH 2/2] fix syntactic error
40bc174
40bc174
---
40bc174
 .../sun/star/wizards/common/PropertySetHelper.py   |    5 +----
40bc174
 1 files changed, 1 insertions(+), 4 deletions(-)
40bc174
40bc174
diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.py b/wizards/com/sun/star/wizards/common/PropertySetHelper.py
40bc174
index 8ce949e..970e453 100644
40bc174
--- a/wizards/com/sun/star/wizards/common/PropertySetHelper.py
40bc174
+++ b/wizards/com/sun/star/wizards/common/PropertySetHelper.py
40bc174
@@ -225,10 +225,7 @@ class PropertySetHelper(object):
40bc174
     def showProperties(self):
40bc174
         sName = ""
40bc174
         if self.m_xPropertySet != None:
40bc174
-            XServiceInfo xServiceInfo = (XServiceInfo)
40bc174
-            UnoRuntime.queryInterface(XServiceInfo.class, self.m_xPropertySet)
40bc174
-            if xServiceInfo != None:
40bc174
-                sName = xServiceInfo.getImplementationName()
40bc174
+            sName = self.m_xPropertySet.getImplementationName()
40bc174
 
40bc174
             xInfo = self.m_xPropertySet.getPropertySetInfo()
40bc174
             aAllProperties = xInfo.getProperties()
40bc174
-- 
40bc174
1.7.7.3
40bc174