summaryrefslogtreecommitdiff
path: root/configmgr/source
diff options
context:
space:
mode:
authorOliver-Rainer Wittmann <orw@apache.org>2013-06-24 11:08:34 +0000
committerOliver-Rainer Wittmann <orw@apache.org>2013-06-24 11:08:34 +0000
commitaf7166782e8c7ecd0b44aa184d7228a405c1ff46 (patch)
treeb0e0e53cf6c04ad0f6bef8e1c5e2f8b92a174b15 /configmgr/source
parente58fe7afee5163833479b76a474416a77d95f075 (diff)
122397: - XCU file parsing: correct node containment check in case the node is not contained in root
- simplify AOO 3.4.x/OOo 3.x migration configuration
Notes
Notes: ignore: aoo
Diffstat (limited to 'configmgr/source')
-rw-r--r--configmgr/source/partial.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/configmgr/source/partial.cxx b/configmgr/source/partial.cxx
index c43690299ca9..722603ff5380 100644
--- a/configmgr/source/partial.cxx
+++ b/configmgr/source/partial.cxx
@@ -119,15 +119,17 @@ Partial::Containment Partial::contains(Path const & path) const {
bool includes = false;
for (Path::const_iterator i(path.begin()); i != path.end(); ++i) {
Node::Children::const_iterator j(p->children.find(*i));
- if (j == p->children.end()) {
+ if ( j == p->children.end() )
+ {
break;
}
p = &j->second;
includes |= p->startInclude;
}
- return p->children.empty() && !p->startInclude
- ? CONTAINS_NOT
- : includes ? CONTAINS_NODE : CONTAINS_SUBNODES;
+ return ( ( p->children.empty() || p == &root_ )
+ && !p->startInclude )
+ ? CONTAINS_NOT
+ : ( includes ? CONTAINS_NODE : CONTAINS_SUBNODES );
}
}