[Libreoffice-commits] .: 3 commits - desktop/inc desktop/source desktop/test instsetoo_native/util scp2/source

Stephan Bergmann sbergmann at kemper.freedesktop.org
Wed Nov 9 04:37:41 PST 2011


 desktop/inc/deployment.hrc                            |    6 
 desktop/source/deployment/inc/dp_dependencies.hxx     |   25 +--
 desktop/source/deployment/misc/dp_dependencies.cxx    |  139 +++++++++---------
 desktop/source/deployment/misc/dp_misc.src            |   10 -
 desktop/test/deployment/dependencies/maxversion33.oxt |binary
 desktop/test/deployment/dependencies/maxversion34.oxt |binary
 desktop/test/deployment/dependencies/maxversion35.oxt |binary
 desktop/test/deployment/dependencies/maxversion36.oxt |binary
 desktop/test/deployment/dependencies/version34.oxt    |binary
 desktop/test/deployment/dependencies/version35.oxt    |binary
 instsetoo_native/util/openoffice.lst                  |    1 
 scp2/source/ooo/common_brand.scp                      |    8 +
 12 files changed, 97 insertions(+), 92 deletions(-)

New commits:
commit 4bfde371a893a3d6902c995d62a167e5c81ab0a2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 9 13:31:13 2011 +0100

    OOo reference version for extension dependencies is still at 3.4.

diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx
index b168317..f2a997f 100644
--- a/desktop/source/deployment/misc/dp_dependencies.cxx
+++ b/desktop/source/deployment/misc/dp_dependencies.cxx
@@ -63,7 +63,7 @@ bool versionIsNot(dp_misc::Order order, rtl::OUString const & version) {
     rtl::OUString oooVersion(
         RTL_CONSTASCII_USTRINGPARAM(
             "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("version")
-            ":Version:OOOPackageVersion}"));
+            ":Version:ReferenceOOoMajorMinor}"));
     rtl::Bootstrap::expandMacros(oooVersion); //TODO: check for failure
     return dp_misc::compareVersions(oooVersion, version) != order;
 }
diff --git a/desktop/test/deployment/dependencies/maxversion33.oxt b/desktop/test/deployment/dependencies/maxversion33.oxt
new file mode 100644
index 0000000..fe0998c
Binary files /dev/null and b/desktop/test/deployment/dependencies/maxversion33.oxt differ
diff --git a/desktop/test/deployment/dependencies/maxversion34.oxt b/desktop/test/deployment/dependencies/maxversion34.oxt
new file mode 100644
index 0000000..0a284b3
Binary files /dev/null and b/desktop/test/deployment/dependencies/maxversion34.oxt differ
diff --git a/desktop/test/deployment/dependencies/maxversion35.oxt b/desktop/test/deployment/dependencies/maxversion35.oxt
new file mode 100644
index 0000000..e95b97c
Binary files /dev/null and b/desktop/test/deployment/dependencies/maxversion35.oxt differ
diff --git a/desktop/test/deployment/dependencies/maxversion36.oxt b/desktop/test/deployment/dependencies/maxversion36.oxt
new file mode 100644
index 0000000..786ed4c
Binary files /dev/null and b/desktop/test/deployment/dependencies/maxversion36.oxt differ
diff --git a/desktop/test/deployment/dependencies/version34.oxt b/desktop/test/deployment/dependencies/version34.oxt
new file mode 100644
index 0000000..ee2a82d
Binary files /dev/null and b/desktop/test/deployment/dependencies/version34.oxt differ
diff --git a/desktop/test/deployment/dependencies/version35.oxt b/desktop/test/deployment/dependencies/version35.oxt
new file mode 100644
index 0000000..6e99cf1
Binary files /dev/null and b/desktop/test/deployment/dependencies/version35.oxt differ
diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst
index 1371634..b8e2ef7 100644
--- a/instsetoo_native/util/openoffice.lst
+++ b/instsetoo_native/util/openoffice.lst
@@ -8,6 +8,7 @@ Globals
   			OOOPACKAGEVERSION 3.5.0
 			UREPACKAGEVERSION 3.5.0
 			URELAYERVERSION 1
+            REFERENCEOOOMAJORMINOR 3.4
 			UNIXBASISROOTNAME libreoffice3.5
 			SERVICETAG_PRODUCTNAME LibreOffice 3.5
 			SERVICETAG_PRODUCTVERSION 3.5
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 794359c..71135b2 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -1099,6 +1099,14 @@ ProfileItem gid_Brand_Profileitem_Version_Extensionupdateurl
     Value = "http://updateexte.libreoffice.org/ExtensionUpdateService/check.Update";
 End
 
+ProfileItem gid_Brand_Profileitem_Version_ReferenceOOoMajorMinor
+    ProfileID = gid_Brand_Profile_Version_Ini;
+    ModuleID = gid_Module_Root_Brand;
+    Section = "Version";
+    Key = "ReferenceOOoMajorMinor";
+    Value = "${REFERENCEOOOMAJORMINOR}";
+End
+
 ProfileItem gid_Brand_Profileitem_Fundamental_Brand_Base_Dir
     ModuleID = gid_Module_Root_Brand;
     ProfileID = gid_Brand_Profile_Fundamental_Ini;
commit debc96051f15652bc8d1b8aa5406f7760c5feed7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 9 12:20:28 2011 +0100

    OpenOffice.org-minimal-version dependency is not branded.

diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx
index d0cd231..b168317 100644
--- a/desktop/source/deployment/misc/dp_dependencies.cxx
+++ b/desktop/source/deployment/misc/dp_dependencies.cxx
@@ -40,7 +40,6 @@
 #include "rtl/ustring.hxx"
 #include "sal/types.h"
 #include "tools/resid.hxx"
-#include "unotools/configmgr.hxx"
 
 #include "deployment.hrc"
 #include "dp_resource.h"
@@ -80,19 +79,12 @@ bool satisfiesMaximalVersion(rtl::OUString const & version) {
 rtl::OUString produceErrorText(
     rtl::OUString const & reason, rtl::OUString const & version)
 {
-    rtl::OUString buf(
-        comphelper::string::searchAndReplaceAsciiL(
-            reason, RTL_CONSTASCII_STRINGPARAM("%VERSION"),
-            (version.isEmpty()
-             ? ResId::toString(
-                 dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN))
-             : version)));
     return comphelper::string::searchAndReplaceAsciiL(
-        buf, RTL_CONSTASCII_STRINGPARAM("%PRODUCTNAME"),
-        utl::ConfigManager::GetDirectConfigProperty(
-            utl::ConfigManager::PRODUCTNAME).get< rtl::OUString >());
-        //TODO: can fail if the replacement of "%VERSION" introduces an
-        // instance of "%PRODUCTNAME" into the string
+        reason, RTL_CONSTASCII_STRINGPARAM("%VERSION"),
+        (version.isEmpty()
+         ? ResId::toString(
+             dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN))
+         : version));
 }
 
 }
diff --git a/desktop/source/deployment/misc/dp_misc.src b/desktop/source/deployment/misc/dp_misc.src
index 1dcc77d..22a6683 100644
--- a/desktop/source/deployment/misc/dp_misc.src
+++ b/desktop/source/deployment/misc/dp_misc.src
@@ -32,9 +32,9 @@ String RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN {
 };
 
 String RID_DEPLOYMENT_DEPENDENCIES_MIN {
-    Text[en-US] = "Extension requires at least %PRODUCTNAME %VERSION";
+    Text[en-US] = "Extension requires at least OpenOffice.org reference version %VERSION";
 };
 
 String RID_DEPLOYMENT_DEPENDENCIES_MAX {
-    Text[en-US] = "Extension doesn't support versions greater than: %PRODUCTNAME %VERSION";
+    Text[en-US] = "Extension does not support OpenOffice.org reference versions greater than %VERSION";
 };
commit bf912d1a184bf50e326f428b7d0c083526f2783b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 9 11:50:43 2011 +0100

    dp_dependencies clean up

diff --git a/desktop/inc/deployment.hrc b/desktop/inc/deployment.hrc
index 22492cd..1777f69 100644
--- a/desktop/inc/deployment.hrc
+++ b/desktop/inc/deployment.hrc
@@ -67,9 +67,9 @@
 #define RID_STR_CONCURRENTINSTANCE           (RID_DEPLOYMENT_UNOPKG_START+10)
 
 #define RID_DEPLOYMENT_DEPENDENCIES_START    (RID_DEPLOYMENT_START + 4400)
-#define RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN  RID_DEPLOYMENT_DEPENDENCIES_START
-#define RID_DEPLYOMENT_DEPENDENCIES_MIN      (RID_DEPLOYMENT_DEPENDENCIES_START+1)
-#define RID_DEPLYOMENT_DEPENDENCIES_MAX      (RID_DEPLOYMENT_DEPENDENCIES_START+2)
+#define RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN  RID_DEPLOYMENT_DEPENDENCIES_START
+#define RID_DEPLOYMENT_DEPENDENCIES_MIN    (RID_DEPLOYMENT_DEPENDENCIES_START+1)
+#define RID_DEPLOYMENT_DEPENDENCIES_MAX    (RID_DEPLOYMENT_DEPENDENCIES_START+2)
 
 #define RID_DEPLOYMENT_LICENSE_START        (RID_DEPLOYMENT_START+4500)
 
diff --git a/desktop/source/deployment/inc/dp_dependencies.hxx b/desktop/source/deployment/inc/dp_dependencies.hxx
index 246d176..5cd3108 100644
--- a/desktop/source/deployment/inc/dp_dependencies.hxx
+++ b/desktop/source/deployment/inc/dp_dependencies.hxx
@@ -29,8 +29,8 @@
 #ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_DEPENDENCIES_HXX
 #define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_DEPENDENCIES_HXX
 
-#include "unotools/configmgr.hxx"
 #include "sal/config.h"
+
 #include "com/sun/star/uno/Reference.hxx"
 #include "com/sun/star/uno/Sequence.hxx"
 #include "dp_misc_api.hxx"
@@ -45,14 +45,6 @@ namespace rtl { class OUString; }
 
 namespace dp_misc {
 
-struct BrandName : public ::rtl::StaticWithInit< ::rtl::OUString, BrandName > {
-    const ::rtl::OUString operator () () {
-        return ::utl::ConfigManager::GetDirectConfigProperty(
-            ::utl::ConfigManager::PRODUCTNAME ).get< ::rtl::OUString >();
-    }
-};
-
-
 /**
    Dependency handling.
 */
@@ -67,10 +59,9 @@ namespace Dependencies {
        a list of the unsatisfied dependencies from <code>infoset</code> (in no
        specific order)
     */
-    DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
-    ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
-        ::com::sun::star::xml::dom::XElement > >
-    check(::dp_misc::DescriptionInfoset const & infoset);
+    DESKTOP_DEPLOYMENTMISC_DLLPUBLIC com::sun::star::uno::Sequence<
+        com::sun::star::uno::Reference< com::sun::star::xml::dom::XElement > >
+    check(dp_misc::DescriptionInfoset const & infoset);
 
     /**
        Obtain the (human-readable) error message of a failed dependency.
@@ -81,10 +72,10 @@ namespace Dependencies {
        @return
        the name of the dependency; will never be empty, as a localized
        &ldquo;unknown&rdquo; is substituted for an empty/missing name
-     */
-    DESKTOP_DEPLOYMENTMISC_DLLPUBLIC ::rtl::OUString getErrorText(
-        ::com::sun::star::uno::Reference<
-            ::com::sun::star::xml::dom::XElement > const & dependency);
+    */
+    DESKTOP_DEPLOYMENTMISC_DLLPUBLIC rtl::OUString getErrorText(
+        com::sun::star::uno::Reference< com::sun::star::xml::dom::XElement >
+            const & dependency);
 }
 
 }
diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx
index 9bbaa1f..d0cd231 100644
--- a/desktop/source/deployment/misc/dp_dependencies.cxx
+++ b/desktop/source/deployment/misc/dp_dependencies.cxx
@@ -26,22 +26,21 @@
  *
  ************************************************************************/
 
-// MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_desktop.hxx"
-
 #include "sal/config.h"
 
 #include "com/sun/star/uno/Reference.hxx"
 #include "com/sun/star/uno/Sequence.hxx"
 #include "com/sun/star/xml/dom/XElement.hpp"
-#include "com/sun/star/xml/dom/XNode.hpp"
 #include "com/sun/star/xml/dom/XNodeList.hpp"
+#include "comphelper/string.hxx"
 #include "rtl/bootstrap.hxx"
 #include "rtl/string.h"
 #include "rtl/ustring.h"
 #include "rtl/ustring.hxx"
 #include "sal/types.h"
-#include "tools/string.hxx"
+#include "tools/resid.hxx"
+#include "unotools/configmgr.hxx"
 
 #include "deployment.hrc"
 #include "dp_resource.h"
@@ -52,30 +51,48 @@
 
 namespace {
 
-namespace css = ::com::sun::star;
+namespace css = com::sun::star;
 
 static char const xmlNamespace[] =
     "http://openoffice.org/extensions/description/2006";
 
-bool
-lcl_versionIsNot(dp_misc::Order i_eOrder, ::rtl::OUString const& i_rVersion)
-{
-    ::rtl::OUString aVersion(
+static char const minimalVersion[] = "OpenOffice.org-minimal-version";
+
+static char const maximalVersion[] = "OpenOffice.org-maximal-version";
+
+bool versionIsNot(dp_misc::Order order, rtl::OUString const & version) {
+    rtl::OUString oooVersion(
         RTL_CONSTASCII_USTRINGPARAM(
             "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("version")
             ":Version:OOOPackageVersion}"));
-    ::rtl::Bootstrap::expandMacros(aVersion);
-    return ::dp_misc::compareVersions(aVersion, i_rVersion) != i_eOrder;
+    rtl::Bootstrap::expandMacros(oooVersion); //TODO: check for failure
+    return dp_misc::compareVersions(oooVersion, version) != order;
 }
 
-bool satisfiesMinimalVersion(::rtl::OUString const& i_rVersion)
-{
-    return lcl_versionIsNot(dp_misc::LESS, i_rVersion);
+bool satisfiesMinimalVersion(rtl::OUString const & version) {
+    return versionIsNot(dp_misc::LESS, version);
 }
 
-bool satisfiesMaximalVersion(::rtl::OUString const& i_rVersion)
+bool satisfiesMaximalVersion(rtl::OUString const & version) {
+    return versionIsNot(dp_misc::GREATER, version);
+}
+
+rtl::OUString produceErrorText(
+    rtl::OUString const & reason, rtl::OUString const & version)
 {
-    return lcl_versionIsNot(dp_misc::GREATER, i_rVersion);
+    rtl::OUString buf(
+        comphelper::string::searchAndReplaceAsciiL(
+            reason, RTL_CONSTASCII_STRINGPARAM("%VERSION"),
+            (version.isEmpty()
+             ? ResId::toString(
+                 dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN))
+             : version)));
+    return comphelper::string::searchAndReplaceAsciiL(
+        buf, RTL_CONSTASCII_STRINGPARAM("%PRODUCTNAME"),
+        utl::ConfigManager::GetDirectConfigProperty(
+            utl::ConfigManager::PRODUCTNAME).get< rtl::OUString >());
+        //TODO: can fail if the replacement of "%VERSION" introduces an
+        // instance of "%PRODUCTNAME" into the string
 }
 
 }
@@ -85,44 +102,44 @@ namespace dp_misc {
 namespace Dependencies {
 
 css::uno::Sequence< css::uno::Reference< css::xml::dom::XElement > >
-check(::dp_misc::DescriptionInfoset const & infoset) {
+check(dp_misc::DescriptionInfoset const & infoset) {
     css::uno::Reference< css::xml::dom::XNodeList > deps(
         infoset.getDependencies());
-    ::sal_Int32 n = deps->getLength();
+    sal_Int32 n = deps->getLength();
     css::uno::Sequence< css::uno::Reference< css::xml::dom::XElement > >
         unsatisfied(n);
-    ::sal_Int32 unsat = 0;
-    for (::sal_Int32 i = 0; i < n; ++i) {
-        static rtl::OUString const minimalVersion(
-                RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org-minimal-version"));
+    sal_Int32 unsat = 0;
+    for (sal_Int32 i = 0; i < n; ++i) {
         css::uno::Reference< css::xml::dom::XElement > e(
             deps->item(i), css::uno::UNO_QUERY_THROW);
         bool sat = false;
         if (e->getNamespaceURI().equalsAsciiL(
                 RTL_CONSTASCII_STRINGPARAM(xmlNamespace))
-            && (e->getTagName() == minimalVersion))
+            && e->getTagName().equalsAsciiL(
+                RTL_CONSTASCII_STRINGPARAM(minimalVersion)))
         {
             sat = satisfiesMinimalVersion(
                 e->getAttribute(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value"))));
+                    rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value"))));
         } else if (e->getNamespaceURI().equalsAsciiL(
                        RTL_CONSTASCII_STRINGPARAM(xmlNamespace))
                    && e->getTagName().equalsAsciiL(
-                       RTL_CONSTASCII_STRINGPARAM(
-                           "OpenOffice.org-maximal-version")))
+                       RTL_CONSTASCII_STRINGPARAM(maximalVersion)))
         {
             sat = satisfiesMaximalVersion(
                     e->getAttribute(
-                        ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value"))));
+                        rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value"))));
         } else if (e->hasAttributeNS(
-                       ::rtl::OUString(
+                       rtl::OUString(
                            RTL_CONSTASCII_USTRINGPARAM(xmlNamespace)),
-                        minimalVersion))
+                       rtl::OUString(
+                           RTL_CONSTASCII_USTRINGPARAM(minimalVersion))))
         {
             sat = satisfiesMinimalVersion(
                 e->getAttributeNS(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(xmlNamespace)),
-                    minimalVersion));
+                    rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(xmlNamespace)),
+                    rtl::OUString(
+                        RTL_CONSTASCII_USTRINGPARAM(minimalVersion))));
         }
         if (!sat) {
             unsatisfied[unsat++] = e;
@@ -132,45 +149,41 @@ check(::dp_misc::DescriptionInfoset const & infoset) {
     return unsatisfied;
 }
 
-::rtl::OUString getErrorText( css::uno::Reference< css::xml::dom::XElement > const & dependency )
+rtl::OUString getErrorText(
+    css::uno::Reference< css::xml::dom::XElement > const & dependency)
 {
-    ::rtl::OUString sReason;
-    ::rtl::OUString sValue;
-    ::rtl::OUString sVersion(RTL_CONSTASCII_USTRINGPARAM("%VERSION"));
-    ::rtl::OUString sProductName(RTL_CONSTASCII_USTRINGPARAM("%PRODUCTNAME"));
-
-    if ( dependency->getNamespaceURI().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( xmlNamespace ) )
-         && dependency->getTagName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OpenOffice.org-minimal-version" ) ) )
+    OSL_ASSERT(dependency.is());
+    if (dependency->getNamespaceURI().equalsAsciiL(
+            RTL_CONSTASCII_STRINGPARAM(xmlNamespace))
+        && dependency->getTagName().equalsAsciiL(
+            RTL_CONSTASCII_STRINGPARAM(minimalVersion)))
     {
-        sValue = dependency->getAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "value" ) ) );
-        sReason = ::rtl::OUString( ::String(::dp_misc::getResId(RID_DEPLYOMENT_DEPENDENCIES_MIN)) );
-    }
-    else if ( dependency->getNamespaceURI().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( xmlNamespace ) )
-              && dependency->getTagName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OpenOffice.org-maximal-version" ) ) )
+        return produceErrorText(
+            ResId::toString(dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_MIN)),
+            dependency->getAttribute(
+                rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value"))));
+    } else if (dependency->getNamespaceURI().equalsAsciiL(
+                   RTL_CONSTASCII_STRINGPARAM(xmlNamespace))
+               && dependency->getTagName().equalsAsciiL(
+                   RTL_CONSTASCII_STRINGPARAM(maximalVersion)))
     {
-        sValue = dependency->getAttribute( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value") ) );
-        sReason = ::rtl::OUString( ::String(::dp_misc::getResId(RID_DEPLYOMENT_DEPENDENCIES_MAX)) );
-    }
-    else if ( dependency->hasAttributeNS( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( xmlNamespace ) ),
-                                          ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenOffice.org-minimal-version" ))))
+        return produceErrorText(
+            ResId::toString(dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_MAX)),
+            dependency->getAttribute(
+                rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value"))));
+    } else if (dependency->hasAttributeNS(
+                   rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(xmlNamespace)),
+                   rtl::OUString(
+                       RTL_CONSTASCII_USTRINGPARAM(minimalVersion))))
     {
-        sValue = dependency->getAttributeNS( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( xmlNamespace ) ),
-                                             ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenOffice.org-minimal-version" ) ) );
-        sReason = ::rtl::OUString( ::String(::dp_misc::getResId(RID_DEPLYOMENT_DEPENDENCIES_MIN)) );
-    }
-    else
-        return ::rtl::OUString( ::String(::dp_misc::getResId(RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN)) );
-
-    if ( sValue.getLength() == 0 )
-        sValue = ::rtl::OUString( ::String(::dp_misc::getResId(RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN)) );
-
-    sal_Int32 nPos = sReason.indexOf( sVersion );
-    if ( nPos >= 0 )
-        sReason = sReason.replaceAt( nPos, sVersion.getLength(), sValue );
-    nPos = sReason.indexOf( sProductName );
-    if ( nPos >= 0 )
-        sReason = sReason.replaceAt( nPos, sProductName.getLength(), BrandName::get() );
-    return sReason;
+        return produceErrorText(
+            ResId::toString(dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_MIN)),
+            dependency->getAttributeNS(
+                rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(xmlNamespace)),
+                rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(minimalVersion))));
+    } else
+        return ResId::toString(
+            dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN));
 }
 
 }
diff --git a/desktop/source/deployment/misc/dp_misc.src b/desktop/source/deployment/misc/dp_misc.src
index d18fc4c..1dcc77d 100644
--- a/desktop/source/deployment/misc/dp_misc.src
+++ b/desktop/source/deployment/misc/dp_misc.src
@@ -27,14 +27,14 @@
 
 #include "dp_misc.hrc"
 
-String RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN {
+String RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN {
     Text[en-US] = "Unknown";
 };
 
-String RID_DEPLYOMENT_DEPENDENCIES_MIN {
+String RID_DEPLOYMENT_DEPENDENCIES_MIN {
     Text[en-US] = "Extension requires at least %PRODUCTNAME %VERSION";
 };
 
-String RID_DEPLYOMENT_DEPENDENCIES_MAX {
+String RID_DEPLOYMENT_DEPENDENCIES_MAX {
     Text[en-US] = "Extension doesn't support versions greater than: %PRODUCTNAME %VERSION";
 };


More information about the Libreoffice-commits mailing list