[Libreoffice-commits] .: 5 commits - desktop/source offapi/com reportbuilder/util scripting/java swext/mediawiki

Stephan Bergmann sbergmann at kemper.freedesktop.org
Thu Apr 26 07:07:32 PDT 2012


 desktop/source/deployment/manager/dp_extensionmanager.cxx                                         |   10 +++++-----
 desktop/source/deployment/manager/dp_manager.cxx                                                  |    6 +++---
 desktop/source/deployment/registry/dp_backend.cxx                                                 |    3 ++-
 desktop/source/deployment/registry/inc/dp_backend.h                                               |    1 +
 desktop/source/deployment/registry/package/dp_package.cxx                                         |    5 +++--
 desktop/source/deployment/registry/script/dp_script.cxx                                           |    4 ++--
 offapi/com/sun/star/deployment/XPackage.idl                                                       |    5 +++++
 reportbuilder/util/makefile.mk                                                                    |    2 +-
 scripting/java/ScriptProviderForBeanShell.component                                               |    2 +-
 scripting/java/ScriptProviderForJavaScript.component                                              |    2 +-
 scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java   |   10 +++++-----
 scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java |    8 ++++----
 swext/mediawiki/src/description.xml                                                               |    2 +-
 13 files changed, 34 insertions(+), 26 deletions(-)

New commits:
commit fdbc6b768c4f16c3f83e95c68f81fc4fcba74af2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Apr 26 16:06:30 2012 +0200

    Do not accidentally instantiate other exts when removing exts at startup

diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index 2e22863..e5a16b7 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -464,7 +464,7 @@ void ExtensionManager::activateExtension(
             //Check if this is a disabled user extension,
             if (i == 0 && bUserDisabled)
             {
-                   aExt->revokePackage(xAbortChannel, xCmdEnv);
+                   aExt->revokePackage(bStartup, xAbortChannel, xCmdEnv);
                    continue;
             }
 
@@ -473,7 +473,7 @@ void ExtensionManager::activateExtension(
             //repositories with a lower priority
             if (bActive)
             {
-                aExt->revokePackage(xAbortChannel, xCmdEnv);
+                aExt->revokePackage(bStartup, xAbortChannel, xCmdEnv);
             }
             else
             {
@@ -694,7 +694,7 @@ Reference<deploy::XPackage> ExtensionManager::addExtension(
                     try
                     {
                         xOldExtension->revokePackage(
-                            xAbortChannel, Reference<ucb::XCommandEnvironment>());
+                            false, xAbortChannel, Reference<ucb::XCommandEnvironment>());
                         //save the old user extension in case the user aborts
                         //store the extension in the tmp repository, this will overwrite
                         //xTmpPackage (same identifier). Do not let the user abort or
@@ -873,7 +873,7 @@ void ExtensionManager::removeExtension(
         Reference<deploy::XPackage> xOldExtension =
             xPackageManager->getDeployedPackage(
                 identifier, fileName, xCmdEnv);
-        xOldExtension->revokePackage(xAbortChannel, xCmdEnv);
+        xOldExtension->revokePackage(false, xAbortChannel, xCmdEnv);
 
         xPackageManager->removePackage(
             identifier, fileName, xAbortChannel, xCmdEnv);
@@ -1024,7 +1024,7 @@ sal_Int32 ExtensionManager::checkPrerequisitesAndEnable(
         if (ret)
         {
             //There are some unfulfilled prerequisites, try to revoke
-            extension->revokePackage(xAbortChannel, xCmdEnv);
+            extension->revokePackage(false, xAbortChannel, xCmdEnv);
         }
         const OUString id(dp_misc::getIdentifier(extension));
         activateExtension(id, extension->getName(),
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 3fbe04e..cda94fb 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -1322,7 +1322,7 @@ bool PackageManagerImpl::synchronizeRemovedExtensions(
                 Reference<deployment::XPackage> xPackage = m_xRegistry->bindPackage(
                     url, i->second.mediaType, true, i->first, xCmdEnv );
                 OSL_ASSERT(xPackage.is()); //Even if the files are removed, we must get the object.
-                xPackage->revokePackage(xAbortChannel, xCmdEnv);
+                xPackage->revokePackage(true, xAbortChannel, xCmdEnv);
                 removePackage(xPackage->getIdentifier().Value, xPackage->getName(),
                               xAbortChannel, xCmdEnv);
                 bModified |= true;
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index 7b654d3..16bc5d1 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -726,13 +726,14 @@ void Package::registerPackage(
 
 //______________________________________________________________________________
 void Package::revokePackage(
+    sal_Bool startup,
     Reference<task::XAbortChannel> const & xAbortChannel,
     Reference<XCommandEnvironment> const & xCmdEnv )
     throw (deployment::DeploymentException,
            CommandFailedException, CommandAbortedException,
            lang::IllegalArgumentException, RuntimeException)
 {
-    processPackage_impl( false /* revoke */, false, xAbortChannel, xCmdEnv );
+    processPackage_impl( false /* revoke */, startup, xAbortChannel, xCmdEnv );
 
 }
 
diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h
index e8ddb0b..9fb0595 100644
--- a/desktop/source/deployment/registry/inc/dp_backend.h
+++ b/desktop/source/deployment/registry/inc/dp_backend.h
@@ -204,6 +204,7 @@ public:
                css::ucb::CommandAbortedException,
                css::lang::IllegalArgumentException, css::uno::RuntimeException);
     virtual void SAL_CALL revokePackage(
+        sal_Bool startup,
         css::uno::Reference<css::task::XAbortChannel> const & xAbortChannel,
         css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv )
         throw (css::deployment::DeploymentException,
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 81b8805..c415924 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -909,7 +909,7 @@ void BackendImpl::PackageImpl::processPackage_(
                     {
                         try {
                             bundle[ pos ]->revokePackage(
-                                xSubAbortChannel, xCmdEnv );
+                                startup, xSubAbortChannel, xCmdEnv );
                         }
                         catch (const Exception &)
                         {
@@ -950,7 +950,8 @@ void BackendImpl::PackageImpl::processPackage_(
                 xPackage->createAbortChannel() );
             AbortChannel::Chain chain( abortChannel, xSubAbortChannel );
             try {
-                bundle[ pos ]->revokePackage( xSubAbortChannel, xCmdEnv );
+                bundle[ pos ]->revokePackage(
+                    startup, xSubAbortChannel, xCmdEnv );
             }
             catch (const RuntimeException &) {
                 throw;
diff --git a/desktop/source/deployment/registry/script/dp_script.cxx b/desktop/source/deployment/registry/script/dp_script.cxx
index 3b6be7c..df1923d 100644
--- a/desktop/source/deployment/registry/script/dp_script.cxx
+++ b/desktop/source/deployment/registry/script/dp_script.cxx
@@ -398,7 +398,7 @@ void BackendImpl::PackageImpl::processPackage_(
     bool bDialog = !m_dialogURL.isEmpty();
     Reference<css::script::XLibraryContainer3> xDialogLibs;
 
-    bool bRunning = office_is_running();
+    bool bRunning = !startup && office_is_running();
     if( bRunning )
     {
         if( bScript )
@@ -457,7 +457,7 @@ void BackendImpl::PackageImpl::processPackage_(
         bDialogSuccess = lcl_maybeAddScript(bDialog, m_dialogName, m_dialogURL, xDialogLibs);
     }
     bool bSuccess = bScript || bDialog;     // Something must have happened
-    if( bRunning && !startup)
+    if( bRunning )
         if( (bScript && !bScriptSuccess) || (bDialog && !bDialogSuccess) )
             bSuccess = false;
 
diff --git a/offapi/com/sun/star/deployment/XPackage.idl b/offapi/com/sun/star/deployment/XPackage.idl
index 663f51a..2489ad0 100644
--- a/offapi/com/sun/star/deployment/XPackage.idl
+++ b/offapi/com/sun/star/deployment/XPackage.idl
@@ -166,6 +166,10 @@ interface XPackage
 
         NEVER call this directly. This is done by the extension manager if necessary.
 
+        @param startup
+               indicates that registration is adapted to the particular
+               startup scenario. That is, it is set to <TRUE/>, when called
+               from <member>XExtensionManager::synchronize</member>
         @param xAbortChannel
                abort channel to asynchronously abort the registration process,
                or <NULL/>
@@ -173,6 +177,7 @@ interface XPackage
                command environment for error and progress handling
     */
     void revokePackage(
+        [in] boolean startup,
         [in] com::sun::star::task::XAbortChannel xAbortChannel,
         [in] com::sun::star::ucb::XCommandEnvironment xCmdEnv )
         raises (DeploymentException,
commit e613da167699c6231e6fa27ce50c422c926855f0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Apr 26 15:57:34 2012 +0200

    Improved error reporting

diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index ec2c40a..3fbe04e 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -1328,9 +1328,9 @@ bool PackageManagerImpl::synchronizeRemovedExtensions(
                 bModified |= true;
             }
         }
-        catch( const uno::Exception & )
+        catch( const uno::Exception & e )
         {
-            OSL_ASSERT(0);
+            SAL_WARN("desktop.deployment", e.Message);
         }
     }
     return bModified;
commit 03511802da45182d3fe85aa0eb7882298c586794
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Apr 26 15:51:28 2012 +0200

    Change implementation names of script providers...
    
    ...that are no longer bundled extensions.  Otherwise, old user data where these
    were still recorded as bundled extensions could cause execeptions at start up
    about duplicate implementations.

diff --git a/scripting/java/ScriptProviderForBeanShell.component b/scripting/java/ScriptProviderForBeanShell.component
index fe040d7..288e38a 100644
--- a/scripting/java/ScriptProviderForBeanShell.component
+++ b/scripting/java/ScriptProviderForBeanShell.component
@@ -28,7 +28,7 @@
 
 <component loader="com.sun.star.loader.Java2"
     xmlns="http://openoffice.org/2010/uno-components">
-  <implementation name="com.sun.star.script.framework.provider.beanshell.ScriptProviderForBeanShell$_ScriptProviderForBeanShell">
+  <implementation name="com.sun.star.script.framework.provider.beanshell.ScriptProviderForBeanShell$ScriptProviderForBeanShell_2">
     <service name="com.sun.star.script.browse.BrowseNode"/>
     <service name="com.sun.star.script.provider.LanguageScriptProvider"/>
     <service name="com.sun.star.script.provider.ScriptProvider"/>
diff --git a/scripting/java/ScriptProviderForJavaScript.component b/scripting/java/ScriptProviderForJavaScript.component
index e9725d8..6d1e0fa 100644
--- a/scripting/java/ScriptProviderForJavaScript.component
+++ b/scripting/java/ScriptProviderForJavaScript.component
@@ -28,7 +28,7 @@
 
 <component loader="com.sun.star.loader.Java2"
     xmlns="http://openoffice.org/2010/uno-components">
-  <implementation name="com.sun.star.script.framework.provider.javascript.ScriptProviderForJavaScript$_ScriptProviderForJavaScript">
+  <implementation name="com.sun.star.script.framework.provider.javascript.ScriptProviderForJavaScript$ScriptProviderForJavaScript_2">
     <service name="com.sun.star.script.browse.BrowseNode"/>
     <service name="com.sun.star.script.provider.LanguageScriptProvider"/>
     <service name="com.sun.star.script.provider.ScriptProvider"/>
diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
index 5e3fb7e..e41646c 100644
--- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
+++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
@@ -58,9 +58,9 @@ import com.sun.star.script.framework.container.ScriptMetaData;
 
 public class ScriptProviderForBeanShell
 {
-    public static class _ScriptProviderForBeanShell extends ScriptProvider
+    public static class ScriptProviderForBeanShell_2 extends ScriptProvider
     {
-        public _ScriptProviderForBeanShell(XComponentContext ctx)
+        public ScriptProviderForBeanShell_2(XComponentContext ctx)
         {
             super (ctx, "BeanShell");
         }
@@ -112,10 +112,10 @@ public class ScriptProviderForBeanShell
     {
         XSingleServiceFactory xSingleServiceFactory = null;
 
-        if ( implName.equals( ScriptProviderForBeanShell._ScriptProviderForBeanShell.class.getName() ) )
+        if ( implName.equals( ScriptProviderForBeanShell.ScriptProviderForBeanShell_2.class.getName() ) )
         {
             xSingleServiceFactory = FactoryHelper.getServiceFactory(
-                ScriptProviderForBeanShell._ScriptProviderForBeanShell.class,
+                ScriptProviderForBeanShell.ScriptProviderForBeanShell_2.class,
                 "com.sun.star.script.provider.ScriptProviderForBeanShell",
                 multiFactory,
                 regKey );
diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
index 39205d4..aea209c 100644
--- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
+++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
@@ -59,9 +59,9 @@ import org.mozilla.javascript.JavaScriptException;
 
 public class ScriptProviderForJavaScript
 {
-    public static class _ScriptProviderForJavaScript extends ScriptProvider
+    public static class ScriptProviderForJavaScript_2 extends ScriptProvider
     {
-        public _ScriptProviderForJavaScript(XComponentContext ctx)
+        public ScriptProviderForJavaScript_2(XComponentContext ctx)
         {
             super(ctx, "JavaScript");
         }
@@ -113,10 +113,10 @@ public class ScriptProviderForJavaScript
     {
         XSingleServiceFactory xSingleServiceFactory = null;
 
-        if ( implName.equals( ScriptProviderForJavaScript._ScriptProviderForJavaScript.class.getName() ) )
+        if ( implName.equals( ScriptProviderForJavaScript.ScriptProviderForJavaScript_2.class.getName() ) )
         {
             xSingleServiceFactory = FactoryHelper.getServiceFactory(
-                ScriptProviderForJavaScript._ScriptProviderForJavaScript.class,
+                ScriptProviderForJavaScript.ScriptProviderForJavaScript_2.class,
                 "com.sun.star.script.provider.ScriptProviderForJavaScript",
                 multiFactory,
                 regKey );
commit 2ac2e013bef6c041c54879ad154089dc606051ee
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Apr 26 15:50:55 2012 +0200

    Typo in service name
    
    ...detected now that the default service manager XContentEnumerationAccess
    no creates its own XServiceInfo instances.

diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
index 22a9ea8..5e3fb7e 100644
--- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
+++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
@@ -116,7 +116,7 @@ public class ScriptProviderForBeanShell
         {
             xSingleServiceFactory = FactoryHelper.getServiceFactory(
                 ScriptProviderForBeanShell._ScriptProviderForBeanShell.class,
-                "com.sun.star.script.ScriptProviderForBeanShell",
+                "com.sun.star.script.provider.ScriptProviderForBeanShell",
                 multiFactory,
                 regKey );
         }
commit fefd1b5f8ffd902e483decfecef80f3498b2d0a8
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Apr 26 15:15:27 2012 +0200

    Bump extension versions after changing to passive registration
    
    ...otherwise, if they are bundled, their per-user data is not regenerated, leading
    to inconsitencies.

diff --git a/reportbuilder/util/makefile.mk b/reportbuilder/util/makefile.mk
index d3cc505..4382800 100644
--- a/reportbuilder/util/makefile.mk
+++ b/reportbuilder/util/makefile.mk
@@ -28,7 +28,7 @@
 PRJ=..
 PRJNAME=reportbuilder
 TARGET=rpt
-EXTENSION_VERSION_BASE=1.2.1
+EXTENSION_VERSION_BASE=1.2.2
 
     EXTENSION_VERSION=$(EXTENSION_VERSION_BASE)
 
diff --git a/swext/mediawiki/src/description.xml b/swext/mediawiki/src/description.xml
index 11d10b5..6fef5ec 100644
--- a/swext/mediawiki/src/description.xml
+++ b/swext/mediawiki/src/description.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <description xmlns="http://openoffice.org/extensions/description/2006" xmlns:d="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink">
-    <version value="1.1.1"/>
+    <version value="1.1.2"/>
     <identifier value="com.sun.wiki-publisher"/>
     <display-name>
         <name lang="en-US">Wiki Publisher</name>


More information about the Libreoffice-commits mailing list