diff options
Diffstat (limited to 'desktop/source/deployment')
8 files changed, 13 insertions, 105 deletions
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index f2a6fce0a0ff..68403f1af6cb 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -1258,64 +1258,6 @@ void ExtensionManager::reinstallDeployedExtensions( } } -/** Works on the bundled repository. That is using the variables - BUNDLED_EXTENSIONS and BUNDLED_EXTENSIONS_USER. - */ -void ExtensionManager::synchronizeBundledPrereg( - Reference<task::XAbortChannel> const & xAbortChannel, - Reference<ucb::XCommandEnvironment> const & xCmdEnv ) - throw (deploy::DeploymentException, - uno::RuntimeException) -{ - try - { - String sSynchronizingBundled(StrSyncRepository::get()); - sSynchronizingBundled.SearchAndReplaceAllAscii( "%NAME", OUSTR("bundled")); - dp_misc::ProgressLevel progressBundled(xCmdEnv, sSynchronizingBundled); - - Reference<deploy::XPackageManagerFactory> xPackageManagerFactory( - deploy::thePackageManagerFactory::get(m_xContext)); - - Reference<deploy::XPackageManager> xMgr = - xPackageManagerFactory->getPackageManager(OUSTR("bundled_prereg")); - xMgr->synchronize(xAbortChannel, xCmdEnv); - progressBundled.update(OUSTR("\n\n")); - - uno::Sequence<Reference<deploy::XPackage> > extensions = xMgr->getDeployedPackages( - xAbortChannel, xCmdEnv); - try - { - for (sal_Int32 i = 0; i < extensions.getLength(); i++) - { - extensions[i]->registerPackage(true, xAbortChannel, xCmdEnv); - } - } - catch (...) - { - OSL_ASSERT(0); - } - OUString lastSyncBundled(RTL_CONSTASCII_USTRINGPARAM( - "$BUNDLED_EXTENSIONS_PREREG/lastsynchronized")); - writeLastModified(lastSyncBundled, xCmdEnv); - - } catch ( const deploy::DeploymentException& ) { - throw; - } catch ( const ucb::CommandFailedException & ) { - throw; - } catch ( const ucb::CommandAbortedException & ) { - throw; - } catch (const lang::IllegalArgumentException &) { - throw; - } catch (const uno::RuntimeException &) { - throw; - } catch (...) { - uno::Any exc = ::cppu::getCaughtException(); - throw deploy::DeploymentException( - OUSTR("Extension Manager: exception in synchronize"), - static_cast<OWeakObject*>(this), exc); - } -} - sal_Bool ExtensionManager::synchronize( Reference<task::XAbortChannel> const & xAbortChannel, Reference<ucb::XCommandEnvironment> const & xCmdEnv ) @@ -1342,14 +1284,15 @@ sal_Bool ExtensionManager::synchronize( bModified |= getBundledRepository()->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. + //Always determine the active extension. + //TODO: Is this still necessary? (It used to be necessary for the + // first-start optimization: The setup created the registration data + // for the bundled extensions (share/prereg/bundled) which was copied to + // the user installation when a user started OOo for the first time + // after running setup. All bundled extensions were registered at that + // moment. However, extensions with the same identifier could be in the + // shared or user repository, in which case the respective bundled + // extensions had to be revoked.) try { const uno::Sequence<uno::Sequence<Reference<deploy::XPackage> > > diff --git a/desktop/source/deployment/manager/dp_extensionmanager.hxx b/desktop/source/deployment/manager/dp_extensionmanager.hxx index 800d91f437b6..0682aac1a832 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.hxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.hxx @@ -201,12 +201,6 @@ public: css::lang::IllegalArgumentException, css::uno::RuntimeException); - virtual void SAL_CALL synchronizeBundledPrereg( - css::uno::Reference<css::task::XAbortChannel> const & xAbortChannel, - css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv ) - throw (css::deployment::DeploymentException, - css::uno::RuntimeException); - virtual css::uno::Sequence<css::uno::Reference<css::deployment::XPackage> > SAL_CALL getExtensionsWithUnacceptedLicenses( ::rtl::OUString const & repository, diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index a088f516c8a7..7d919ed52385 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -391,24 +391,6 @@ Reference<deployment::XPackageManager> PackageManagerImpl::create( //No stamp file. We assume that bundled is always readonly. It must not be //modified from ExtensionManager but only by the installer } - else if ( context == "bundled_prereg" ) { - //This is a bundled repository but the registration data - //is in the brand layer: share/prereg - //It is special because the registration data are copied at the first startup - //into the user installation. The processed help and xcu files are not - //copied. Instead the backenddb.xml for the help backend references the help - //by using $BUNDLED_EXTENSION_PREREG instead $BUNDLED_EXTENSIONS_USER. The - //configmgr.ini also used $BUNDLED_EXTENSIONS_PREREG to refer to the xcu file - //which contain the replacement for %origin%. - that->m_activePackages = OUSTR( - "vnd.sun.star.expand:$BUNDLED_EXTENSIONS"); - that->m_registrationData = OUSTR( - "vnd.sun.star.expand:$BUNDLED_EXTENSIONS_PREREG"); - that->m_registryCache = OUSTR( - "vnd.sun.star.expand:$BUNDLED_EXTENSIONS_PREREG/registry"); - logFile = OUSTR( - "vnd.sun.star.expand:$BUNDLED_EXTENSIONS_PREREG/log.txt"); - } else if ( context == "tmp" ) { that->m_activePackages = OUSTR( "vnd.sun.star.expand:$TMP_EXTENSIONS/extensions"); @@ -989,8 +971,7 @@ OUString PackageManagerImpl::getDeployPath( ActivePackages::Data const & data ) //The bundled extensions are not contained in an additional folder //with a unique name. data.temporaryName contains already the //UTF8 encoded folder name. See PackageManagerImpl::synchronize - if (!m_context.equals(OUSTR("bundled")) - && !m_context.equals(OUSTR("bundled_prereg"))) + if (!m_context.equals(OUSTR("bundled"))) { buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("_/") ); buf.append( ::rtl::Uri::encode( data.fileName, rtl_UriCharClassPchar, diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index d28e3e9c62b2..b0fb42597a43 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -735,7 +735,6 @@ void BackendImpl::PackageImpl::processPackage_( //No need for live-deployment for bundled extension, because OOo //restarts after installation if (that->m_eContext != CONTEXT_BUNDLED - && that->m_eContext != CONTEXT_BUNDLED_PREREG && !startup) { if (m_isSchema) diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx index 13231ec4152d..a3979bcad890 100644 --- a/desktop/source/deployment/registry/dp_backend.cxx +++ b/desktop/source/deployment/registry/dp_backend.cxx @@ -102,8 +102,6 @@ PackageRegistryBackend::PackageRegistryBackend( m_eContext = CONTEXT_BUNDLED; else if ( m_context == "tmp" ) m_eContext = CONTEXT_TMP; - else if ( m_context == "bundled_prereg" ) - m_eContext = CONTEXT_BUNDLED_PREREG; else if (m_context.matchIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.tdoc:/") )) m_eContext = CONTEXT_DOCUMENT; diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx index a64193293011..17c056d6443b 100644 --- a/desktop/source/deployment/registry/executable/dp_executable.cxx +++ b/desktop/source/deployment/registry/executable/dp_executable.cxx @@ -256,8 +256,7 @@ void BackendImpl::ExecutablePackageImpl::processPackage_( else if (getMyBackend()->m_context.equals(OUSTR("shared"))) attributes |= (osl_File_Attribute_OwnExe | osl_File_Attribute_GrpExe | osl_File_Attribute_OthExe); - else if (!getMyBackend()->m_context.equals(OUSTR("bundled")) - && !getMyBackend()->m_context.equals(OUSTR("bundled_prereg"))) + else if (!getMyBackend()->m_context.equals(OUSTR("bundled"))) //Bundled extension are required to be in the properly //installed. That is an executable must have the right flags OSL_ASSERT(0); @@ -286,8 +285,7 @@ bool BackendImpl::ExecutablePackageImpl::isUrlTargetInExtension() sExtensionDir = dp_misc::expandUnoRcTerm(OUSTR("$UNO_USER_PACKAGES_CACHE")); else if (getMyBackend()->m_context.equals(OUSTR("shared"))) sExtensionDir = dp_misc::expandUnoRcTerm(OUSTR("$UNO_SHARED_PACKAGES_CACHE")); - else if (getMyBackend()->m_context.equals(OUSTR("bundled")) - || getMyBackend()->m_context.equals(OUSTR("bundled_prereg"))) + else if (getMyBackend()->m_context.equals(OUSTR("bundled"))) sExtensionDir = dp_misc::expandUnoRcTerm(OUSTR("$BUNDLED_EXTENSIONS")); else OSL_ASSERT(0); diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h index b4dff980aa68..d9a3e0b0bfbc 100644 --- a/desktop/source/deployment/registry/inc/dp_backend.h +++ b/desktop/source/deployment/registry/inc/dp_backend.h @@ -300,7 +300,7 @@ protected: // currently only for library containers: enum { CONTEXT_UNKNOWN, - CONTEXT_USER, CONTEXT_SHARED,CONTEXT_BUNDLED, CONTEXT_TMP, CONTEXT_BUNDLED_PREREG, + CONTEXT_USER, CONTEXT_SHARED,CONTEXT_BUNDLED, CONTEXT_TMP, CONTEXT_DOCUMENT } m_eContext; bool m_readOnly; diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx index a7f5cdfa0f28..5741ccc2bea2 100644 --- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx +++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx @@ -310,11 +310,6 @@ void BackendImpl::PackageImpl:: initPackageHandler() { aContext <<= OUSTR("bundled"); } - else if ( that->m_eContext == CONTEXT_BUNDLED_PREREG ) - { - aContext <<= OUSTR("bundled_prereg"); - } - else { OSL_ASSERT( 0 ); |