diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-10-01 09:04:58 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-10-01 09:04:58 +0000 |
commit | 60489c9d039d460cef6e14a0793ee3512ad2b4e0 (patch) | |
tree | c795849cc4275c104a9d7005390f7fe180dbd3ec /sal/rtl | |
parent | 04f82e0e198c6eab933ae0fb8079996c48eb5096 (diff) |
CWS-TOOLING: integrate CWS sb93
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/source/bootstrap.cxx | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/sal/rtl/source/bootstrap.cxx b/sal/rtl/source/bootstrap.cxx index caacaa70c..9a5aa3df4 100644 --- a/sal/rtl/source/bootstrap.cxx +++ b/sal/rtl/source/bootstrap.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: bootstrap.cxx,v $ - * $Revision: 1.44 $ + * $Revision: 1.43.20.1 $ * * This file is part of OpenOffice.org. * @@ -891,9 +891,9 @@ rtl::OUString lookup( Bootstrap_Impl const * file, bool override, rtl::OUString const & key, ExpandRequestLink const * requestStack) { - OSL_ASSERT(file != NULL); rtl::OUString v; - file->getValue(key, &v.pData, NULL, override, requestStack); + (file == NULL ? get_static_bootstrap_handle() : file)->getValue( + key, &v.pData, NULL, override, requestStack); return v; } @@ -979,14 +979,11 @@ rtl::OUString expandMacros( } catch (rtl::MalformedUriException &) {} } } else { - rtl::Bootstrap b(seg[0]); - Bootstrap_Impl * f = static_cast< Bootstrap_Impl * >( - b.getHandle()); - // Silently ignore bootstrap files that cannot be opened - // (is that good?): - if (f != NULL) { - buf.append(lookup(f, false, seg[1], requestStack)); - } + buf.append( + lookup( + static_cast< Bootstrap_Impl * >( + rtl::Bootstrap(seg[0]).getHandle()), + false, seg[1], requestStack)); } } else if (seg[0].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(".override"))) @@ -994,10 +991,7 @@ rtl::OUString expandMacros( rtl::Bootstrap b(seg[1]); Bootstrap_Impl * f = static_cast< Bootstrap_Impl * >( b.getHandle()); - buf.append( - lookup( - f == NULL ? get_static_bootstrap_handle() : f, - f != NULL, seg[2], requestStack)); + buf.append(lookup(f, f != NULL, seg[2], requestStack)); } else { // Going through osl::Profile, this code erroneously does // not recursively expand macros in the resulting |