diff options
Diffstat (limited to 'wizards/com/sun/star/wizards/common/ConfigSet.py')
-rw-r--r-- | wizards/com/sun/star/wizards/common/ConfigSet.py | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/wizards/com/sun/star/wizards/common/ConfigSet.py b/wizards/com/sun/star/wizards/common/ConfigSet.py index 7851fea45556..26b051adf2ef 100644 --- a/wizards/com/sun/star/wizards/common/ConfigSet.py +++ b/wizards/com/sun/star/wizards/common/ConfigSet.py @@ -70,6 +70,7 @@ class ConfigSet(ConfigNode): for i in names: try: child = type(self.childClass)() + child.root = self.root child.readConfiguration( configurationView.getByName(i), param) self.add(i, child) @@ -118,27 +119,13 @@ class ConfigSet(ConfigNode): i += 1 return parent - def getKey(self, object): - i = self.childrenMap.entrySet().iterator() - while i.hasNext(): - me = i.next() - if me.getValue() == object: - return me.getKey() + def getKey(self, _object): + for k,v in self.childrenMap.items(): + if v == _object: + return k return None - def getKey(self, i): - c = 0 - while i > -1: - if getElementAt(c) != None: - i -= 1 - - c += 1 - if c == 0: - return None - else: - return getKey(getElementAt(c - 1)) - def getElementAt(self, i): return self.childrenList[i] @@ -148,9 +135,6 @@ class ConfigSet(ConfigNode): def getSize(self): return len(self.childrenList) - def keys(self): - return self.childrenMap.keySet() - def getIndexOf(self, item): return self.childrenList.index(item) |