summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-05-22 11:34:15 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-05-22 11:35:36 +0100
commitb162aec6254ab535cc5eb990b249f46aa8e79153 (patch)
treecc887f5138aa8bfb729fe2ee23922a452f9c388b /cppuhelper
parent8ebd23b2518cf22c3405f45464cbfad980726b30 (diff)
bootstrapping should elide duplicate .rdb paths in the configuration
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/defaultbootstrap.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx
index b211d190d2de..c903c2bae08c 100644
--- a/cppuhelper/source/defaultbootstrap.cxx
+++ b/cppuhelper/source/defaultbootstrap.cxx
@@ -1961,6 +1961,7 @@ css::uno::Reference< css::registry::XSimpleRegistry > createTypeRegistry(
css::uno::Reference< css::registry::XRegistryKey >()),
css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::registry::XSimpleRegistry > reg;
+ std::vector<rtl::OUString> loaded;
for (sal_Int32 i = 0; i != -1;) {
rtl::OUString uri(uris.getToken(0, ' ', i));
if (uri.isEmpty()) {
@@ -1969,9 +1970,13 @@ css::uno::Reference< css::registry::XSimpleRegistry > createTypeRegistry(
bool optional;
bool directory;
decodeRdbUri(&uri, &optional, &directory);
- reg = directory
- ? readTypeRdbDirectory(uri, optional, reg, simpleRegs, nestedRegs)
- : readTypeRdbFile(uri, optional, reg, simpleRegs, nestedRegs);
+ if (::std::find (loaded.begin(), loaded.end(), uri) == loaded.end())
+ {
+ reg = directory
+ ? readTypeRdbDirectory(uri, optional, reg, simpleRegs, nestedRegs)
+ : readTypeRdbFile(uri, optional, reg, simpleRegs, nestedRegs);
+ loaded.push_back(uri);
+ }
}
return reg;
}