diff options
author | Hans-Joachim Lankenau <hjs@openoffice.org> | 2010-12-17 16:18:53 +0100 |
---|---|---|
committer | Hans-Joachim Lankenau <hjs@openoffice.org> | 2010-12-17 16:18:53 +0100 |
commit | 4410d777c1ba9cf1a504e89ab1b9180255610370 (patch) | |
tree | 0d79d1332db7b707e89f41dbc66cd7ba991cf2a5 /stoc | |
parent | d3c308b56f895fde86164de9cd8591f999597c59 (diff) | |
parent | 05aef668acf3ba8bf7afc7d323365a25ceda5683 (diff) |
CWS-TOOLING: integrate CWS sb131
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/implementationregistration/implreg.cxx | 84 | ||||
-rw-r--r--[-rwxr-xr-x] | stoc/source/simpleregistry/textualservices.cxx | 12 |
2 files changed, 48 insertions, 48 deletions
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx index 2faf13fd159c..cbb49c162fe1 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -1153,36 +1153,24 @@ static void prepareRegistry( { // update entries in SERVICES section Sequence< Reference < XRegistryKey > > serviceKeys = xKey->openKeys(); - OUString implName; + const Reference < XRegistryKey > * pServiceKeys = serviceKeys.getConstArray(); - if (serviceKeys.getLength()) - { - const Reference < XRegistryKey > * pServiceKeys = serviceKeys.getConstArray(); - - implName = OUString(xImplKey->getKeyName().getStr() + 1); - sal_Int32 firstDot = implName.indexOf('/'); - - if (firstDot >= 0) - implName = implName.copy(firstDot + 1); - - sal_Int32 offset = xKey->getKeyName().getLength() + 1; + OUString implName = OUString(xImplKey->getKeyName().getStr() + 1); + sal_Int32 firstDot = implName.indexOf('/'); - for (sal_Int32 j = 0; j < serviceKeys.getLength(); j++) - { - OUString serviceName = pServiceKeys[j]->getKeyName().copy(offset); + if (firstDot >= 0) + implName = implName.copy(firstDot + 1); - createUniqueSubEntry( - xDest->getRootKey()->createKey( - pool.slash_SERVICES + serviceName ), - implName); - } + sal_Int32 offset = xKey->getKeyName().getLength() + 1; - } - else + for (sal_Int32 j = 0; j < serviceKeys.getLength(); j++) { - throw InvalidRegistryException( - OUString( RTL_CONSTASCII_USTRINGPARAM( "prepareRegistry(): no service names given by component" ) ), - Reference< XInterface > () ); + OUString serviceName = pServiceKeys[j]->getKeyName().copy(offset); + + createUniqueSubEntry( + xDest->getRootKey()->createKey( + pool.slash_SERVICES + serviceName ), + implName); } xKey = xImplKey->openKey( pool.slash_UNO ); @@ -1205,38 +1193,38 @@ static void prepareRegistry( } } } + } - // update LOCATION entry - xKey = xImplKey->createKey( pool.slash_UNO_slash_LOCATION ); + // update LOCATION entry + xKey = xImplKey->createKey( pool.slash_UNO_slash_LOCATION ); - if (xKey.is()) - { - xKey->setAsciiValue(locationUrl); - } + if (xKey.is()) + { + xKey->setAsciiValue(locationUrl); + } - // update ACTIVATOR entry - xKey = xImplKey->createKey( pool.slash_UNO_slash_ACTIVATOR ); + // update ACTIVATOR entry + xKey = xImplKey->createKey( pool.slash_UNO_slash_ACTIVATOR ); - if (xKey.is()) - { - xKey->setAsciiValue(implementationLoaderUrl); - } + if (xKey.is()) + { + xKey->setAsciiValue(implementationLoaderUrl); + } - xKey = xImplKey->openKey( pool.slash_UNO_slash_SERVICES ); + xKey = xImplKey->openKey( pool.slash_UNO_slash_SERVICES ); + + if (xKey.is() && (xKey->getValueType() == RegistryValueType_ASCIILIST)) + { + // update link entries in REGISTRY_LINKS section + Sequence<OUString> linkNames = xKey->getAsciiListValue(); - if (xKey.is() && (xKey->getValueType() == RegistryValueType_ASCIILIST)) + if (linkNames.getLength()) { - // update link entries in REGISTRY_LINKS section - Sequence<OUString> linkNames = xKey->getAsciiListValue(); + const OUString* pLinkNames = linkNames.getConstArray(); - if (linkNames.getLength()) + for (sal_Int32 j = 0; j < linkNames.getLength(); j++) { - const OUString* pLinkNames = linkNames.getConstArray(); - - for (sal_Int32 j = 0; j < linkNames.getLength(); j++) - { - prepareLink(xDest, xImplKey, pLinkNames[j]); - } + prepareLink(xDest, xImplKey, pLinkNames[j]); } } } diff --git a/stoc/source/simpleregistry/textualservices.cxx b/stoc/source/simpleregistry/textualservices.cxx index 932c639124d0..5a50a5aa62c6 100755..100644 --- a/stoc/source/simpleregistry/textualservices.cxx +++ b/stoc/source/simpleregistry/textualservices.cxx @@ -41,8 +41,10 @@ #include "com/sun/star/uno/XInterface.hpp" #include "cppuhelper/implbase1.hxx" #include "osl/diagnose.h" +#include "rtl/malformeduriexception.hxx" #include "rtl/ref.hxx" #include "rtl/string.h" +#include "rtl/uri.hxx" #include "rtl/ustrbuf.hxx" #include "rtl/ustring.h" #include "rtl/ustring.hxx" @@ -306,6 +308,16 @@ void Parser::handleComponent() { ": <component> is missing \"loader\" attribute"))), css::uno::Reference< css::uno::XInterface >()); } + try { + attrUri_ = rtl::Uri::convertRelToAbs(reader_.getUrl(), attrUri_); + } catch (rtl::MalformedUriException & e) { + throw css::registry::InvalidRegistryException( + (reader_.getUrl() + + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM(": bad \"uri\" attribute: ")) + + e.getMessage()), + css::uno::Reference< css::uno::XInterface >()); + } } void Parser::handleImplementation() { |