diff options
author | sb <sb@openoffice.org> | 2011-01-10 13:49:30 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2011-01-10 13:49:30 +0100 |
commit | 64dcaa7199870f0c03403df10a5ae9d028b9c7b6 (patch) | |
tree | f154574dd5308b79a25475e2b05aa1e7ffdde3f7 /configmgr | |
parent | a433665d4c116961eb29ecfc243cd400746b293f (diff) |
sb139: #i77102# forget about configmgr user-layer removals that no longer remove anything
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/xcuparser.cxx | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx index 1a9575bb6726..dc5d08cb4e08 100644 --- a/configmgr/source/xcuparser.cxx +++ b/configmgr/source/xcuparser.cxx @@ -1099,17 +1099,25 @@ void XcuParser::handleSetNode(xmlreader::XmlReader & reader, SetNode * set) { } break; case OPERATION_REMOVE: - // Ignore removal of unknown members, members finalized in a lower - // layer, and members made mandatory in this or a lower layer: - if (i != set->getMembers().end() && !state_.top().locked && - finalizedLayer >= valueParser_.getLayer() && - mandatoryLayer > valueParser_.getLayer()) { - set->getMembers().erase(i); + // Ignore removal of unknown members, members finalized in a lower + // layer, and members made mandatory in this or a lower layer; + // forget about user-layer removals that no longer remove anything + // (so that paired additions/removals in the user layer do not grow + // registrymodifications.xcu unbounded): + bool known = i != set->getMembers().end(); + if (known && !state_.top().locked && + finalizedLayer >= valueParser_.getLayer() && + mandatoryLayer > valueParser_.getLayer()) + { + set->getMembers().erase(i); + } + state_.push(State(true)); + if (known) { + recordModification(false); + } + break; } - state_.push(State(true)); - recordModification(false); - break; } } |