summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-04-12 15:12:26 +0200
committersb <sb@openoffice.org>2010-04-12 15:12:26 +0200
commit3e41502e56c37991dd6e645fd1ff8fb7a325ff1b (patch)
tree38034584540cd5ae4af1fecbce05534973f33d61
parent80b713c17fb6cb487ef0d632ac1e008e2ee458e3 (diff)
sb122: #i110083# improve xcsparser.cxx merge function
-rw-r--r--configmgr/source/xcsparser.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx
index 12e64ebbe171..8bda874cc5b3 100644
--- a/configmgr/source/xcsparser.cxx
+++ b/configmgr/source/xcsparser.cxx
@@ -78,19 +78,19 @@ void merge(
case Node::KIND_LOCALIZED_VALUE:
break; //TODO: merge certain parts?
case Node::KIND_GROUP:
- if (dynamic_cast< GroupNode * >(original.get())->isExtensible()) {
- for (NodeMap::iterator i2(update->getMembers().begin());
- i2 != update->getMembers().end(); ++i2)
- {
- NodeMap::iterator i1(
- original->getMembers().find(i2->first));
- if (i1 == original->getMembers().end()) {
- if (i2->second->kind() == Node::KIND_PROPERTY) {
- original->getMembers().insert(*i2);
- }
- } else if (i2->second->kind() == i1->second->kind()) {
- merge(i1->second, i2->second);
+ for (NodeMap::iterator i2(update->getMembers().begin());
+ i2 != update->getMembers().end(); ++i2)
+ {
+ NodeMap::iterator i1(original->getMembers().find(i2->first));
+ if (i1 == original->getMembers().end()) {
+ if (i2->second->kind() == Node::KIND_PROPERTY &&
+ dynamic_cast< GroupNode * >(
+ original.get())->isExtensible())
+ {
+ original->getMembers().insert(*i2);
}
+ } else if (i2->second->kind() == i1->second->kind()) {
+ merge(i1->second, i2->second);
}
}
break;