diff options
author | Michael Meeks <michael.meeks@novell.com> | 2011-06-24 12:24:49 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-06-24 14:23:25 +0100 |
commit | babdd43fcee0963f80df3ed6574e8f70543827e2 (patch) | |
tree | 58945e7d44d10c6d6474885a79cd39b215c6127a /stoc | |
parent | f1be5778f8c25df71cdfdda9884515c35834ab1c (diff) |
re-work prefix handling and undo cppuhelper ABI change, add unit test
use a separate prefix enabled method instead of changing the ABI of cppuhelper
also - lookup the prefix in the dllcomponentloader in case we are called this way
also - add a unit test for the prefix change
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/loader/dllcomponentloader.cxx | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx index 86d96a76ce3a..4fd75a53060e 100644 --- a/stoc/source/loader/dllcomponentloader.cxx +++ b/stoc/source/loader/dllcomponentloader.cxx @@ -202,8 +202,26 @@ Reference<XInterface> SAL_CALL DllComponentLoader::activate( throw(CannotActivateFactoryException, RuntimeException) { + rtl::OUString aPrefix; + if( xKey.is() ) + { + Reference<XRegistryKey > xActivatorKey = xKey->openKey( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/ACTIVATOR") ) ); + if (xActivatorKey.is() && xActivatorKey->getValueType() == RegistryValueType_ASCII ) + { + Reference<XRegistryKey > xPrefixKey = xActivatorKey->openKey( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/PREFIX") ) ); + if( xPrefixKey.is() && xPrefixKey->getValueType() == RegistryValueType_ASCII ) + { + aPrefix = xPrefixKey->getAsciiValue(); + if( aPrefix.getLength() != 0 ) + aPrefix = aPrefix + OUSTR("_"); + } + } + } + return loadSharedLibComponentFactory( - expand_url( rLibName ), OUString(), rImplName, m_xSMgr, xKey ); + expand_url( rLibName ), OUString(), rImplName, m_xSMgr, xKey, aPrefix ); } |