jl152: Local merge

This commit is contained in:
Joerg Skottke [jsk] 2010-06-14 11:49:43 +02:00
commit ed659928a2
6 changed files with 30 additions and 13 deletions

View file

@ -853,7 +853,7 @@ void ExtensionManager::enableExtension(
/**
*/
long ExtensionManager::checkPrerequisitesAndEnable(
sal_Int32 ExtensionManager::checkPrerequisitesAndEnable(
Reference<deploy::XPackage> const & extension,
Reference<task::XAbortChannel> const & xAbortChannel,
Reference<ucb::XCommandEnvironment> const & xCmdEnv)
@ -1174,7 +1174,7 @@ sal_Bool ExtensionManager::synchronize(
} catch (...) {
uno::Any exc = ::cppu::getCaughtException();
throw deploy::DeploymentException(
OUSTR("Extension Manager: exception during enableExtension"),
OUSTR("Extension Manager: exception in synchronize"),
static_cast<OWeakObject*>(this), exc);
}
}

View file

@ -129,7 +129,7 @@ public:
css::uno::RuntimeException);
virtual long SAL_CALL checkPrerequisitesAndEnable(
virtual sal_Int32 SAL_CALL checkPrerequisitesAndEnable(
css::uno::Reference<css::deployment::XPackage> const & extension,
css::uno::Reference<css::task::XAbortChannel> const & xAbortChannel,
css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv )

View file

@ -183,7 +183,8 @@ void PackageManagerImpl::initActivationLayer(
OSL_ASSERT( m_activePackages.getLength() > 0 );
m_activePackages_expanded = expandUnoRcUrl( m_activePackages );
m_registrationData_expanded = expandUnoRcUrl(m_registrationData);
create_folder( 0, m_activePackages_expanded, xCmdEnv, true);
if (!m_readOnly)
create_folder( 0, m_activePackages_expanded, xCmdEnv, true);
OUString dbName;
if (m_context.equals(OUSTR("user")))
@ -1341,9 +1342,14 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
{
bool bModified = false;
ActivePackages::Entries id2temp( m_activePackagesDB->getEntries() );
//check if the folder exist at all. The shared extension folder
//may not exist for a normal user.
if (!create_ucb_content(
NULL, m_activePackages_expanded, Reference<css::ucb::XCommandEnvironment>(), false))
return bModified;
::ucbhelper::Content tempFolder(
m_activePackages_expanded, xCmdEnv );
Reference<sdbc::XResultSet> xResultSet(
tempFolder.createCursor(
Sequence<OUString>( &StrTitle::get(), 1 ),

View file

@ -425,14 +425,24 @@ Reference<css::xml::dom::XNode> BackendDb::writeKeyElement(
const Reference<css::xml::dom::XDocument> doc = getDocument();
const Reference<css::xml::dom::XNode> root = doc->getFirstChild();
#if OSL_DEBUG_LEVEL > 0
//There must not be yet an entry with the same url
//Check if there are an entry with the same url. This can be the case if the
//the status of an XPackage is ambiguous. In this case a call to activateExtension
//(dp_extensionmanager.cxx), will register the package again. See also
//Package::processPackage_impl in dp_backend.cxx.
//A package can become
//invalid after its successful registration, for example if a second extension with
//the same service is installed.
const OUString sExpression(
sPrefix + OUSTR(":") + sElementName + OUSTR("[@url = \"") + url + OUSTR("\"]"));
const Reference<css::xml::dom::XNode> _extensionNode =
const Reference<css::xml::dom::XNode> existingNode =
getXPathAPI()->selectSingleNode(root, sExpression);
OSL_ASSERT(! _extensionNode.is());
#endif
if (existingNode.is())
{
OSL_ASSERT(0);
//replace the existing entry.
removeEntry(url);
}
const Reference<css::xml::dom::XElement> keyElement(
doc->createElementNS(sNameSpace, sPrefix + OUSTR(":") + sElementName));

View file

@ -254,9 +254,8 @@ void BackendImpl::ExecutablePackageImpl::processPackage_(
OSL_ASSERT(0);
//This won't have affect on Windows
if (osl::File::E_None != osl::File::setAttributes(
dp_misc::expandUnoRcUrl(m_url), attributes))
OSL_ENSURE(0, "Extension Manager: Could not set executable file attribute.");
osl::File::setAttributes(
dp_misc::expandUnoRcUrl(m_url), attributes);
}
getMyBackend()->addDataToDb(getURL());
}

View file

@ -108,6 +108,8 @@ const char s_usingText [] =
" deployment context;\n"
" run only when no concurrent Office\n"
" process(es) are running!\n"
" --bundled expert feature: operate on bundled extensions. Only\n"
" works with list, validate, reinstall;\n"
" --deployment-context expert feature: explicit deployment context\n"
" <context>\n"
"\n"