fdo#57224: Fix logic of considering optional/ambiguous value as "disabled"

...so that only a "not-registered" that is non-optional and non-ambiguous is
considered as "disabled" by user's intention.  Other combinations can occur for
broken extensions (that will thus become disabled again anyway when we try to
automatically enable them) and for originally enabled extensions for which
cleanExtensionCache in desktop/source/app/app.cxx has forecefully removed
user/uno_packages/cache/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc
(and which should rather be kept enabled).

Change-Id: Ic85b609ec9b3634cfa94a77151d42c07b9488030
This commit is contained in:
Stephan Bergmann
2012-11-19 16:06:43 +01:00
parent 8648c974ea
commit a05e1e4967

View File

@@ -1245,9 +1245,9 @@ void ExtensionManager::reinstallDeployedExtensions(
{
beans::Optional< beans::Ambiguous< sal_Bool > > registered(
extensions[pos]->isRegistered(xAbortChannel, xCmdEnv));
if (!registered.IsPresent
|| registered.Value.IsAmbiguous
|| !registered.Value.Value)
if (registered.IsPresent &&
!(registered.Value.IsAmbiguous ||
registered.Value.Value))
{
const OUString id = dp_misc::getIdentifier(extensions[ pos ]);
OSL_ASSERT(!id.isEmpty());