diff options
Diffstat (limited to 'desktop/source/deployment/misc/dp_update.cxx')
-rw-r--r-- | desktop/source/deployment/misc/dp_update.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/desktop/source/deployment/misc/dp_update.cxx b/desktop/source/deployment/misc/dp_update.cxx index 97453d6b2781..531409f0630a 100644 --- a/desktop/source/deployment/misc/dp_update.cxx +++ b/desktop/source/deployment/misc/dp_update.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 @@ -112,7 +112,7 @@ void getOwnUpdateInfos( infos(getUpdateInformation(updateInformation, urls, id, anyError)); if (anyError.hasValue()) out_errors.push_back(std::make_pair(i->second.extension, anyError)); - + for (sal_Int32 j = 0; j < infos.getLength(); ++j) { dp_misc::DescriptionInfoset infoset( @@ -121,7 +121,7 @@ void getOwnUpdateInfos( if (!infoset.hasDescription()) continue; boost::optional< OUString > id2(infoset.getIdentifier()); - if (!id2) + if (!id2) continue; OSL_ASSERT(*id2 == id); if (*id2 == id) @@ -154,7 +154,7 @@ void getDefaultUpdateInfos( Sequence< Reference< xml::dom::XElement > > infos( getUpdateInformation( - updateInformation, + updateInformation, Sequence< OUString >(&sDefaultURL, 1), OUString(), anyError)); if (anyError.hasValue()) out_errors.push_back(std::make_pair(Reference<deployment::XPackage>(), anyError)); @@ -215,14 +215,14 @@ bool onlyBundledExtensions( onlyBundled = false; break; } - + } } else { const uno::Sequence< uno::Sequence< Reference<deployment::XPackage > > > seqAllExt = xExtMgr->getAllExtensions(Reference<task::XAbortChannel>(), Reference<ucb::XCommandEnvironment>()); - + for (int pos = seqAllExt.getLength(); pos --; ) { if (!containsBundledOnly(seqAllExt[pos])) @@ -280,7 +280,7 @@ UPDATE_SOURCE isUpdateUserExtension( retVal = UPDATE_SOURCE_BUNDLED; else if (index == 3) retVal = UPDATE_SOURCE_ONLINE; - + } //No update for bundled extensions, they are updated only by the setup //else if (bundledVersion.getLength()) @@ -305,7 +305,7 @@ UPDATE_SOURCE isUpdateUserExtension( retVal = UPDATE_SOURCE_ONLINE; } } - + return retVal; } @@ -318,7 +318,7 @@ UPDATE_SOURCE isUpdateSharedExtension( if (bReadOnlyShared) return UPDATE_SOURCE_NONE; UPDATE_SOURCE retVal = UPDATE_SOURCE_NONE; - + if (sharedVersion.getLength()) { int index = determineHighestVersion( @@ -360,9 +360,9 @@ getExtensionWithHighestVersion( //greatest has a value if (! current.is()) continue; - + if (dp_misc::compareVersions(current->getVersion(), greatest->getVersion()) == dp_misc::GREATER) - greatest = current; + greatest = current; } return greatest; } @@ -375,7 +375,7 @@ extension(ext) UpdateInfoMap getOnlineUpdateInfos( - Reference<uno::XComponentContext> const &xContext, + Reference<uno::XComponentContext> const &xContext, Reference<deployment::XExtensionManager> const & xExtMgr, Reference<deployment::XUpdateInformationProvider > const & updateInformation, std::vector<Reference<deployment::XPackage > > const * extensionList, @@ -390,15 +390,15 @@ UpdateInfoMap getOnlineUpdateInfos( { const uno::Sequence< uno::Sequence< Reference<deployment::XPackage > > > seqAllExt = xExtMgr->getAllExtensions( Reference<task::XAbortChannel>(), Reference<ucb::XCommandEnvironment>()); - + //fill the UpdateInfoMap. key = extension identifier, value = UpdateInfo for (int pos = seqAllExt.getLength(); pos --; ) { uno::Sequence<Reference<deployment::XPackage> > const & seqExt = seqAllExt[pos]; - + Reference<deployment::XPackage> extension = getExtensionWithHighestVersion(seqExt); OSL_ASSERT(extension.is()); - + std::pair<UpdateInfoMap::iterator, bool> insertRet = infoMap.insert( UpdateInfoMap::value_type( dp_misc::getIdentifier(extension), UpdateInfo(extension))); @@ -414,7 +414,7 @@ UpdateInfoMap getOnlineUpdateInfos( std::pair<UpdateInfoMap::iterator, bool> insertRet = infoMap.insert( UpdateInfoMap::value_type( dp_misc::getIdentifier(*i), UpdateInfo(*i))); - OSL_ASSERT(insertRet.second == true); + OSL_ASSERT(insertRet.second == true); } } @@ -442,7 +442,7 @@ OUString getHighestVersion( case 3: return onlineVersion; default: OSL_ASSERT(0); } - + return OUString(); } } //namespace dp_misc |