diff options
Diffstat (limited to 'desktop/source/deployment/registry/configuration/dp_configuration.cxx')
-rw-r--r-- | desktop/source/deployment/registry/configuration/dp_configuration.cxx | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 5d89c2deca24..2688a277f947 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -76,9 +76,9 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend class PackageImpl : public ::dp_registry::backend::Package { BackendImpl * getMyBackend() const ; - + const bool m_isSchema; - + // Package virtual beans::Optional< beans::Ambiguous<sal_Bool> > isRegistered_( ::osl::ResettableMutexGuard & guard, @@ -90,7 +90,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend bool startup, ::rtl::Reference<AbortChannel> const & abortChannel, Reference<XCommandEnvironment> const & xCmdEnv ); - + public: inline PackageImpl( ::rtl::Reference<PackageRegistryBackend> const & myBackend, @@ -103,41 +103,41 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend {} }; friend class PackageImpl; - + t_stringlist m_xcs_files; t_stringlist m_xcu_files; t_stringlist & getFiles( bool xcs ) { return xcs ? m_xcs_files : m_xcu_files; } - + bool m_configmgrini_inited; bool m_configmgrini_modified; std::auto_ptr<ConfigurationBackendDb> m_backendDb; - + // PackageRegistryBackend virtual Reference<deployment::XPackage> bindPackage_( OUString const & url, OUString const & mediaType, sal_Bool bRemoved, - OUString const & identifier, + OUString const & identifier, Reference<XCommandEnvironment> const & xCmdEnv ); - + ::std::auto_ptr<PersistentMap> m_registeredPackages; // for backwards compatibility virtual void SAL_CALL disposing(); - + const Reference<deployment::XPackageTypeInfo> m_xConfDataTypeInfo; const Reference<deployment::XPackageTypeInfo> m_xConfSchemaTypeInfo; Sequence< Reference<deployment::XPackageTypeInfo> > m_typeInfos; - + void configmgrini_verify_init( Reference<XCommandEnvironment> const & xCmdEnv ); void configmgrini_flush( Reference<XCommandEnvironment> const & xCmdEnv ); - + bool addToConfigmgrIni( bool isSchema, OUString const & url, Reference<XCommandEnvironment> const & xCmdEnv ); bool removeFromConfigmgrIni( bool isSchema, OUString const & url, Reference<XCommandEnvironment> const & xCmdEnv ); - + void addDataToDb(OUString const & url, ConfigurationBackendDb::Data const & data); ::boost::optional<ConfigurationBackendDb::Data> readDataFromDb(OUString const & url); OUString deleteDataFromDb(OUString const & url); @@ -146,7 +146,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend public: BackendImpl( Sequence<Any> const & args, Reference<XComponentContext> const & xComponentContext ); - + // XPackageRegistry virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL getSupportedPackageTypes() throw (RuntimeException); @@ -159,7 +159,7 @@ void BackendImpl::disposing() { try { configmgrini_flush( Reference<XCommandEnvironment>() ); - + PackageRegistryBackend::disposing(); } catch (RuntimeException &) { @@ -196,9 +196,9 @@ BackendImpl::BackendImpl( { m_typeInfos[ 0 ] = m_xConfDataTypeInfo; m_typeInfos[ 1 ] = m_xConfSchemaTypeInfo; - + const Reference<XCommandEnvironment> xCmdEnv; - + if (transientMode()) { //TODO @@ -221,7 +221,7 @@ BackendImpl::BackendImpl( m_registeredPackages.reset( new PersistentMap( makeURL( getCachePath(), OUSTR("registered_packages.db") ), - false ) ); + false ) ); } } @@ -305,7 +305,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( StrCannotDetectMediaType::get() + url, static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) ); } - + String type, subType; INetContentTypeParameterList params; if (INetContentTypes::parse( mediaType, type, subType, ¶ms )) @@ -409,7 +409,7 @@ void BackendImpl::configmgrini_flush( return; if (!m_configmgrini_inited || !m_configmgrini_modified) return; - + ::rtl::OStringBuffer buf; if (! m_xcs_files.empty()) { @@ -443,7 +443,7 @@ void BackendImpl::configmgrini_flush( } buf.append(LF); } - + // write configmgr.ini: const Reference<io::XInputStream> xData( ::xmlscript::createInputStream( @@ -453,7 +453,7 @@ void BackendImpl::configmgrini_flush( ::ucbhelper::Content ucb_content( makeURL( getCachePath(), OUSTR("configmgr.ini") ), xCmdEnv ); ucb_content.writeStream( xData, true /* replace existing */ ); - + m_configmgrini_modified = false; } @@ -514,12 +514,12 @@ BackendImpl * BackendImpl::PackageImpl::getMyBackend() const { BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get()); if (NULL == pBackend) - { + { //May throw a DisposedException check(); //We should never get here... throw RuntimeException( - OUSTR("Failed to get the BackendImpl"), + OUSTR("Failed to get the BackendImpl"), static_cast<OWeakObject*>(const_cast<PackageImpl *>(this))); } return pBackend; @@ -541,7 +541,7 @@ BackendImpl::PackageImpl::isRegistered_( //fallback for user extension registered in berkeley DB bReg = that->m_registeredPackages->has( rtl::OUStringToOString( url, RTL_TEXTENCODING_UTF8 )); - + return beans::Optional< beans::Ambiguous<sal_Bool> >( true, beans::Ambiguous<sal_Bool>( bReg, false ) ); } @@ -602,7 +602,7 @@ OUString replaceOrigin( break; index = nBytes; } - + if ((write_pos + index) > filtered.getLength()) filtered.realloc( (filtered.getLength() + index) * 2 ); rtl_copyMemory( filtered.getArray() + write_pos, pBytes, index ); @@ -611,7 +611,7 @@ OUString replaceOrigin( nBytes -= index; if (nBytes == 0) break; - + // consume %: ++pBytes; --nBytes; @@ -675,7 +675,7 @@ void BackendImpl::PackageImpl::processPackage_( { BackendImpl * that = getMyBackend(); OUString url( getURL() ); - + if (doRegisterPackage) { ConfigurationBackendDb::Data data; @@ -767,7 +767,7 @@ void BackendImpl::PackageImpl::processPackage_( expandUnoRcUrl(url)); } } -} +} } // anon namespace |