summaryrefslogtreecommitdiff
path: root/desktop/source/deployment/manager
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/deployment/manager')
-rw-r--r--desktop/source/deployment/manager/dp_activepackages.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_activepackages.hxx2
-rw-r--r--desktop/source/deployment/manager/dp_commandenvironments.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_informationprovider.cxx32
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx136
-rw-r--r--desktop/source/deployment/manager/dp_manager.h40
-rw-r--r--desktop/source/deployment/manager/dp_manager.hrc2
-rw-r--r--desktop/source/deployment/manager/dp_manager.src2
-rw-r--r--desktop/source/deployment/manager/dp_managerfac.cxx12
-rw-r--r--desktop/source/deployment/manager/dp_properties.cxx14
-rw-r--r--desktop/source/deployment/manager/dp_properties.hxx8
11 files changed, 126 insertions, 126 deletions
diff --git a/desktop/source/deployment/manager/dp_activepackages.cxx b/desktop/source/deployment/manager/dp_activepackages.cxx
index dabc1e37cf24..950e46174d22 100644
--- a/desktop/source/deployment/manager/dp_activepackages.cxx
+++ b/desktop/source/deployment/manager/dp_activepackages.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
diff --git a/desktop/source/deployment/manager/dp_activepackages.hxx b/desktop/source/deployment/manager/dp_activepackages.hxx
index 2a4d18686346..569e4b7852d5 100644
--- a/desktop/source/deployment/manager/dp_activepackages.hxx
+++ b/desktop/source/deployment/manager/dp_activepackages.hxx
@@ -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
diff --git a/desktop/source/deployment/manager/dp_commandenvironments.cxx b/desktop/source/deployment/manager/dp_commandenvironments.cxx
index f863dbbb86d6..ba32b3089805 100644
--- a/desktop/source/deployment/manager/dp_commandenvironments.cxx
+++ b/desktop/source/deployment/manager/dp_commandenvironments.cxx
@@ -302,7 +302,7 @@ void SilentCheckPrerequisitesCommandEnv::handle(
// uno::Any request( xRequest->getRequest() );
// OSL_ASSERT( request.getValueTypeClass() == uno::TypeClass_EXCEPTION );
-// deployment::LicenseException licExc;
+// deployment::LicenseException licExc;
// bool approve = false;
// bool abort = false;
diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx
index 1a27f51092d6..6aaf3739e223 100644
--- a/desktop/source/deployment/manager/dp_informationprovider.cxx
+++ b/desktop/source/deployment/manager/dp_informationprovider.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
@@ -71,8 +71,8 @@ namespace xml = com::sun::star::xml ;
namespace dp_info {
-class PackageInformationProvider :
- public ::cppu::WeakImplHelper3< deployment::XPackageInformationProvider,
+class PackageInformationProvider :
+ public ::cppu::WeakImplHelper3< deployment::XPackageInformationProvider,
css_ucb::XCommandEnvironment,
task::XInteractionHandler >
{
@@ -91,8 +91,8 @@ class PackageInformationProvider :
throw ( uno::RuntimeException ) { return static_cast<task::XInteractionHandler*>(this); };
virtual uno::Reference< css_ucb::XProgressHandler > SAL_CALL getProgressHandler()
- throw ( uno::RuntimeException ) { return uno::Reference< css_ucb::XProgressHandler >(); };
-
+ throw ( uno::RuntimeException ) { return uno::Reference< css_ucb::XProgressHandler >(); };
+
// XPackageInformationProvider
virtual rtl::OUString SAL_CALL getPackageLocation( const rtl::OUString& extensionId )
throw ( uno::RuntimeException );
@@ -102,7 +102,7 @@ class PackageInformationProvider :
throw ( uno::RuntimeException );
//---------
private:
-
+
uno::Reference< uno::XComponentContext> mxContext;
rtl::OUString getPackageLocation( const rtl::OUString& repository,
@@ -113,7 +113,7 @@ private:
//------------------------------------------------------------------------------
-PackageInformationProvider::PackageInformationProvider( uno::Reference< uno::XComponentContext > const& xContext) :
+PackageInformationProvider::PackageInformationProvider( uno::Reference< uno::XComponentContext > const& xContext) :
mxContext( xContext ),
mxUpdateInformation( deployment::UpdateInformationProvider::create( xContext ) )
{
@@ -144,7 +144,7 @@ rtl::OUString PackageInformationProvider::getPackageLocation(
rtl::OUString aLocationURL;
uno::Reference<deployment::XExtensionManager> xManager =
deployment::ExtensionManager::get(mxContext);
-
+
if ( xManager.is() )
{
const uno::Sequence< uno::Reference< deployment::XPackage > > packages(
@@ -205,7 +205,7 @@ PackageInformationProvider::isUpdateAvailable( const rtl::OUString& _sExtensionI
throw ( uno::RuntimeException )
{
uno::Sequence< uno::Sequence< rtl::OUString > > aList;
-
+
uno::Reference<deployment::XExtensionManager> extMgr =
deployment::ExtensionManager::get(mxContext);
@@ -255,7 +255,7 @@ PackageInformationProvider::isUpdateAvailable( const rtl::OUString& _sExtensionI
if ( ! ds.getLength() )
sOnlineVersion = info.version;
}
-
+
rtl::OUString sVersionUser;
rtl::OUString sVersionShared;
rtl::OUString sVersionBundled;
@@ -274,9 +274,9 @@ PackageInformationProvider::isUpdateAvailable( const rtl::OUString& _sExtensionI
sVersionShared = extensions[1]->getVersion();
if (extensions[2].is() )
sVersionBundled = extensions[2]->getVersion();
-
+
bool bSharedReadOnly = extMgr->isReadOnlyRepository(OUSTR("shared"));
-
+
dp_misc::UPDATE_SOURCE sourceUser = dp_misc::isUpdateUserExtension(
bSharedReadOnly, sVersionUser, sVersionShared, sVersionBundled, sOnlineVersion);
dp_misc::UPDATE_SOURCE sourceShared = dp_misc::isUpdateSharedExtension(
@@ -297,13 +297,13 @@ PackageInformationProvider::isUpdateAvailable( const rtl::OUString& _sExtensionI
updateVersion = updateVersionShared;
if (updateVersion.getLength())
{
-
+
rtl::OUString aNewEntry[2];
aNewEntry[0] = i->first;
aNewEntry[1] = updateVersion;
aList.realloc( ++nCount );
aList[ nCount-1 ] = ::uno::Sequence< rtl::OUString >( aNewEntry, 2 );
- }
+ }
}
return aList;
}
@@ -322,9 +322,9 @@ uno::Sequence< uno::Sequence< rtl::OUString > > SAL_CALL PackageInformationProvi
allExt = mgr->getAllExtensions(
uno::Reference< task::XAbortChannel >(),
static_cast < XCommandEnvironment *> (this) );
-
+
uno::Sequence< uno::Sequence< rtl::OUString > > retList;
-
+
sal_Int32 cAllIds = allExt.getLength();
retList.realloc(cAllIds);
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 53877d8188d8..3b7432ae8057 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.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
@@ -105,7 +105,7 @@ namespace {
OUString getExtensionFolder(OUString const & parentFolder,
Reference<ucb::XCommandEnvironment> const & xCmdEnv)
{
- ::ucbhelper::Content tempFolder(
+ ::ucbhelper::Content tempFolder(
parentFolder, xCmdEnv );
Reference<sdbc::XResultSet> xResultSet(
tempFolder.createCursor(
@@ -154,12 +154,12 @@ void PackageManagerImpl::initActivationLayer(
if (title.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
"META-INF") ) )
continue;
-
+
::ucbhelper::Content sourceContent(
Reference<XContentAccess>(
xResultSet, UNO_QUERY_THROW )->queryContent(),
xCmdEnv );
-
+
OUString mediaType( detectMediaType( sourceContent,
false /* no throw */) );
if (mediaType.getLength() >0)
@@ -199,13 +199,13 @@ void PackageManagerImpl::initActivationLayer(
//The data base can always be written because it it always in the user installation
m_activePackagesDB.reset(
new ActivePackages( dbName, false ) );
-
+
if (! m_readOnly && ! m_context.equals(OUSTR("bundled")))
{
// clean up activation layer, scan for zombie temp dirs:
ActivePackages::Entries id2temp( m_activePackagesDB->getEntries() );
-
- ::ucbhelper::Content tempFolder(
+
+ ::ucbhelper::Content tempFolder(
m_activePackages_expanded, xCmdEnv );
Reference<sdbc::XResultSet> xResultSet(
tempFolder.createCursor(
@@ -220,7 +220,7 @@ void PackageManagerImpl::initActivationLayer(
Reference<sdbc::XRow>(
xResultSet, UNO_QUERY_THROW )->getString(
1 /* Title */ ) );
-
+
const char extensionRemoved[] = "removed";
if (title.endsWithAsciiL(
extensionRemoved, sizeof(extensionRemoved) - 1))
@@ -233,7 +233,7 @@ void PackageManagerImpl::initActivationLayer(
remFile, rtl_UriCharClassPchar,
rtl_UriEncodeIgnoreEscapes,
RTL_TEXTENCODING_UTF8 ) );
- }
+ }
else
{
tempEntries.push_back( ::rtl::Uri::encode(
@@ -294,7 +294,7 @@ void PackageManagerImpl::initActivationLayer(
false /* no throw: ignore errors */ );
erase_path( url, Reference<XCommandEnvironment>(),
false /* no throw: ignore errors */ );
- //delete the xxx.tmpremoved file
+ //delete the xxx.tmpremoved file
erase_path(url + OUSTR("removed"),
Reference<XCommandEnvironment>(), false);
}
@@ -322,7 +322,7 @@ Reference<deployment::XPackageManager> PackageManagerImpl::create(
PackageManagerImpl * that = new PackageManagerImpl(
xComponentContext, context );
Reference<deployment::XPackageManager> xPackageManager( that );
-
+
OUString packages, logFile, stampURL;
if (context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("user") )) {
that->m_activePackages = OUSTR(
@@ -368,7 +368,7 @@ Reference<deployment::XPackageManager> PackageManagerImpl::create(
"vnd.sun.star.expand:$BUNDLED_EXTENSIONS_USER/registry");
logFile = OUSTR(
"vnd.sun.star.expand:$BUNDLED_EXTENSIONS_USER/log.txt");
- //No stamp file. We assume that bundled is always readonly. It must not be
+ //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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("tmp") )) {
@@ -387,13 +387,13 @@ Reference<deployment::XPackageManager> PackageManagerImpl::create(
OUSTR("invalid context given: ") + context,
Reference<XInterface>(), static_cast<sal_Int16>(-1) );
}
-
+
Reference<XCommandEnvironment> xCmdEnv;
-
+
try {
//There is no stampURL for the bundled folder
if (stampURL.getLength() > 0)
- {
+ {
#define CURRENT_STAMP "1"
try {
//The osl file API does not allow to find out if one can write
@@ -424,7 +424,7 @@ Reference<deployment::XPackageManager> PackageManagerImpl::create(
that->m_readOnly = true;
}
}
-
+
if (!that->m_readOnly && logFile.getLength() > 0)
{
const Any any_logFile(logFile);
@@ -437,12 +437,12 @@ Reference<deployment::XPackageManager> PackageManagerImpl::create(
UNO_QUERY_THROW );
xCmdEnv.set( new CmdEnvWrapperImpl( xCmdEnv, that->m_xLogFile ) );
}
-
+
that->initRegistryBackends();
that->initActivationLayer( xCmdEnv );
-
+
return xPackageManager;
-
+
}
catch (RuntimeException &) {
throw;
@@ -488,9 +488,9 @@ void PackageManagerImpl::disposing()
m_xRegistry.clear();
m_activePackagesDB.reset(0);
m_xComponentContext.clear();
-
+
t_pm_helper::disposing();
-
+
}
catch (RuntimeException &) {
throw;
@@ -635,11 +635,11 @@ OUString PackageManagerImpl::insertToActivationLayer(
destFolder = makeURL( m_activePackages, tempEntry );
}
destFolder += OUSTR("_");
-
+
// prepare activation folder:
::ucbhelper::Content destFolderContent;
create_folder( &destFolderContent, destFolder, xCmdEnv );
-
+
// copy content into activation temp dir:
if (mediaType.matchIgnoreAsciiCaseAsciiL(
RTL_CONSTASCII_STRINGPARAM(
@@ -665,7 +665,7 @@ OUString PackageManagerImpl::insertToActivationLayer(
buf.append(sourceContent.getURL());
}
buf.append( static_cast<sal_Unicode>('/') );
- sourceContent = ::ucbhelper::Content(
+ sourceContent = ::ucbhelper::Content(
buf.makeStringAndClear(), xCmdEnv );
}
if (! destFolderContent.transferContent(
@@ -673,7 +673,7 @@ OUString PackageManagerImpl::insertToActivationLayer(
title, NameClash::OVERWRITE ))
throw RuntimeException( OUSTR("UCB transferContent() failed!"), 0 );
-
+
// write to DB:
//bundled extensions should only be added by the synchronizeAddedExtensions
//functions. Moreover, there is no "temporary folder" for bundled extensions.
@@ -697,7 +697,7 @@ void PackageManagerImpl::insertToActivationLayerDB(
OUString const & id, ActivePackages::Data const & dbData )
{
//access to the database must be guarded. See removePackage
- const ::osl::MutexGuard guard( getMutex() );
+ const ::osl::MutexGuard guard( getMutex() );
m_activePackagesDB->put( id, dbData );
}
@@ -761,7 +761,7 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage(
xCmdEnv.set( new CmdEnvWrapperImpl( xCmdEnv_, m_xLogFile ) );
else
xCmdEnv.set( xCmdEnv_ );
-
+
try {
::ucbhelper::Content sourceContent;
create_ucb_content( &sourceContent, url, xCmdEnv ); // throws exc
@@ -772,11 +772,11 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage(
rtl_UriEncodeIgnoreEscapes,
RTL_TEXTENCODING_UTF8 ) );
OUString destFolder;
-
+
OUString mediaType(mediaType_);
if (mediaType.getLength() == 0)
mediaType = detectMediaType( sourceContent );
-
+
Reference<deployment::XPackage> xPackage;
// copy file:
progressUpdate(
@@ -801,7 +801,7 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage(
// not work, anyway.
docContent.setPropertyValue(
OUSTR("MediaType"), Any(mediaType) );
-
+
// xxx todo: obsolete in the future
try {
docFolderContent.executeCommand( OUSTR("flush"), Any() );
@@ -813,7 +813,7 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage(
destFolder = insertToActivationLayer(
properties, mediaType, sourceContent, title, &dbData );
-
+
// bind activation package:
//Because every shared/user extension will be unpacked in a folder,
//which was created with a unique name we will always have two different
@@ -821,12 +821,12 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage(
//Therefore bindPackage does not need a guard here.
xPackage = m_xRegistry->bindPackage(
makeURL( destFolder, title_enc ), mediaType, false, OUString(), xCmdEnv );
-
+
OSL_ASSERT( xPackage.is() );
if (xPackage.is())
{
bool install = false;
- try
+ try
{
OUString const id = dp_misc::getIdentifier( xPackage );
@@ -834,7 +834,7 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage(
if (isInstalled(xPackage))
{
//Do not guard the complete function with the getMutex
- removePackage(id, xPackage->getName(), xAbortChannel,
+ removePackage(id, xPackage->getName(), xAbortChannel,
xCmdEnv);
}
install = true;
@@ -845,13 +845,13 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage(
deletePackageFromCache( xPackage, destFolder );
throw;
}
- if (!install)
- {
+ if (!install)
+ {
deletePackageFromCache( xPackage, destFolder );
}
//ToDo: We should notify only if the extension is registered
fireModified();
- }
+ }
return xPackage;
}
catch (RuntimeException &) {
@@ -882,7 +882,7 @@ void PackageManagerImpl::deletePackageFromCache(
OUString const & destFolder)
{
try_dispose( xPackage );
-
+
//we remove the package from the uno cache
//no service from the package may be loaded at this time!!!
erase_path( destFolder, Reference<XCommandEnvironment>(),
@@ -903,25 +903,25 @@ void PackageManagerImpl::removePackage(
RuntimeException)
{
check();
-
+
Reference<XCommandEnvironment> xCmdEnv;
if (m_xLogFile.is())
xCmdEnv.set( new CmdEnvWrapperImpl( xCmdEnv_, m_xLogFile ) );
else
xCmdEnv.set( xCmdEnv_ );
-
+
try {
Reference<deployment::XPackage> xPackage;
{
const ::osl::MutexGuard guard(getMutex());
- //Check if this extension exist and throw an IllegalArgumentException
+ //Check if this extension exist and throw an IllegalArgumentException
//if it does not
//If the files of the extension are already removed, or there is a
//different extension at the same place, for example after updating the
//extension, then the returned object is that which uses the database data.
xPackage = getDeployedPackage_(id, fileName, xCmdEnv );
-
+
//Because the extension is only removed the next time the extension
//manager runs after restarting OOo, we need to indicate that a
//shared extension was "deleted". When a user starts OOo, then it
@@ -940,7 +940,7 @@ void PackageManagerImpl::removePackage(
OUString aUserName;
::osl::Security aSecurity;
aSecurity.getUserName( aUserName );
-
+
::rtl::OString stamp = ::rtl::OUStringToOString(aUserName, RTL_TEXTENCODING_UTF8);
Reference<css::io::XInputStream> xData(
::xmlscript::createInputStream(
@@ -1007,7 +1007,7 @@ Reference<deployment::XPackage> PackageManagerImpl::getDeployedPackage_(
{
ActivePackages::Data val;
if (m_activePackagesDB->get( &val, id, fileName ))
- {
+ {
return getDeployedPackage_( id, val, xCmdEnv, false );
}
throw lang::IllegalArgumentException(
@@ -1102,7 +1102,7 @@ Reference<deployment::XPackage> PackageManagerImpl::getDeployedPackage(
xCmdEnv.set( new CmdEnvWrapperImpl( xCmdEnv_, m_xLogFile ) );
else
xCmdEnv.set( xCmdEnv_ );
-
+
try {
const ::osl::MutexGuard guard( getMutex() );
return getDeployedPackage_( id, fileName, xCmdEnv );
@@ -1147,7 +1147,7 @@ PackageManagerImpl::getDeployedPackages(
xCmdEnv.set( new CmdEnvWrapperImpl( xCmdEnv_, m_xLogFile ) );
else
xCmdEnv.set( xCmdEnv_ );
-
+
try {
const ::osl::MutexGuard guard( getMutex() );
return getDeployedPackages_( xCmdEnv );
@@ -1194,17 +1194,17 @@ void PackageManagerImpl::reinstallDeployedPackages(
throw RuntimeException(
OUSTR("You must close any running Office process before "
"reinstalling packages!"), static_cast<OWeakObject *>(this) );
-
+
Reference<XCommandEnvironment> xCmdEnv;
if (m_xLogFile.is())
xCmdEnv.set( new CmdEnvWrapperImpl( xCmdEnv_, m_xLogFile ) );
else
xCmdEnv.set( xCmdEnv_ );
-
+
try {
ProgressLevel progress(
xCmdEnv, OUSTR("Reinstalling all deployed packages...") );
-
+
try_dispose( m_xRegistry );
m_xRegistry.clear();
if (m_registryCache.getLength() > 0)
@@ -1274,14 +1274,14 @@ bool PackageManagerImpl::synchronizeRemovedExtensions(
bool bRemoved = false;
//Check if the URL to the extension is still the same
::ucbhelper::Content contentExtension;
-
+
if (!create_ucb_content(
&contentExtension, url,
Reference<XCommandEnvironment>(), false))
{
bRemoved = true;
}
-
+
//The folder is in the extension database, but it can still be deleted.
//look for the xxx.tmpremoved file
//There can also be the case that a different extension was installed
@@ -1289,7 +1289,7 @@ bool PackageManagerImpl::synchronizeRemovedExtensions(
if (!bRemoved && bShared)
{
::ucbhelper::Content contentRemoved;
-
+
if (create_ucb_content(
&contentRemoved,
m_activePackages_expanded + OUSTR("/") +
@@ -1315,7 +1315,7 @@ bool PackageManagerImpl::synchronizeRemovedExtensions(
{
bRemoved = true;
}
-
+
}
if (bRemoved)
{
@@ -1340,7 +1340,7 @@ bool PackageManagerImpl::synchronizeRemovedExtensions(
bool PackageManagerImpl::synchronizeAddedExtensions(
Reference<task::XAbortChannel> const & xAbortChannel,
Reference<css::ucb::XCommandEnvironment> const & xCmdEnv)
-{
+{
bool bModified = false;
ActivePackages::Entries id2temp( m_activePackagesDB->getEntries() );
//check if the folder exist at all. The shared extension folder
@@ -1348,14 +1348,14 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
if (!create_ucb_content(
NULL, m_activePackages_expanded, Reference<css::ucb::XCommandEnvironment>(), false))
return bModified;
- ::ucbhelper::Content tempFolder(
+ ::ucbhelper::Content tempFolder(
m_activePackages_expanded, xCmdEnv );
-
+
Reference<sdbc::XResultSet> xResultSet(
tempFolder.createCursor(
Sequence<OUString>( &StrTitle::get(), 1 ),
::ucbhelper::INCLUDE_FOLDERS_ONLY ) );
-
+
while (xResultSet->next())
{
try
@@ -1385,7 +1385,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
if (::std::find_if( id2temp.begin(), id2temp.end(), match ) ==
id2temp.end())
{
-
+
// The folder was not found in the data base, so it must be
// an added extension
OUString url(m_activePackages_expanded + OUSTR("/") + titleEncoded);
@@ -1399,7 +1399,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
Reference<XCommandEnvironment>(), false))
continue;
sExtFolder = getExtensionFolder(
- m_activePackages_expanded +
+ m_activePackages_expanded +
OUString(OUSTR("/")) + titleEncoded + OUSTR("_"), xCmdEnv);
url = makeURLAppendSysPathSegment(m_activePackages_expanded, title);
url = makeURLAppendSysPathSegment(url, sExtFolder);
@@ -1407,7 +1407,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
Reference<deployment::XPackage> xPackage = m_xRegistry->bindPackage(
url, OUString(), false, OUString(), xCmdEnv );
if (xPackage.is())
- {
+ {
//Prepare the database entry
ActivePackages::Data dbData;
@@ -1421,13 +1421,13 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
OSL_ENSURE(dbData.version.getLength() > 0,
"Extension Manager: bundled and shared extensions must have "
"an identifier and a version");
-
+
OUString id = dp_misc::getIdentifier( xPackage );
//We provide a special command environment that will prevent
//showing a license if simple-licens/@accept-by = "admin"
//It will also prevent showing the license for bundled extensions
- //which is not supported.
+ //which is not supported.
OSL_ASSERT(!m_context.equals(OUSTR("user")));
// shall the license be suppressed?
@@ -1439,7 +1439,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
bool bNoLicense = false;
if (attr && attr->suppressIfRequired && props.isSuppressedLicense())
bNoLicense = true;
-
+
Reference<ucb::XCommandEnvironment> licCmdEnv(
new LicenseCommandEnv(xCmdEnv->getInteractionHandler(),
bNoLicense, m_context));
@@ -1458,7 +1458,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
catch (uno::Exception &)
{
OSL_ASSERT(0);
- }
+ }
}
return bModified;
}
@@ -1511,7 +1511,7 @@ Sequence< Reference<deployment::XPackage> > PackageManagerImpl::getExtensionsWit
OUString url = makeURL(m_activePackages, i->second.temporaryName);
if (bShared)
url = makeURLAppendSysPathSegment( url + OUSTR("_"), i->second.fileName);
-
+
Reference<deployment::XPackage> p = m_xRegistry->bindPackage(
url, OUString(), false, OUString(), xCmdEnv );
@@ -1560,7 +1560,7 @@ sal_Int32 PackageManagerImpl::checkPrerequisites(
throw lang::IllegalArgumentException(
OUSTR("PackageManagerImpl::checkPrerequisites: extension is not"
" from this repository."), 0, 0);
-
+
ActivePackages::Data dbData;
OUString id = dp_misc::getIdentifier(extension);
if (m_activePackagesDB->get( &dbData, id, OUString()))
@@ -1570,11 +1570,11 @@ sal_Int32 PackageManagerImpl::checkPrerequisites(
sal_Int32 prereq = dbData.failedPrerequisites.toInt32();
if ( !(prereq & deployment::Prerequisites::LICENSE))
_xCmdEnv = new NoLicenseCommandEnv(xCmdEnv->getInteractionHandler());
-
+
sal_Int32 failedPrereq = extension->checkPrerequisites(
xAbortChannel, _xCmdEnv, false);
dbData.failedPrerequisites = OUString::valueOf(failedPrereq);
- insertToActivationLayerDB(id, dbData);
+ insertToActivationLayerDB(id, dbData);
}
else
{
diff --git a/desktop/source/deployment/manager/dp_manager.h b/desktop/source/deployment/manager/dp_manager.h
index 3b335d7e2362..fa4a9078ac42 100644
--- a/desktop/source/deployment/manager/dp_manager.h
+++ b/desktop/source/deployment/manager/dp_manager.h
@@ -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
@@ -58,10 +58,10 @@ class PackageManagerImpl : private ::dp_misc::MutexHolder, public t_pm_helper
::rtl::OUString m_registrationData_expanded;
::rtl::OUString m_registryCache;
bool m_readOnly;
-
+
::rtl::OUString m_activePackages;
::rtl::OUString m_activePackages_expanded;
- ::std::auto_ptr< ActivePackages > m_activePackagesDB;
+ ::std::auto_ptr< ActivePackages > m_activePackagesDB;
//This mutex is only used for synchronization in addPackage
::osl::Mutex m_addMutex;
css::uno::Reference<css::ucb::XProgressHandler> m_xLogFile;
@@ -69,7 +69,7 @@ class PackageManagerImpl : private ::dp_misc::MutexHolder, public t_pm_helper
void fireModified();
css::uno::Reference<css::deployment::XPackageRegistry> m_xRegistry;
-
+
void initRegistryBackends();
void initActivationLayer(
css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv );
@@ -77,7 +77,7 @@ class PackageManagerImpl : private ::dp_misc::MutexHolder, public t_pm_helper
::ucbhelper::Content const & ucbContent, bool throw_exc = true );
::rtl::OUString insertToActivationLayer(
css::uno::Sequence<css::beans::NamedValue> const & properties,
- ::rtl::OUString const & mediaType,
+ ::rtl::OUString const & mediaType,
::ucbhelper::Content const & sourceContent,
::rtl::OUString const & title, ActivePackages::Data * dbData );
void insertToActivationLayerDB(
@@ -106,20 +106,20 @@ class PackageManagerImpl : private ::dp_misc::MutexHolder, public t_pm_helper
css::uno::Reference<css::ucb::XProgressHandler> m_xUserProgress;
css::uno::Reference<css::task::XInteractionHandler>
m_xUserInteractionHandler;
-
+
public:
virtual ~CmdEnvWrapperImpl();
CmdEnvWrapperImpl(
css::uno::Reference<css::ucb::XCommandEnvironment>
const & xUserCmdEnv,
css::uno::Reference<css::ucb::XProgressHandler> const & xLogFile );
-
+
// XCommandEnvironment
virtual css::uno::Reference<css::task::XInteractionHandler> SAL_CALL
getInteractionHandler() throw (css::uno::RuntimeException);
virtual css::uno::Reference<css::ucb::XProgressHandler> SAL_CALL
getProgressHandler() throw (css::uno::RuntimeException);
-
+
// XProgressHandler
virtual void SAL_CALL push( css::uno::Any const & Status )
throw (css::uno::RuntimeException);
@@ -127,11 +127,11 @@ class PackageManagerImpl : private ::dp_misc::MutexHolder, public t_pm_helper
throw (css::uno::RuntimeException);
virtual void SAL_CALL pop() throw (css::uno::RuntimeException);
};
-
+
protected:
inline void check();
virtual void SAL_CALL disposing();
-
+
virtual ~PackageManagerImpl();
inline PackageManagerImpl(
css::uno::Reference<css::uno::XComponentContext>
@@ -141,12 +141,12 @@ protected:
m_context( context ),
m_readOnly( true )
{}
-
+
public:
static css::uno::Reference<css::deployment::XPackageManager> create(
css::uno::Reference<css::uno::XComponentContext>
const & xComponentContext, ::rtl::OUString const & context );
-
+
// XComponent
virtual void SAL_CALL dispose() throw (css::uno::RuntimeException);
virtual void SAL_CALL addEventListener(
@@ -155,7 +155,7 @@ public:
virtual void SAL_CALL removeEventListener(
css::uno::Reference<css::lang::XEventListener> const & xListener )
throw (css::uno::RuntimeException);
-
+
// XModifyBroadcaster
virtual void SAL_CALL addModifyListener(
css::uno::Reference<css::util::XModifyListener> const & xListener )
@@ -163,17 +163,17 @@ public:
virtual void SAL_CALL removeModifyListener(
css::uno::Reference<css::util::XModifyListener> const & xListener )
throw (css::uno::RuntimeException);
-
+
// XPackageManager
virtual ::rtl::OUString SAL_CALL getContext()
throw (css::uno::RuntimeException);
virtual css::uno::Sequence<
css::uno::Reference<css::deployment::XPackageTypeInfo> > SAL_CALL
getSupportedPackageTypes() throw (css::uno::RuntimeException);
-
+
virtual css::uno::Reference<css::task::XAbortChannel> SAL_CALL
createAbortChannel() throw (css::uno::RuntimeException);
-
+
virtual css::uno::Reference<css::deployment::XPackage> SAL_CALL addPackage(
::rtl::OUString const & url,
css::uno::Sequence<css::beans::NamedValue> const & properties,
@@ -185,7 +185,7 @@ public:
css::ucb::CommandAbortedException,
css::lang::IllegalArgumentException,
css::uno::RuntimeException);
-
+
virtual css::uno::Reference<css::deployment::XPackage> SAL_CALL importExtension(
css::uno::Reference<css::deployment::XPackage> const & extension,
css::uno::Reference<css::task::XAbortChannel> const & xAbortChannel,
@@ -205,7 +205,7 @@ public:
css::ucb::CommandAbortedException,
css::lang::IllegalArgumentException,
css::uno::RuntimeException);
-
+
::rtl::OUString getDeployPath( ActivePackages::Data const & data );
css::uno::Reference<css::deployment::XPackage> SAL_CALL getDeployedPackage_(
::rtl::OUString const & id, ::rtl::OUString const & fileName,
@@ -221,7 +221,7 @@ public:
throw (css::deployment::DeploymentException,
css::ucb::CommandFailedException,
css::lang::IllegalArgumentException, css::uno::RuntimeException);
-
+
css::uno::Sequence< css::uno::Reference<css::deployment::XPackage> >
getDeployedPackages_(
css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv );
@@ -234,7 +234,7 @@ public:
css::ucb::CommandAbortedException,
css::lang::IllegalArgumentException,
css::uno::RuntimeException);
-
+
virtual void SAL_CALL reinstallDeployedPackages(
css::uno::Reference<css::task::XAbortChannel> const & xAbortChannel,
css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv )
diff --git a/desktop/source/deployment/manager/dp_manager.hrc b/desktop/source/deployment/manager/dp_manager.hrc
index 6131cc381abf..3dd89f57cf37 100644
--- a/desktop/source/deployment/manager/dp_manager.hrc
+++ b/desktop/source/deployment/manager/dp_manager.hrc
@@ -1,7 +1,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
diff --git a/desktop/source/deployment/manager/dp_manager.src b/desktop/source/deployment/manager/dp_manager.src
index 7d38b880c37a..7430a8cab046 100644
--- a/desktop/source/deployment/manager/dp_manager.src
+++ b/desktop/source/deployment/manager/dp_manager.src
@@ -1,7 +1,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
diff --git a/desktop/source/deployment/manager/dp_managerfac.cxx b/desktop/source/deployment/manager/dp_managerfac.cxx
index 55bd259a276d..ccbaadcb8ac3 100644
--- a/desktop/source/deployment/manager/dp_managerfac.cxx
+++ b/desktop/source/deployment/manager/dp_managerfac.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
@@ -51,7 +51,7 @@ typedef ::cppu::WeakComponentImplHelper1<
class PackageManagerFactoryImpl : private MutexHolder, public t_pmfac_helper
{
Reference<XComponentContext> m_xComponentContext;
-
+
Reference<deployment::XPackageManager> m_xUserMgr;
Reference<deployment::XPackageManager> m_xSharedMgr;
Reference<deployment::XPackageManager> m_xBundledMgr;
@@ -59,16 +59,16 @@ class PackageManagerFactoryImpl : private MutexHolder, public t_pmfac_helper
OUString, WeakReference<deployment::XPackageManager>,
::rtl::OUStringHash > t_string2weakref;
t_string2weakref m_managers;
-
+
protected:
inline void check();
virtual void SAL_CALL disposing();
-
+
public:
virtual ~PackageManagerFactoryImpl();
PackageManagerFactoryImpl(
Reference<XComponentContext> const & xComponentContext );
-
+
// XPackageManagerFactory
virtual Reference<deployment::XPackageManager> SAL_CALL getPackageManager(
OUString const & context ) throw (RuntimeException);
@@ -161,7 +161,7 @@ PackageManagerFactoryImpl::getPackageManager( OUString const & context )
if (xRet.is())
return xRet;
}
-
+
guard.clear();
xRet.set( PackageManagerImpl::create( m_xComponentContext, context ) );
guard.reset();
diff --git a/desktop/source/deployment/manager/dp_properties.cxx b/desktop/source/deployment/manager/dp_properties.cxx
index a2a568287f16..6477c5aad099 100644
--- a/desktop/source/deployment/manager/dp_properties.cxx
+++ b/desktop/source/deployment/manager/dp_properties.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
@@ -62,11 +62,11 @@ ExtensionProperties::ExtensionProperties(
m_xCmdEnv(xCmdEnv)
{
m_propFileUrl = urlExtension + OUSTR("properties");
-
+
::std::list< ::std::pair< OUString, OUString> > props;
if (! dp_misc::create_ucb_content(NULL, m_propFileUrl, 0, false))
return;
-
+
::ucbhelper::Content contentProps(m_propFileUrl, m_xCmdEnv);
dp_misc::readProperties(props, contentProps);
@@ -75,10 +75,10 @@ ExtensionProperties::ExtensionProperties(
{
if (i->first.equals(OUSTR(PROP_SUPPRESS_LICENSE)))
m_prop_suppress_license = i->second;
- }
+ }
}
-//Writing the file
+//Writing the file
ExtensionProperties::ExtensionProperties(
OUString const & urlExtension,
uno::Sequence<css::beans::NamedValue> const & properties,
@@ -132,7 +132,7 @@ void ExtensionProperties::write()
buf.append(OUSTR("="));
buf.append(*m_prop_suppress_license);
}
-
+
::rtl::OString stamp = ::rtl::OUStringToOString(
buf.makeStringAndClear(), RTL_TEXTENCODING_UTF8);
Reference<css::io::XInputStream> xData(
@@ -163,7 +163,7 @@ bool ExtensionProperties::isExtensionUpdate()
ret = true;
}
return ret;
-}
+}
} // namespace dp_manager
diff --git a/desktop/source/deployment/manager/dp_properties.hxx b/desktop/source/deployment/manager/dp_properties.hxx
index 103227f29226..70f6d9f62f47 100644
--- a/desktop/source/deployment/manager/dp_properties.hxx
+++ b/desktop/source/deployment/manager/dp_properties.hxx
@@ -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
@@ -47,7 +47,7 @@ namespace dp_manager {
*/
class ExtensionProperties
{
-protected:
+protected:
::rtl::OUString m_propFileUrl;
const css::uno::Reference<css::ucb::XCommandEnvironment> m_xCmdEnv;
::boost::optional< ::rtl::OUString> m_prop_suppress_license;
@@ -55,11 +55,11 @@ protected:
::rtl::OUString getPropertyValue(css::beans::NamedValue const & v);
public:
-
+
virtual ~ExtensionProperties() {};
ExtensionProperties(::rtl::OUString const & urlExtension,
css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv);
-
+
ExtensionProperties(::rtl::OUString const & urlExtension,
css::uno::Sequence<css::beans::NamedValue> const & properties,
css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv);