diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2007-04-17 09:32:26 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2007-04-17 09:32:26 +0000 |
commit | c0a53b8bbbe45ace582b310b370b6a0fbc8598b6 (patch) | |
tree | 15d967559d1e9325179f687af6683a7589b48156 /desktop/source | |
parent | bbfd68779e5ae9e06da05aa86b9740e6646ecb2c (diff) |
INTEGRATION: CWS jl51 (1.5.34); FILE MERGED
2007/02/28 11:24:08 jl 1.5.34.2: #i73367# removing the DeploymentException from the exception messages because it will be added again in next level which catches the exception
2007/02/02 10:46:00 jl 1.5.34.1: #73367# The extension should not install if the description.xml contains a wrong root element
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/deployment/registry/package/dp_description.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/desktop/source/deployment/registry/package/dp_description.cxx b/desktop/source/deployment/registry/package/dp_description.cxx index f521120d4e28..dcae802a7cbf 100644 --- a/desktop/source/deployment/registry/package/dp_description.cxx +++ b/desktop/source/deployment/registry/package/dp_description.cxx @@ -4,9 +4,9 @@ * * $RCSfile: dp_description.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: ihi $ $Date: 2006-12-20 14:30:26 $ + * last change: $Author: ihi $ $Date: 2007-04-17 10:32:26 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -122,6 +122,13 @@ ExtensionDescription::ExtensionDescription( throw cssu::Exception( sDescriptionUri + OUSTR(" contains no root element."), 0); } + + if ( ! xRoot->getTagName().equals(OUSTR("description"))) + { + throw cssu::Exception( + sDescriptionUri + OUSTR(" does not contain the root element <description>."), 0); + } + m_xRoot = cssu::Reference<css::xml::dom::XNode>( xRoot, cssu::UNO_QUERY_THROW); ::rtl::OUString nsDescription = xRoot->getNamespaceURI(); @@ -138,9 +145,7 @@ ExtensionDescription::ExtensionDescription( } catch (css::uno::Exception & e) { css::uno::Any a(cppu::getCaughtException()); throw css::deployment::DeploymentException( - (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DeploymentException: ")) - + e.Message), - css::uno::Reference< css::uno::XInterface >(), a); + e.Message, css::uno::Reference< css::uno::XInterface >(), a); } } |