summaryrefslogtreecommitdiff
path: root/configmgr/source
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-07-27 11:40:32 +0000
committerArmin Le Grand <alg@apache.org>2013-07-27 11:40:32 +0000
commit8a6f84ce896f41a7a1f97b06d1e053c51cbba95e (patch)
tree0865afbfa9eb147e0a5be9759f932954cfb59e32 /configmgr/source
parent59ee09f905e86724a2ba5cdccab9210d16686820 (diff)
resync to trunk (close to AOO400)
Diffstat (limited to 'configmgr/source')
-rw-r--r--configmgr/source/components.cxx16
-rw-r--r--configmgr/source/partial.cxx12
-rw-r--r--configmgr/source/partial.hxx8
3 files changed, 13 insertions, 23 deletions
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 0cacc9759e13..af9b846916de 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -515,18 +515,6 @@ Components::Components(
expand(
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("$OOO_BASE_DIR/share/registry"))));
- parseXcsXcuLayer(
- 4,
- expand(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "$BRAND_BASE_DIR/share/registry"))));
- parseModuleLayer(
- 6,
- expand(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "$BRAND_BASE_DIR/share/registry/modules"))));
parseXcsXcuIniLayer(
7,
expand(
@@ -829,7 +817,7 @@ rtl::OUString Components::getModificationFileUrl() const {
return expand(
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
- "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("bootstrap")
+ "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("bootstrap")
":UserInstallation}/user/registrymodifications.xcu")));
}
@@ -850,7 +838,7 @@ void Components::parseModificationLayer() {
expand(
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
- "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("bootstrap")
+ "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("bootstrap")
":UserInstallation}/user/registry/data"))),
false);
}
diff --git a/configmgr/source/partial.cxx b/configmgr/source/partial.cxx
index d60fb74a249d..722603ff5380 100644
--- a/configmgr/source/partial.cxx
+++ b/configmgr/source/partial.cxx
@@ -98,7 +98,7 @@ Partial::Partial(
rtl::OUString seg;
bool end = parseSegment(*i, &n, &seg);
if (end) {
- p->children[seg] = Node();
+ p->children[seg].clear();
break;
}
Node::Children::iterator j(p->children.find(seg));
@@ -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 );
}
}
diff --git a/configmgr/source/partial.hxx b/configmgr/source/partial.hxx
index 56788c850774..6cdb5178ac7a 100644
--- a/configmgr/source/partial.hxx
+++ b/configmgr/source/partial.hxx
@@ -26,14 +26,13 @@
#include "sal/config.h"
-#include <map>
+#include <boost/unordered_map.hpp> // using the boost container because it explicitly allows recursive types
#include <set>
#include "boost/noncopyable.hpp"
#include "path.hxx"
-
-namespace rtl { class OUString; }
+#include "rtl/ustring.hxx"
namespace configmgr {
@@ -51,9 +50,10 @@ public:
private:
struct Node {
- typedef std::map< rtl::OUString, Node > Children;
+ typedef boost::unordered_map< rtl::OUString, Node > Children;
Node(): startInclude(false) {}
+ void clear() { startInclude=false; children.clear(); }
Children children;
bool startInclude;