[Libreoffice-commits] .: 2 commits - desktop/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Nov 19 05:17:55 PST 2012
desktop/source/app/app.cxx | 2
desktop/source/app/check_ext_deps.cxx | 2
desktop/source/deployment/manager/dp_extensionmanager.cxx | 30 +++++++++++++-
3 files changed, 31 insertions(+), 3 deletions(-)
New commits:
commit d7c5f37d137041d7bc8abaed6b3a454899e9670f
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Nov 19 14:17:21 2012 +0100
Some clean-up
Change-Id: I02c56a86454b5ed6df29c3af60b3da2c7bd4b7e1
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 400da64..44821e5 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -221,7 +221,7 @@ void removeTree(OUString const & url) {
// com.sun.star.comp.deployment.component.PackageRegistryBackend/*.rdb files
// contained data nevertheless.
//
-// When a LO upgrade is detected (i.e., no/ user/extensions/bundled/buildid or
+// When a LO upgrade is detected (i.e., no user/extensions/bundled/buildid or
// one containing an old build ID), then user/extensions/bundled,
// user/extensions/shared, and user/uno_packages/cache/registry/
// com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc are
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index a6221a9..fcb2573 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -433,7 +433,7 @@ void Desktop::SynchronizeExtensionRepositories()
} else {
// reinstallDeployedExtensions above already calls syncRepositories
// internally:
- dp_misc::syncRepositories(m_bCleanedExtensionCache, silent);
+ dp_misc::syncRepositories(false, silent);
}
}
commit 6f9c3bc8edc93be07273d9de13dda19ea6c1da4a
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Nov 19 14:14:50 2012 +0100
fdo#57224: Preserve disabled-state across reinstallDeployedExtensions
Change-Id: I8d65b76fd93b63b51db88b7b09902ba64732dd97
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index 4ba5584..b0c65e0 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -65,6 +65,7 @@
#include <list>
#include <boost/unordered_map.hpp>
#include <algorithm>
+#include <set>
namespace deploy = com::sun::star::deployment;
namespace lang = com::sun::star::lang;
@@ -1234,6 +1235,31 @@ void ExtensionManager::reinstallDeployedExtensions(
Reference<deploy::XPackageManager>
xPackageManager = getPackageManager(repository);
+ std::set< OUString > disabledExts;
+ {
+ const uno::Sequence< Reference<deploy::XPackage> > extensions(
+ xPackageManager->getDeployedPackages(xAbortChannel, xCmdEnv));
+ for ( sal_Int32 pos = 0; pos < extensions.getLength(); ++pos )
+ {
+ try
+ {
+ beans::Optional< beans::Ambiguous< sal_Bool > > registered(
+ extensions[pos]->isRegistered(xAbortChannel, xCmdEnv));
+ if (!registered.IsPresent
+ || registered.Value.IsAmbiguous
+ || !registered.Value.Value)
+ {
+ const OUString id = dp_misc::getIdentifier(extensions[ pos ]);
+ OSL_ASSERT(!id.isEmpty());
+ disabledExts.insert(id);
+ }
+ }
+ catch (const lang::DisposedException &)
+ {
+ }
+ }
+ }
+
::osl::MutexGuard guard(getMutex());
xPackageManager->reinstallDeployedPackages(
force, xAbortChannel, xCmdEnv);
@@ -1250,7 +1276,9 @@ void ExtensionManager::reinstallDeployedExtensions(
const OUString id = dp_misc::getIdentifier(extensions[ pos ]);
const OUString fileName = extensions[ pos ]->getName();
OSL_ASSERT(!id.isEmpty());
- activateExtension(id, fileName, false, true, xAbortChannel, xCmdEnv );
+ activateExtension(
+ id, fileName, disabledExts.find(id) != disabledExts.end(),
+ true, xAbortChannel, xCmdEnv );
}
catch (const lang::DisposedException &)
{
More information about the Libreoffice-commits
mailing list