summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-06-24 12:24:49 +0100
committerMichael Meeks <michael.meeks@novell.com>2011-06-24 14:23:25 +0100
commitb5b064c930426e706dc30486ee40213995da7989 (patch)
tree7e39413577db7919baa6a1b6cc0f88a2073f008a /stoc
parent286619e815b022e1271602785f2379e4e79d7ec3 (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.cxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx
index 78aca34d3..9c27a1f1b 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 );
}