summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-06-06 07:41:39 +0000
committerRüdiger Timm <rt@openoffice.org>2008-06-06 07:41:39 +0000
commit000b386147fa0ec0989cd50d0c3df27ba51f7aea (patch)
tree6f76464e1db6a7814f8183c93db253d4c957dae6 /desktop
parentc66ae68bedfa962a9a7fd36f794d3c15d732f6e7 (diff)
INTEGRATION: CWS jl101 (1.27.6); FILE MERGED
2008/05/28 15:03:57 jl 1.27.6.2: RESYNC: (1.27-1.28); FILE MERGED 2008/05/28 14:41:10 jl 1.27.6.1: #i84453# Throwin exception DeploymentException if there is a missing license text element
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 6b957786282c..25cecd2fd74c 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: dp_package.cxx,v $
- * $Revision: 1.29 $
+ * $Revision: 1.30 $
*
* This file is part of OpenOffice.org.
*
@@ -585,9 +585,14 @@ bool BackendImpl::PackageImpl::checkDependencies(
if (!nodeSimpleLic.is())
return true;
- //throws an exception if nothing adequate was found
- OUString sHref = desc.getExtensionRootUrl() + OUSTR("/")
- + getDescriptionInfoset().getLocalizedLicenseURL();
+ OUString sLic = getDescriptionInfoset().getLocalizedLicenseURL();
+ //If we do not get a localized licence then there is an error in the description.xml
+ //This should be handled by using a validating parser. Therefore we assume that no
+ //license is available.
+ if (sLic.getLength() == 0)
+ throw css::deployment::DeploymentException(
+ OUSTR("Could not obtain path to license. Possible error in description.xml"), 0, Any());
+ OUString sHref = desc.getExtensionRootUrl() + OUSTR("/") + sLic;
OUString sLicense = getLicenseText(xCmdEnv, sHref);
//determine who has to agree to the license
css::uno::Reference<css::xml::xpath::XXPathObject> nodeAttribWho3 =