From 86c9f264f461e814c7e4f899a2d1e54363da053a Mon Sep 17 00:00:00 2001 From: Daniel Boelzle Date: Fri, 26 Apr 2002 16:05:29 +0000 Subject: [PATCH] #99011# support optional rdb pathes --- cppuhelper/source/bootstrap.cxx | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx index 52f6391b831f..8a962b583c02 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 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(