diff options
author | Joachim Lingner <jl@openoffice.org> | 2010-07-28 16:27:07 +0200 |
---|---|---|
committer | Joachim Lingner <jl@openoffice.org> | 2010-07-28 16:27:07 +0200 |
commit | 3d785d8443fcdb531570d827186b1161640350f4 (patch) | |
tree | cad0ea2b4a284a399fcece713de43e08c52620cd | |
parent | 528c08bd8d648cf1c2f9f4e38642146d3ee69dd0 (diff) |
jl154 #i113463# some comments and rollback even when runtime exception is thrown
-rw-r--r-- | desktop/source/deployment/manager/dp_extensionmanager.cxx | 8 | ||||
-rw-r--r-- | desktop/source/deployment/registry/package/dp_package.cxx | 22 |
2 files changed, 14 insertions, 16 deletions
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index 3cf6e48595..ab0baa78e3 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -1136,6 +1136,14 @@ sal_Bool ExtensionManager::synchronize( bModified |= m_bundledRepository->synchronize(xAbortChannel, xCmdEnv); progressBundled.update(OUSTR("\n\n")); + //Always determine the active extension. This is necessary for the + //first-start optimization. The setup creates the registration data for the + //bundled extensions (brand_layer/share/prereg/bundled), which is copied to the user + //installation (user_installation/extension/bundled) when a user starts OOo + //for the first time after running setup. All bundled extensions are registered + //at that moment. However, extensions with the same identifier can be in the + //shared or user repository, in which case the respective bundled extensions must + //be revoked. try { const uno::Sequence<uno::Sequence<Reference<deploy::XPackage> > > diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 649f85c8db..6209aad0d0 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -866,14 +866,10 @@ void BackendImpl::PackageImpl::processPackage_( try { xPackage->registerPackage( startup, xSubAbortChannel, xCmdEnv ); } - catch (RuntimeException &) { - throw; - } - catch (ucb::CommandAbortedException &) { - throw; - } - catch (Exception &) { - // CommandFailedException, DeploymentException: + catch (Exception &) + { + //We even try a rollback if the user cancelled the action (CommandAbortedException) + //in order to prevent invalid database entries. Any exc( ::cppu::getCaughtException() ); // try to handle exception, notify: bool approve = false, abort = false; @@ -904,14 +900,8 @@ void BackendImpl::PackageImpl::processPackage_( bundle[ pos ]->revokePackage( xSubAbortChannel, xCmdEnv ); } - catch (RuntimeException &) { - throw; - } - catch (ucb::CommandAbortedException &) { - throw; - } - catch (Exception &) { - // bundle rollback error: + catch (Exception &) + { OSL_ENSURE( 0, ::rtl::OUStringToOString( ::comphelper::anyToString( ::cppu::getCaughtException() ), |