[Libreoffice-commits] core.git: desktop/source
Stephan Bergmann
sbergman at redhat.com
Thu Feb 7 06:43:02 PST 2013
desktop/source/deployment/manager/dp_extensionmanager.cxx | 22 +-------------
1 file changed, 3 insertions(+), 19 deletions(-)
New commits:
commit 57955e1961181ffe7e77c23da7fb73db5d545f4c
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Feb 7 15:37:57 2013 +0100
Revert "Cleanly remove an extension again that cannot be activated while installing it"
This reverts commit 3c71fa1e5ee6cd83f713c65a372006bc3aef0953. There are cases
(like failure to install a per-user extension during upgrade), where the user
may want to still see the broken extension in the Extension Manager, instead of
it "disappearing completely." A better fix would be to roll back registration
of the broken extension completely, so that "unopkg list" would not list the
first half of its parts as "is registered: yes" and the second half as "is
registered: no."
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index 194dd87..9add425 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -693,10 +693,6 @@ Reference<deploy::XPackage> ExtensionManager::addExtension(
xOldExtension );
{
- bool added = false;
- OUString sNewExtensionIdentifier;
- OUString sNewExtensionFileName;
-
// In this garded section (getMutex) we must not use the argument xCmdEnv
// because it may bring up dialogs (XInteractionHandler::handle) this
//may potententially deadlock. See issue
@@ -741,7 +737,6 @@ Reference<deploy::XPackage> ExtensionManager::addExtension(
xNewExtension = xPackageManager->addPackage(
url, properties, OUString(), xAbortChannel,
Reference<ucb::XCommandEnvironment>());
- added = true;
//If we add a user extension and there is already one which was
//disabled by a user, then the newly installed one is enabled. If we
//add to another repository then the user extension remains
@@ -750,8 +745,9 @@ Reference<deploy::XPackage> ExtensionManager::addExtension(
if (repository == "user")
bUserDisabled2 = false;
- sNewExtensionIdentifier = dp_misc::getIdentifier(xNewExtension);
- sNewExtensionFileName = xNewExtension->getName();
+ // pass the two values via variables to workaround gcc-4.3.4 specific bug (bnc#655912)
+ OUString sNewExtensionIdentifier = dp_misc::getIdentifier(xNewExtension);
+ OUString sNewExtensionFileName = xNewExtension->getName();
activateExtension(
sNewExtensionIdentifier, sNewExtensionFileName,
@@ -796,18 +792,6 @@ Reference<deploy::XPackage> ExtensionManager::addExtension(
//If the user aborted installation then a ucb::CommandAbortedException
//is thrown.
//Use a private AbortChannel so the user cannot interrupt.
- if (added) {
- try {
- xPackageManager->removePackage(
- sNewExtensionIdentifier, sNewExtensionFileName,
- css::uno::Reference< css::task::XAbortChannel >(),
- css::uno::Reference< css::ucb::XCommandEnvironment >());
- } catch (css::uno::Exception & e) {
- SAL_WARN(
- "desktop.deployment",
- "ignoring Exception " << e.Message);
- }
- }
try
{
if (xExtensionBackup.is())
More information about the Libreoffice-commits
mailing list