summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-04-13 11:27:38 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-04-13 11:27:38 +0000
commit13291026cc4931c7a9037a0e54aad87e50062d0b (patch)
treee03623e8ed84a39efb922f8b1162ff6538e2f267 /cppuhelper
parent71758aeea503675060ed3b3edf11ab7f07628233 (diff)
INTEGRATION: CWS unopkg1 (1.15.64); FILE MERGED
2004/03/19 16:09:48 dbo 1.15.64.1: #115884# allow macrofied URLs in unorc
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/bootstrap.cxx24
1 files changed, 19 insertions, 5 deletions
diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx
index 884dd9e596ce..16c5cbdb3b9f 100644
--- a/cppuhelper/source/bootstrap.cxx
+++ b/cppuhelper/source/bootstrap.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bootstrap.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: rt $ $Date: 2003-04-23 16:27:08 $
+ * last change: $Author: hr $ $Date: 2004-04-13 12:27:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,6 +66,7 @@
#include "rtl/bootstrap.hxx"
#include "rtl/string.hxx"
#include "rtl/ustrbuf.hxx"
+#include "rtl/uri.hxx"
#if OSL_DEBUG_LEVEL > 0
#include "rtl/strbuf.hxx"
#endif
@@ -89,6 +90,7 @@
#include "com/sun/star/registry/XSimpleRegistry.hpp"
#include "com/sun/star/container/XSet.hpp"
#include "com/sun/star/beans/PropertyValue.hpp"
+#include "com/sun/star/io/IOException.hpp"
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
@@ -298,7 +300,8 @@ static Reference< registry::XSimpleRegistry > nestRegistries(
OUString csl_rdbs,
const OUString & write_rdb,
sal_Bool forceWrite_rdb,
- sal_Bool bFallenBack )
+ sal_Bool bFallenBack,
+ Bootstrap const & bootstrap )
SAL_THROW((Exception))
{
sal_Int32 index;
@@ -342,6 +345,15 @@ static Reference< registry::XSimpleRegistry > nestRegistries(
if (optional)
rdb_name = rdb_name.copy( 1 );
+ if (rdb_name.matchIgnoreAsciiCaseAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.expand:") ))
+ {
+ rdb_name = ::rtl::Uri::decode(
+ rdb_name.copy( sizeof ("vnd.sun.star.expand:") -1 ),
+ rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
+ bootstrap.expandMacrosFrom( rdb_name );
+ }
+
try
{
Reference<registry::XSimpleRegistry> simpleRegistry(
@@ -432,7 +444,7 @@ SAL_CALL defaultBootstrap_InitialComponentContext(
Reference<registry::XSimpleRegistry> types_xRegistry =
nestRegistries(
iniDir, xSimRegFac, xNesRegFac, cls_uno_types,
- OUString(), sal_False, bFallenback_types );
+ OUString(), sal_False, bFallenback_types, bootstrap );
// ==== bootstrap from services registry ====
@@ -451,7 +463,7 @@ SAL_CALL defaultBootstrap_InitialComponentContext(
Reference<registry::XSimpleRegistry> services_xRegistry = nestRegistries(
iniDir, xSimRegFac, xNesRegFac, cls_uno_services, write_rdb,
- !fallenBackWriteRegistry, bFallenback_services );
+ !fallenBackWriteRegistry, bFallenback_services, bootstrap );
Reference< XComponentContext > xContext(
bootstrapInitialContext(
@@ -476,6 +488,8 @@ SAL_CALL defaultBootstrap_InitialComponentContext(
SAL_THROW( (Exception) )
{
Bootstrap bootstrap( iniFile );
+ if (bootstrap.getHandle() == 0)
+ throw io::IOException(OUSTR("Cannot open for reading: ") + iniFile, 0);
return defaultBootstrap_InitialComponentContext( bootstrap );
}