summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-04-23 16:19:36 +0200
committersb <sb@openoffice.org>2010-04-23 16:19:36 +0200
commit0a877b39fdd26f6fcd5706912569b83daf3fb67d (patch)
tree571b0aef40b0494463a0439931d716a4f61cbb87 /desktop/source
parent86f5f0bdb3f3bf45d4a2095bdd81d66123b97f62 (diff)
sb122: #i110548# backed out new extension dependency deployment-repositories again (introduced in -c 3b28615890d2); not needed after all
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx2
-rw-r--r--desktop/source/deployment/inc/dp_dependencies.hxx7
-rw-r--r--desktop/source/deployment/manager/dp_informationprovider.cxx2
-rw-r--r--desktop/source/deployment/misc/dp_dependencies.cxx88
-rw-r--r--desktop/source/deployment/misc/dp_misc.src12
-rw-r--r--desktop/source/deployment/registry/inc/dp_backend.h2
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx3
7 files changed, 5 insertions, 111 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 9097cdcf63a4..61479f799e6f 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -521,7 +521,7 @@ bool UpdateDialog::Thread::update(
dp_misc::DescriptionInfoset infoset(m_context, updateInfo);
OSL_ASSERT(infoset.getVersion().getLength() != 0);
css::uno::Sequence< css::uno::Reference< css::xml::dom::XElement > > ds(
- dp_misc::Dependencies::check(infoset, packageManager->getContext()));
+ dp_misc::Dependencies::check(infoset));
UpdateDialog::DisabledUpdate du;
du.aUpdateInfo = updateInfo;
diff --git a/desktop/source/deployment/inc/dp_dependencies.hxx b/desktop/source/deployment/inc/dp_dependencies.hxx
index 65e9c9dd6b4a..13be1e8612fb 100644
--- a/desktop/source/deployment/inc/dp_dependencies.hxx
+++ b/desktop/source/deployment/inc/dp_dependencies.hxx
@@ -53,9 +53,6 @@ namespace Dependencies {
@param infoset
the infoset containing the dependencies to check
- @param repository
- the repository into which to deploy
-
@return
a list of the unsatisfied dependencies from <code>infoset</code> (in no
specific order)
@@ -63,9 +60,7 @@ namespace Dependencies {
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,
- ::rtl::OUString const & repository);
+ check(::dp_misc::DescriptionInfoset const & infoset);
/**
Obtain the (human-readable) error message of a failed dependency.
diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx
index 6267135e0d55..9f2e0c9e1177 100644
--- a/desktop/source/deployment/manager/dp_informationprovider.cxx
+++ b/desktop/source/deployment/manager/dp_informationprovider.cxx
@@ -387,7 +387,7 @@ uno::Sequence< uno::Sequence< rtl::OUString > >
if (*id2 == id)
{
// check, if there are unsatisfied dependencies and ignore those updates
- uno::Sequence< uno::Reference< xml::dom::XElement > > ds( dp_misc::Dependencies::check( infoset, _xManager->getContext() ) );
+ uno::Sequence< uno::Reference< xml::dom::XElement > > ds( dp_misc::Dependencies::check( infoset ) );
if ( ds.getLength() )
continue;
diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx
index e5a81f4528f9..9534f166f2f0 100644
--- a/desktop/source/deployment/misc/dp_dependencies.cxx
+++ b/desktop/source/deployment/misc/dp_dependencies.cxx
@@ -65,37 +65,6 @@ bool satisfiesMinimalVersion(::rtl::OUString const & version) {
return ::dp_misc::compareVersions(v, version) != ::dp_misc::LESS;
}
-bool contains(::rtl::OUString const & list, ::rtl::OUString const & element) {
- for (::sal_Int32 i = 0;;) {
- ::sal_Int32 n = i;
- i = list.indexOf(',', i);
- if (i == -1) {
- i = list.getLength();
- }
- if (list.copy(n, i) == element) {
- return true;
- }
- if (i == list.getLength()) {
- return false;
- }
- ++i;
- }
-}
-
-bool checkDeploymentRepositories(
- css::uno::Reference< css::xml::dom::XElement > const & dependency,
- ::rtl::OUString const & repository)
-{
- css::uno::Reference< css::xml::dom::XAttr > sup(
- dependency->getAttributeNode(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("supported"))));
- css::uno::Reference< css::xml::dom::XAttr > notSup(
- dependency->getAttributeNode(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("not-supported"))));
- return (!sup.is() || contains(sup->getValue(), repository)) &&
- !(notSup.is() && contains(notSup->getValue(), repository));
-}
-
}
namespace dp_misc {
@@ -103,10 +72,7 @@ namespace dp_misc {
namespace Dependencies {
css::uno::Sequence< css::uno::Reference< css::xml::dom::XElement > >
-check(
- ::dp_misc::DescriptionInfoset const & infoset,
- ::rtl::OUString const & repository)
-{
+check(::dp_misc::DescriptionInfoset const & infoset) {
css::uno::Reference< css::xml::dom::XNodeList > deps(
infoset.getDependencies());
::sal_Int32 n = deps->getLength();
@@ -143,12 +109,6 @@ check(
e->getAttribute(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value"))))
!= ::dp_misc::GREATER;
- } else if (e->getNamespaceURI().equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM(xmlNamespace))
- && e->getTagName().equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("deployment-repositories")))
- {
- sat = checkDeploymentRepositories(e, repository);
} else if (e->hasAttributeNS(
::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(xmlNamespace)),
@@ -187,52 +147,6 @@ check(
sValue = dependency->getAttribute( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value") ) );
sReason = ::rtl::OUString( ::String(::dp_misc::getResId(RID_DEPLYOMENT_DEPENDENCIES_MAX)) );
}
- else if (dependency->getNamespaceURI().equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM(xmlNamespace)) &&
- dependency->getTagName().equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("deployment-repositories")))
- {
- css::uno::Reference< css::xml::dom::XAttr > sup(
- dependency->getAttributeNode(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("supported"))));
- css::uno::Reference< css::xml::dom::XAttr > notSup(
- dependency->getAttributeNode(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("not-supported"))));
- sValue = ::String(
- ::dp_misc::getResId(
- sup.is()
- ? (notSup.is()
- ? RID_DEPLOYMENT_DEPENDENCIES_REPO_BOTH
- : RID_DEPLOYMENT_DEPENDENCIES_REPO_POS)
- : (notSup.is()
- ? RID_DEPLOYMENT_DEPENDENCIES_REPO_NEG
- : RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN)));
- ::rtl::OUStringBuffer buf;
- for (::sal_Int32 i = 0;;) {
- ::sal_Int32 j = sValue.indexOf('%', i);
- if (j == -1) {
- buf.append(sValue.copy(i));
- break;
- }
- if (sup.is() &&
- sValue.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("POS"), j + 1))
- {
- buf.append(sValue.copy(i, j - i));
- buf.append(sup->getValue());
- i = j + RTL_CONSTASCII_LENGTH("%POS");
- } else if (notSup.is() &&
- sValue.matchAsciiL(
- RTL_CONSTASCII_STRINGPARAM("NEG"), j + 1))
- {
- buf.append(sValue.copy(i, j - i));
- buf.append(notSup->getValue());
- i = j + RTL_CONSTASCII_LENGTH("%NEG");
- } else {
- i = j + 1;
- }
- }
- return buf.makeStringAndClear();
- }
else if ( dependency->hasAttributeNS( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( xmlNamespace ) ),
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenOffice.org-minimal-version" ))))
{
diff --git a/desktop/source/deployment/misc/dp_misc.src b/desktop/source/deployment/misc/dp_misc.src
index 6dada0178978..0d341122af16 100644
--- a/desktop/source/deployment/misc/dp_misc.src
+++ b/desktop/source/deployment/misc/dp_misc.src
@@ -38,15 +38,3 @@ String RID_DEPLYOMENT_DEPENDENCIES_MIN {
String RID_DEPLYOMENT_DEPENDENCIES_MAX {
Text[en-US] = "Extension doesn't support versions greater than: OpenOffice.org %VERSION";
};
-
-String RID_DEPLOYMENT_DEPENDENCIES_REPO_POS {
- Text[en-US] = "Extension can only be deployed to repositories \"%POS\"";
-};
-
-String RID_DEPLOYMENT_DEPENDENCIES_REPO_NEG {
- Text[en-US] = "Extension can not be deployed to repositories \"%NEG\"";
-};
-
-String RID_DEPLOYMENT_DEPENDENCIES_REPO_BOTH {
- Text[en-US] = "Extension can be deployed to repositories \"%POS\" but not to \"%NEG\"";
-};
diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h
index fdf950434395..fe52c8ffc7e3 100644
--- a/desktop/source/deployment/registry/inc/dp_backend.h
+++ b/desktop/source/deployment/registry/inc/dp_backend.h
@@ -299,8 +299,6 @@ public:
inline ::rtl::OUString const & getCachePath() const { return m_cachePath; }
inline bool transientMode() const { return m_cachePath.getLength() == 0; }
- inline ::rtl::OUString getContext() const {return m_context; }
-
// XEventListener
virtual void SAL_CALL disposing( css::lang::EventObject const & evt )
throw (css::uno::RuntimeException);
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 2008edc26713..e45f7fb7ef73 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -553,8 +553,7 @@ bool BackendImpl::PackageImpl::checkDependencies(
dp_misc::Dependencies::check(
DescriptionInfoset(
getMyBackend()->getComponentContext(),
- description.getRootElement()),
- getMyBackend()->getContext()));
+ description.getRootElement())));
if (unsatisfied.getLength() == 0) {
return true;
} else {