summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorDaniel Boelzle <dbo@openoffice.org>2002-04-26 16:05:29 +0000
committerDaniel Boelzle <dbo@openoffice.org>2002-04-26 16:05:29 +0000
commite57d277fbc864e26b08a03928f63f8b3d62224dc (patch)
treec1ac08495693f6a3b7a9449edf6af69115f84b06 /cppuhelper
parent3cff2e52d502b4bab74995610896bc8c39c3aef7 (diff)
#99011# support optional rdb pathes
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/bootstrap.cxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx
index ff4aad4f0..0e9952e75 100644
--- a/cppuhelper/source/bootstrap.cxx
+++ b/cppuhelper/source/bootstrap.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bootstrap.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: hr $ $Date: 2002-02-21 11:44:33 $
+ * last change: $Author: dbo $ $Date: 2002-04-26 17:05:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -318,6 +318,13 @@ static Reference< registry::XSimpleRegistry > nestRegistries(
OUString rdb_name = (index == -1) ? csl_rdbs : csl_rdbs.copy(0, index);
csl_rdbs = (index == -1) ? OUString() : csl_rdbs.copy(index + 1);
+ if (! rdb_name.getLength())
+ continue;
+
+ bool optional = ('?' == rdb_name[ 0 ]);
+ if (optional)
+ rdb_name = rdb_name.copy( 1 );
+
try
{
Reference<registry::XSimpleRegistry> simpleRegistry(
@@ -346,9 +353,12 @@ static Reference< registry::XSimpleRegistry > nestRegistries(
}
catch(registry::InvalidRegistryException & invalidRegistryException)
{
- // if a registry was explicitly given, the exception shall fly
- if( ! bFallenBack )
- throw;
+ if (! optional)
+ {
+ // if a registry was explicitly given, the exception shall fly
+ if( ! bFallenBack )
+ throw;
+ }
#ifdef DEBUG
OString rdb_name_tmp = OUStringToOString(