diff options
Diffstat (limited to 'desktop/source/deployment/registry/sfwk/dp_sfwk.cxx')
-rw-r--r-- | desktop/source/deployment/registry/sfwk/dp_sfwk.cxx | 66 |
1 files changed, 26 insertions, 40 deletions
diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx index 0e8dc29d53..63b1fb8189 100644 --- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx +++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx @@ -89,6 +89,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend OUString const & identifier); // XPackage virtual OUString SAL_CALL getDescription() throw (RuntimeException); + virtual OUString SAL_CALL getLicenseText() throw (RuntimeException); }; friend class PackageImpl; @@ -99,6 +100,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend Reference<XCommandEnvironment> const & xCmdEnv ); const Reference<deployment::XPackageTypeInfo> m_xTypeInfo; + public: BackendImpl( @@ -108,6 +110,9 @@ public: // XPackageRegistry virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL getSupportedPackageTypes() throw (RuntimeException); + virtual void SAL_CALL packageRemoved(OUString const & url, OUString const & mediaType) + throw (deployment::DeploymentException, + uno::RuntimeException); }; BackendImpl * BackendImpl::PackageImpl::getMyBackend() const @@ -134,6 +139,12 @@ OUString BackendImpl::PackageImpl::getDescription() throw (RuntimeException) } //______________________________________________________________________________ +OUString BackendImpl::PackageImpl::getLicenseText() throw (RuntimeException) +{ + return Package::getDescription(); +} + +//______________________________________________________________________________ BackendImpl::PackageImpl::PackageImpl( ::rtl::Reference<BackendImpl> const & myBackend, OUString const & url, OUString const & libType, bool bRemoved, @@ -168,50 +179,15 @@ BackendImpl::BackendImpl( OUSTR("application/vnd.sun.star.framework-script"), OUString() /* no file filter */, OUSTR("Scripting Framework Script Library"), - RID_IMG_SCRIPTLIB, RID_IMG_SCRIPTLIB_HC ) ) + RID_IMG_SCRIPTLIB ) ) { if (! transientMode()) { -/* - if (office_is_running()) - { - Reference<XComponentContext> xContext( getComponentContext() ); - m_xScriptLibs.set( - xContext->getServiceManager()->createInstanceWithContext( - OUSTR("com.sun.star." - "script.ApplicationScriptLibraryContainer"), - xContext ), UNO_QUERY_THROW ); - m_xDialogLibs.set( - xContext->getServiceManager()->createInstanceWithContext( - OUSTR("com.sun.star." - "script.ApplicationDialogLibraryContainer"), - xContext ), UNO_QUERY_THROW ); - } - else - { - OUString basic_path( - m_eContext == CONTEXT_USER - ? OUSTR("vnd.sun.star.expand:${$BRAND_BASE_DIR/program/" - SAL_CONFIGFILE("bootstrap") - ":UserInstallation}/user/basic") - : OUSTR("vnd.sun.star.expand:${$BRAND_BASE_DIR/program/" - SAL_CONFIGFILE("bootstrap") - ":BaseInstallation}/share/basic") ); - m_basic_script_libs.reset( - new LibraryContainer( - makeURL( basic_path, OUSTR("script.xlc") ), - getMutex(), - getComponentContext() ) ); - m_dialog_libs.reset( - new LibraryContainer( - makeURL( basic_path, OUSTR("dialog.xlc") ), - getMutex(), - getComponentContext() ) ); - } -*/ } } + + // XPackageRegistry //______________________________________________________________________________ Sequence< Reference<deployment::XPackageTypeInfo> > @@ -220,6 +196,12 @@ BackendImpl::getSupportedPackageTypes() throw (RuntimeException) return Sequence< Reference<deployment::XPackageTypeInfo> >(&m_xTypeInfo, 1); } +void BackendImpl::packageRemoved(OUString const & /*url*/, OUString const & /*mediaType*/) + throw (deployment::DeploymentException, + uno::RuntimeException) +{ +} + // PackageRegistryBackend //______________________________________________________________________________ Reference<deployment::XPackage> BackendImpl::bindPackage_( @@ -256,7 +238,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( { if (subType.EqualsIgnoreCaseAscii("vnd.sun.star.framework-script")) { - OUString lang = OUString::createFromAscii("Script"); + OUString lang = OUString(RTL_CONSTASCII_USTRINGPARAM("Script")); OUString sParcelDescURL = makeURL( url, OUSTR("parcel-descriptor.xml") ); @@ -310,7 +292,6 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( static_cast<sal_Int16>(-1) ); } -//############################################################################## void BackendImpl::PackageImpl:: initPackageHandler() { @@ -332,6 +313,11 @@ void BackendImpl::PackageImpl:: initPackageHandler() { aContext <<= OUSTR("bundled"); } + else if ( that->m_eContext == CONTEXT_BUNDLED_PREREG ) + { + aContext <<= OUSTR("bundled_prereg"); + } + else { OSL_ASSERT( 0 ); |