summaryrefslogtreecommitdiff
path: root/cppuhelper/source/shlib.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cppuhelper/source/shlib.cxx')
-rw-r--r--cppuhelper/source/shlib.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index db5d91124a14..2008d27f5310 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -315,7 +315,26 @@ static OUString getLibEnv(OUString const & aModulePath,
}
if (!pEnv->is() && pEnvTypeName)
+ {
*pSourceEnv_name = OUString::createFromAscii(pEnvTypeName);
+ const char * pUNO_ENV_LOG = ::getenv( "UNO_ENV_LOG" );
+ if (pUNO_ENV_LOG && rtl_str_getLength(pUNO_ENV_LOG) )
+ {
+ OString implName(OUStringToOString(cImplName, RTL_TEXTENCODING_ASCII_US));
+ OString aEnv( pUNO_ENV_LOG );
+ sal_Int32 nIndex = 0;
+ do
+ {
+ const OString aStr( aEnv.getToken( 0, ';', nIndex ) );
+ if ( aStr.equals(implName) )
+ {
+ *pSourceEnv_name += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":log"));
+ break;
+ }
+ } while( nIndex != -1 );
+ }
+
+ }
return aExcMsg;
}