desktop/inc/strings.hrc | 1 + desktop/source/deployment/misc/dp_dependencies.cxx | 9 +++++++++ 2 files changed, 10 insertions(+)
New commits: commit 74597acc9318177a0266535b5387dba35305171a Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Mon May 18 16:44:20 2020 +0300 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Mon May 18 18:52:20 2020 +0200 tdf#129177: Allow extensions to specify also maximum LibreOffice version To be used by the potential packaging of language packs as extensions. Language packs are by necessity specific to a LibreOffice version as they contain message catalogs. Change-Id: I6037103dfe0949d288f8ad77fec63dd5da221c02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94425 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <t...@collabora.com> diff --git a/desktop/inc/strings.hrc b/desktop/inc/strings.hrc index 0f027731141a..d6d2c6244210 100644 --- a/desktop/inc/strings.hrc +++ b/desktop/inc/strings.hrc @@ -114,6 +114,7 @@ #define RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN NC_("RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN", "Extension requires at least OpenOffice.org reference version %VERSION") #define RID_DEPLOYMENT_DEPENDENCIES_OOO_MAX NC_("RID_DEPLOYMENT_DEPENDENCIES_OOO_MAX", "Extension does not support OpenOffice.org reference versions greater than %VERSION") #define RID_DEPLOYMENT_DEPENDENCIES_LO_MIN NC_("RID_DEPLOYMENT_DEPENDENCIES_LO_MIN", "Extension requires at least %PRODUCTNAME version %VERSION") +#define RID_DEPLOYMENT_DEPENDENCIES_LO_MAX NC_("RID_DEPLOYMENT_DEPENDENCIES_LO_MAX", "Extension does not support %PRODUCTNAME versions greater than %VERSION") #define RID_STR_WARNING_VERSION_LESS NC_("RID_STR_WARNING_VERSION_LESS", "You are about to install version $NEW of the extension '$NAME'.\n" \ "The newer version $DEPLOYED is already installed.\n"\ diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx index 0105c4ba7d62..081144af3bc1 100644 --- a/desktop/source/deployment/misc/dp_dependencies.cxx +++ b/desktop/source/deployment/misc/dp_dependencies.cxx @@ -47,6 +47,7 @@ static char const namespaceOpenOfficeOrg[] = "http://openoffice.org/extensions/description/2006"; static char const minimalVersionLibreOffice[] = "LibreOffice-minimal-version"; +static char const maximalVersionLibreOffice[] = "LibreOffice-maximal-version"; static char const minimalVersionOpenOfficeOrg[] = "OpenOffice.org-minimal-version"; @@ -134,6 +135,9 @@ check(dp_misc::DescriptionInfoset const & infoset) { sat = satisfiesMinimalVersion( getLibreOfficeMajorMinorMicro(), e->getAttribute("value")); + } else if (e->getNamespaceURI() == namespaceLibreOffice && e->getTagName() == maximalVersionLibreOffice ) + { + sat = satisfiesMaximalVersion(getLibreOfficeMajorMinorMicro(), e->getAttribute("value")); } else if (e->hasAttributeNS(namespaceOpenOfficeOrg, minimalVersionOpenOfficeOrg)) { @@ -169,6 +173,11 @@ OUString getErrorText( return produceErrorText( DpResId(RID_DEPLOYMENT_DEPENDENCIES_LO_MIN), dependency->getAttribute("value")); + } else if (dependency->getNamespaceURI() == namespaceLibreOffice && dependency->getTagName() == maximalVersionLibreOffice ) + { + return produceErrorText( + DpResId(RID_DEPLOYMENT_DEPENDENCIES_LO_MAX), + dependency->getAttribute("value")); } else if (dependency->hasAttributeNS(namespaceOpenOfficeOrg, minimalVersionOpenOfficeOrg)) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits